/* ===== Kabariya Exteriors — brand palette (custom styles source of truth) ===== */
:root {
    --primary-dark: #194569;
    --primary: #5F84A2;
    --secondary: #91AEC4;
    --light-medium: #B7D0E1;
    --light-blue: #CADEED;
    --background: #DBECF4;
    --white: #FFFFFF;
    --text-dark: #1A1A1A;
    --focus-ring: rgba(95, 132, 162, 0.20);
}

@layer base {
    html, body { margin: 0; padding: 0; }
    body { overscroll-behavior: none; }
    main > :first-child { margin-top: 0 !important; }
    main > :last-child { margin-bottom: 0 !important; }
}
::-webkit-scrollbar { display: none; }

/* Animations */
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.animate-ping { animation: ping 1s cubic-bezier(0,0,0.2,1) infinite; }

/* Glassmorphism */
.glass { background: rgba(25, 69, 105, 0.8); backdrop-filter: blur(12px); border: 1px solid rgba(183, 208, 225, 0.35); }
.glass-card { background: rgba(25, 69, 105, 0.45); backdrop-filter: blur(12px); border: 1px solid rgba(183, 208, 225, 0.3); }

/* Custom Focus Styles */
.focus-ring:focus { outline: none; box-shadow: 0 0 0 2px #5F84A2, 0 0 0 4px #DBECF4; }

/* ===== Kabariya Export typography parity =====
   The reference design uses Inter almost everywhere, with Poppins reserved
   for display headings and interactive buttons / calls-to-action. */
button.font-label-lg,
button.font-label-md,
button.font-label-sm,
a.font-label-lg,
a.font-label-md,
a.font-label-sm {
    font-family: "Poppins", sans-serif;
}
/* Primary navigation (desktop mega-menu + mobile drawer) stays in Inter,
   matching the Kabariya Export navigation. */
header nav a.font-label-lg,
header nav a.font-label-md,
header nav a.font-label-sm,
header nav button.font-label-lg,
header nav button.font-label-md,
header nav button.font-label-sm {
    font-family: "Inter", sans-serif;
}
/* Keep the header/mobile "Request a Quote" CTA in Poppins even inside <nav> */
header nav a[data-path="request-a-quote"] {
    font-family: "Poppins", sans-serif;
}
/* Page-level H1 headings (home hero + inner-page banners) use Poppins,
   matching Kabariya Export's hero and page banners. Section headings
   (H2/H3) remain Inter. */
h1,
h1[class] {
    font-family: "Poppins", sans-serif;
}

/* ===== Radial Gradient Burst hover =====
   Primary navbar menu items: a soft secondary-blue glow bursts outward
   from the cursor position, while the label stays dark blue.
   Cursor coordinates are fed in via --burst-x / --burst-y from app.js.
   The active item (aria-current="page") keeps a stronger, always-on burst
   as its active indicator (no underline). */
header nav[data-active-classes] > a,
header nav[data-active-classes] > div[data-path="products"] > a,
#mobile-menu > div > a,
#mobile-menu > div button.mobile-cat-toggle {
    --burst-x: 50%;
    --burst-y: 50%;
    --burst-gradient: radial-gradient(circle at var(--burst-x) var(--burst-y),
        rgba(95, 132, 162, 0.45) 0%,
        rgba(95, 132, 162, 0.00) 70%);
    background-image: var(--burst-gradient);
    background-repeat: no-repeat;
    background-position: var(--burst-x) var(--burst-y);
    background-size: 0% 0%;
    transition: background-size 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
header nav[data-active-classes] > a:hover,
header nav[data-active-classes] > div[data-path="products"] > a:hover,
#mobile-menu > div > a:hover,
#mobile-menu > div button.mobile-cat-toggle:hover {
    background-size: 340% 340%;
}
/* Active menu item = persistent radial burst (stronger glow, always visible) */
header nav[data-active-classes] > a[aria-current="page"],
header nav[data-active-classes] > div[data-path="products"] > a[aria-current="page"],
#mobile-menu > div > a[aria-current="page"],
#mobile-menu > div button[aria-current="page"] {
    --burst-gradient: radial-gradient(circle at var(--burst-x) var(--burst-y),
        rgba(95, 132, 162, 0.62) 0%,
        rgba(95, 132, 162, 0.00) 72%);
    background-size: 340% 340%;
}
header nav[data-active-classes] > a:active,
header nav[data-active-classes] > div[data-path="products"] > a:active,
#mobile-menu > div > a:active,
#mobile-menu > div button.mobile-cat-toggle:active {
    transition-duration: 0.12s;
}

