/* ==========================================================================
   New Rathna Hardware - Shared Site Stylesheet
   Provides consistent design + mobile responsiveness across every page.
   ========================================================================== */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #1e3a8a;
    --dark: #1e2937;
    --light-bg: #f8fafc;
    --border: #e2e8f0;
    --text: #333333;
    --radius: 12px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text);
    line-height: 1.6;
}

.hero {
    background: linear-gradient(rgba(15,23,42,0.68), rgba(15,23,42,0.68)), var(--hero-image, url('https://picsum.photos/id/1015/1600/900')) center/cover;
    ...
}
/* ---------- Scroll To Top ---------- */
#scrollTop {
    position: fixed;
    bottom: 28px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    z-index: 2000;
    border: none;
    transition: 0.2s;
}
#scrollTop:hover { background: var(--primary-dark); transform: translateY(-4px); }


/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
}

.whatsapp-float i {
    transition: transform 0.3s;
}

.whatsapp-float:hover i {
    transform: rotate(20deg);
}

/* Show only after scroll */
.whatsapp-float.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---------- Loading Animation ---------- */
.loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    transition: opacity 0.3s ease;
}
.loading.hide { opacity: 0; pointer-events: none; }
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 54px;
    height: 54px;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ---------- Top Bar ---------- */
.top-bar {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 10px 5%;
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.top-bar .social-links a { color: white; margin-left: 14px; font-size: 1rem; }

/* ---------- Sticky Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    gap: 20px;
    flex-wrap: wrap;
}
.site-header .logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.site-header .logo span.new { color: var(--primary); }
.site-header .logo img { height: 55px; width: auto; object-fit: contain; }
.header-contact {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #444;
}
.header-contact a.social-icon { color: var(--secondary); font-size: 1.1rem; margin-left: 4px; }

/* ---------- Navigation ---------- */
.navbar {
    background: var(--secondary);
    color: white;
    padding: 0 5%;
    position: sticky;
    top: 92px;
    z-index: 999;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.nav-links { display: flex; }
.nav-links a {
    color: white;
    text-decoration: none;
    margin: 0 18px;
    padding: 16px 0;
    font-weight: 600;
    display: inline-block;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
    font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--primary); color: #ffd8b8; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 14px 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 34px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 1rem;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(249,115,22,0.35); }
.btn-outline { background: transparent; border: 2px solid white; }
.btn-outline:hover { background: white; color: var(--secondary); }
.btn-block { width: 100%; text-align: center; }
.btn-secondary { background: var(--secondary); }
.btn-secondary:hover { background: #16305f; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }

/* ---------- Sections ---------- */
section, .section { padding: 80px 5%; }
.section-title { text-align: center; font-size: 2.6rem; color: var(--secondary); margin-bottom: 12px; }
.subtitle { text-align: center; font-size: 1.15rem; color: #666; margin-bottom: 50px; }

/* ---------- Hero Banner ---------- */
.hero {
    background: linear-gradient(rgba(15,23,42,0.68), rgba(15,23,42,0.68)), var(--hero-image, url('https://picsum.photos/id/1015/1600/900')) center/cover;
    color: white;
    text-align: center;
    padding: 150px 20px;
}
.hero h1 { font-size: 3.2rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 15px; }

/* ---------- Feature / Why-Choose-Us Cards ---------- */
.features-grid, .why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
}
.feature-card, .why-card {
    text-align: center;
    padding: 32px 22px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.25s;
}
.feature-card:hover, .why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-card i, .why-card i { font-size: 3rem; color: var(--primary); margin-bottom: 18px; }
.feature-card h3, .why-card h3 { color: var(--secondary); margin-bottom: 10px; }

/* ---------- Product Cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    max-width: 1400px;
    margin: 0 auto;
}
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.product-image { width: 100%; height: 210px; object-fit: cover; background: #eee; }
.product-info { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-info h3 { color: var(--secondary); font-size: 1.2rem; }
.category-tag {
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    align-self: flex-start;
}
.product-info .view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 22px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    background: transparent;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.product-info .view-link i { transition: transform 0.25s ease; font-size: 0.85em; }
.product-info .view-link:hover,
.product-info .view-link:focus-visible {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
}
.product-info .view-link:hover i { transform: translateX(4px); }
.product-info .view-link:active { transform: translateY(0); }
.category-icon-tile {
    text-align: center;
    padding: 34px 24px;
}
.category-icon-tile .icon { font-size: 3rem; color: var(--primary); margin-bottom: 16px; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}
.testimonial { background: white; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.testimonial p { font-style: italic; margin-bottom: 14px; }

/* ---------- Modal ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    overflow: auto;
}
.modal.open { display: block; }
.modal-content {
    background: white;
    margin: 5% auto;
    width: 92%;
    max-width: 550px;
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
}
.modal-content.wide { max-width: 1100px; }
.modal-close { position: absolute; top: 14px; right: 20px; font-size: 2rem; cursor: pointer; color: #999; line-height: 1; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 15px; }
.gallery-grid img { width: 100%; border-radius: 8px; cursor: pointer; height: 160px; object-fit: cover; }

/* ---------- Forms ---------- */
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 1rem;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}
textarea { min-height: 140px; resize: vertical; }
label { font-weight: 600; display: block; margin-bottom: 6px; color: var(--secondary); }

/* ---------- Product Filter / Search Bar ---------- */
.filter-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 22px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}
.filter-field {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}
.filter-field .filter-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}
.filter-field .filter-control { position: relative; }
.filter-field .filter-control i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}
.filter-field input,
.filter-field select {
    height: 50px;
    margin-bottom: 0;
    padding-left: 44px;
    border-radius: 10px;
    background: var(--light-bg);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.filter-field input:hover,
.filter-field select:hover { border-color: #cbd5e1; }
.filter-field input:focus,
.filter-field select:focus { background: white; }
.filter-field select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.filter-actions { display: flex; gap: 10px; }
.filter-actions .btn {
    height: 50px;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}
.filter-summary {
    max-width: 1400px;
    margin: 14px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.92rem;
    color: #64748b;
}
.filter-summary .filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: var(--secondary);
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
}
@media (max-width: 640px) {
    .filter-bar { flex-direction: column; align-items: stretch; padding: 18px; }
    .filter-field { min-width: 100%; }
    .filter-actions { width: 100%; }
    .filter-actions .btn { flex: 1; }
}

/* ---------- CTA ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    text-align: center;
    padding: 70px 20px;
}
.cta-section h2 { font-size: 2.4rem; margin-bottom: 15px; }
.cta-section p { font-size: 1.2rem; margin-bottom: 25px; opacity: 0.95; }

/* ---------- Map ---------- */
.map-container { text-align: center; padding-bottom: 0; }
.map-frame { width: 100%; max-width: 1000px; height: 420px; border: 0; border-radius: 16px; margin: 0 auto; display: block; box-shadow: var(--shadow-lg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 60px 5% 25px; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 34px;
    max-width: 1300px;
    margin: 0 auto 30px;
}
.footer-grid h3 { color: white; margin-bottom: 16px; font-size: 1.2rem; }
.footer-grid p, .footer-grid a { color: #cbd5e1; text-decoration: none; display: block; margin-bottom: 10px; font-size: 0.95rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-social a {
    display: inline-flex;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    margin: 0 8px 0 0;
    color: white;
}
.footer-social a:hover { background: var(--primary); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
}


/* ---------- Alerts ---------- */
.alert { padding: 16px 20px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* ---------- Utility ---------- */
.container { max-width: 1300px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .grid-2 { grid-template-columns: 1fr; gap: 30px; }
    .hero h1 { font-size: 2.4rem; }
    .section-title { font-size: 2.1rem; }
}

@media (max-width: 768px) {
    .top-bar { font-size: 0.8rem; padding: 8px 4%; }
    .site-header { padding: 14px 4%; }
    .site-header .logo { font-size: 1.5rem; }
    .site-header .logo img { height: 42px; }
    .header-contact { display: none; }
    .navbar { top: 70px; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: 10px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { margin: 0; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-inner { flex-wrap: wrap; }
    .hero { padding: 100px 20px; }
    .hero h1 { font-size: 1.9rem; }
    section, .section { padding: 50px 5%; }
    .section-title { font-size: 1.7rem; }
    #scrollTop { width: 42px; height: 42px; bottom: 18px; right: 18px; font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .btn { padding: 12px 24px; font-size: 0.92rem; }
    .hero h1 { font-size: 1.6rem; }
    .product-image { height: 170px; }
}

/* Product Detail Image Gallery */
.gallery-main-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    background: #f4f4f4;
}
.gallery-main {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}
.gallery-main-wrap:hover .gallery-main { transform: scale(1.04); }
.gallery-zoom-hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: rgba(30, 58, 138, 0.85);
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-main-wrap:hover .gallery-zoom-hint { opacity: 1; }
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}
.gallery-thumb {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
    transition: border-color 0.25s ease, transform 0.25s ease;
    aspect-ratio: 1 / 1;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { transform: translateY(-3px); }
.gallery-thumb.active { border-color: var(--primary); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 30px;
    cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 28px;
    font-size: 2.4rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.lightbox-close:hover { color: var(--primary); }

@media (max-width: 768px) {
    .gallery-main { height: 280px; }
    .gallery-thumbs { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
}