/* Form Styles - expanded from @apply */
.form-input { width: 100%; padding: 0.75rem 1rem; background: #FFFFFF; color: #1A1A1A; border: 1px solid #B7D0E1; font-family: "Inter", sans-serif; font-size: 14px; line-height: 20px; border-radius: 0.25rem; }
.form-input:focus { outline: none; border-color: #5F84A2; box-shadow: 0 0 0 3px rgba(95, 132, 162, 0.20); }

/* Contact — keep the targeted "Request an Architectural Quote" section clear of the fixed header */
#architectural-quote { scroll-margin-top: 8rem; }
.form-input::placeholder { color: #5F84A2; }
/* Form labels sit on the dark (#194569) quote panel, so they use the light palette step */
.form-label { display: block; font-family: "Inter", sans-serif; font-size: 12px; line-height: 16px; letter-spacing: 0.06em; font-weight: 500; color: #B7D0E1; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }

.btn-primary { padding: 0.75rem 2rem; background: #5F84A2; color: #FFFFFF; font-family: "Poppins", sans-serif; font-size: 12px; line-height: 16px; letter-spacing: 0.06em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; transition: background-color 150ms ease, color 150ms ease; border-radius: 0.25rem; border: none; cursor: pointer; }
.btn-primary:hover { background: #CADEED; color: #194569; }

.btn-secondary { padding: 0.5rem 1.5rem; border: 1px solid #5F84A2; color: #FFFFFF; font-family: "Poppins", sans-serif; font-size: 12px; line-height: 16px; letter-spacing: 0.06em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; transition: background-color 150ms ease; border-radius: 0.25rem; cursor: pointer; }
.btn-secondary:hover { background: #5F84A2; }

.btn-submit { padding: 1rem 2.5rem; background: #5F84A2; color: #FFFFFF; font-family: "Poppins", sans-serif; font-size: 14px; line-height: 20px; letter-spacing: 0.04em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; transition: all 150ms ease; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-radius: 0.25rem; border: none; cursor: pointer; }
.btn-submit:hover { background: #CADEED; color: #194569; }

/* Radio/Checkbox styling */
.accent-secondary { accent-color: #5F84A2; }

/* Textarea */
textarea.form-input { min-height: 100px; resize: vertical; }

/* File Upload Area */
.file-upload-area { border: 2px dashed #B7D0E1; border-radius: 0.5rem; padding: 2rem; text-align: center; cursor: pointer; background: rgba(25, 69, 105, 0.4); transition: all 150ms ease; }
.file-upload-area:hover, .file-upload-area.drag-over { border-color: #5F84A2; background: rgba(95, 132, 162, 0.15); }
.file-upload-area .material-symbols-outlined { font-size: 4rem; color: #91AEC4; margin-bottom: 0.5rem; }
.file-upload-area p { color: #FFFFFF; font-family: "Inter", sans-serif; font-size: 14px; line-height: 20px; }
.file-upload-area p small { color: #B7D0E1; font-size: 12px; line-height: 16px; }

/* Progress Step Indicators */
.step-indicator { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.step-indicator .step-number { width: 1.5rem; height: 1.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-family: "Inter", sans-serif; font-weight: 500; }
.step-indicator.active .step-number { background: #5F84A2; color: #FFFFFF; }
.step-indicator.inactive .step-number { background: rgba(255, 255, 255, 0.2); color: #DBECF4; }
.step-indicator.active { color: #91AEC4; font-weight: 600; }
.step-indicator.inactive { color: #DBECF4; }
.step-indicator span:not(.step-number) { font-family: "Inter", sans-serif; font-size: 10px; line-height: 14px; letter-spacing: 0.08em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; display: none; }
@media (min-width: 640px) { .step-indicator span:not(.step-number) { display: block; } }

/* Step Panels */
.step-panel { display: none; }
.step-panel:not(.hidden) { display: block; animation: fadeIn 200ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Hover Effects */
.card-hover { transition: box-shadow 200ms ease; }
.card-hover:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }

.card-hover-lift { transition: transform 200ms ease; }
.card-hover-lift:hover { transform: translateY(-0.25rem); }

.img-zoom-hover img { transition: transform 500ms ease; }
.img-zoom-hover:hover img { transform: scale(1.05); }

.img-zoom-hover-lg img { transition: transform 700ms ease; }
.group:hover .img-zoom-hover-lg img { transform: scale(1.05); }

/* Tab Styles */
.tab-active { background: #194569; color: #FFFFFF; }
.tab-inactive { background: #FFFFFF; color: #1A1A1A; }
.tab-inactive:hover { background: #CADEED; }

/* Accordion */
.accordion-content { display: none; padding: 1.5rem 1.5rem 1.5rem 1.5rem; color: #5F84A2; font-family: "Inter", sans-serif; font-size: 14px; line-height: 20px; border-top: 1px solid rgba(183, 208, 225, 0.35); padding-top: 1rem; }
.accordion-content:not(.hidden) { display: block; }
.accordion-icon { font-family: "Material Symbols Outlined"; color: #5F84A2; font-size: 1.5rem; transition: transform 150ms ease; }
.accordion-icon.open { transform: rotate(180deg); }

/* Modals */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(25, 69, 105, 0.8); backdrop-filter: blur(4px); display: none; }
.modal-overlay:not(.hidden) { display: flex; }
.modal-content { background: #FFFFFF; border: 1px solid #B7D0E1; max-width: 32rem; width: 100%; padding: 2rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); position: relative; }
.modal-confirm { background: #FFFFFF; border: 1px solid #B7D0E1; max-width: 28rem; width: 100%; padding: 2rem; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Loader */
.loader-bar { height: 100%; background: #CADEED; transition: width 300ms ease; }

/* Preloader auto-hide fallback: guarantees the page is never blocked,
   even if JavaScript fails to load. Loader fades out after 4s. */
@keyframes loader-auto-hide {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}
#arch-loader { animation: loader-auto-hide 0s linear 4s forwards; }

/* Progress Steps */
.step-indicator.active { color: #91AEC4; font-weight: 600; }
.step-indicator.inactive { color: #DBECF4; }
.step-indicator .step-number { width: 1.5rem; height: 1.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.step-indicator.active .step-number { background: #5F84A2; color: #FFFFFF; }
.step-indicator.inactive .step-number { background: rgba(255, 255, 255, 0.2); }

/* Selection Colors */
::selection { background: #5F84A2; color: #FFFFFF; }

/* Validation Error */
.border-error { border-color: #ba1a1a !important; box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.3); }

/* ===== Load More Products ===== */
/* Hide cards that are beyond the current reveal limit (initial 3, then +6 per click) */
.product-card.is-pending { display: none; }

/* Reveal transition for newly loaded cards */
.load-more-reveal { animation: load-more-reveal 0.45s ease both; }
@keyframes load-more-reveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quote form: the submit button while the request is in flight */
#quote-submit.is-loading { opacity: 0.85; cursor: progress; }
#quote-submit.is-loading:hover { background: #CADEED; color: #194569; }

/* Subtle loading state on the button */
#load-more-btn.is-loading { opacity: 0.85; pointer-events: none; }
.spinning { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print { .no-print { display: none !important; } }
