:root {
    --color-orange: #ce692d;
    --color-navy: #103752;
    --color-bg-deep: #0f172a;
    --font-serif: 'Times New Roman', serif;
    --font-sans: 'Inter', sans-serif;
    --header-height: 100px;
}

/* Mobile Header Override */
@media (max-width: 768px) {
    :root {
        --header-height: 65px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Background - ROUGH TEXTURED GRADIENT */
html,
body {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: #ffffff;
    background: url('assets/background image.png') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden !important;
    position: relative;
    max-width: 100%;
}



/* Ensure content sits above the background textures */
.app-header,
main,
footer {
    position: relative;
    z-index: 1;
}


/* ===========================
   HEADER - FIXED SINGLE-ROW
   Always stays horizontal until true mobile (<768px)
   =========================== */
.app-header {
    background: transparent;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    z-index: 100;
    position: relative;
    max-width: 100%;
}

.header-wrap {
    display: flex;
    width: 100%;
    /* CRITICAL: fixed height so hero calc works */
    height: var(--header-height);
}

/* ===========================
   LEFT: Logo Panel
   =========================== */
.header-logo-section {
    width: 130px;
    /* slightly wider */
    padding: 1.2rem;
    /* more breathing room around logo */
    border-right: 1px solid rgba(255, 255, 255, 0.28);
}


.brand-logo-img {
    max-height: 72px;
    transform: scale(1.5);
    /* Visually increase the logo size by 50% without altering the container box */
}

/* ===========================
   RIGHT: Content Column
   Title row + Nav row stacked
   =========================== */
.header-content-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    position: relative;
    /* Allow child absolute positioning */
}

/* TOP ROW: Title + Profile icon */
.header-row-top {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    min-height: 62px;
    /* was 0 — gives the title row more room */
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    right: 2rem;
    /* Keep at far right */
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.menu-icon-img {
    width: 32px;
    height: auto;
    filter: brightness(0) invert(1);
}

.header-brand-title {
    font-size: clamp(1.6rem, 2.5vw, 2.8rem);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .header-logo-section {
        width: 80px;
        padding: 0.8rem;
    }
    .brand-logo-img {
        max-height: 40px;
        transform: scale(1.2);
    }
    .header-row-top {
        min-height: 40px;
        padding: 0 1rem;
    }
    .header-controls {
        gap: 0.8rem;
        right: 1rem;
    }
    .profile-circle, .cart-circle, .signup-circle {
        width: 32px;
        height: 32px;
    }
    .header-brand-title {
        font-size: 1.1rem;
    }
    .mobile-menu-btn {
        width: 32px;
        height: 32px;
    }
}

/* Profile Icon - positioned like Image 2 */
.profile-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--color-orange);
    /* orange default */
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-circle:hover {
    background-color: var(--color-navy);
    /* navy on hover */
    transform: scale(1.05);
}

.profile-img-icon {
    width: 50%;
    height: 63%;
    object-fit: cover;
}

/* Profile / User Area */
.user-area {
    display: flex;
    align-items: center;
}

.user-info-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-name-text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.user-info-dropdown:hover .user-name-text {
    background: var(--color-orange);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1e293b;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.user-info-dropdown:hover .user-dropdown-content {
    display: block;
}

.user-dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.user-dropdown-content a:hover {
    background: var(--color-orange);
}

.dropdown-header-info {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

/* Auth Alerts */
.auth-alert {
    width: 90%;
    max-width: 800px;
    margin: 15px auto;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #f87171;
}

.auth-alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Profile / User Area */
.user-area {
    display: flex;
    align-items: center;
}

.user-logged-in-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-dropdown {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.user-info-dropdown:hover {
    transform: scale(1.05);
}

.profile-circle {
    width: 38px;
    height: 38px;
    background: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-img-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1e293b;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.user-info-dropdown.show-dropdown .user-dropdown-content {
    display: block;
}


.user-dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.user-dropdown-content a:hover {
    background: var(--color-orange);
}

/* Auth Alerts */
.auth-alert {
    width: 90%;
    max-width: 800px;
    margin: 15px auto;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #f87171;
}

.auth-alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Signup circle - far right control */
.signup-circle {
    width: 40px;
    height: 40px;
    background: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.signup-circle:hover {
    transform: scale(1.05);
    background: #e67e3a;
}

/* BOTTOM ROW: Navigation */
.header-row-bottom {
    height: 38px;
    /* keep this the same */
    flex-shrink: 0;
}

.header-nav {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    width: 100%;
    height: 100%;
    justify-content: flex-start;
    /* Left-aligned navigation */
    padding-left: 0;
    /* Navigation box starts exactly at divider */
    margin-left: 0;
    /* Removing secondary divider line/gap */
    border-left: none;
    /* Only a single divider after logo */
}

.nav-item {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.nav-item label,
.nav-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    /* Balanced padding for perfect internal centering */
    color: #b0bec5;
    font-size: 12px;
    /* More refined typography look per image */
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    white-space: normal; text-align: center;
    position: relative;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.nav-item label:hover,
.nav-item a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* ===========================
   ACTIVE NAV STATE - PHP PAGE LOGIC
   =========================== */
.nav-item.active-tab a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active-tab a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    /* Solid bar style from image */
    background-color: var(--color-orange);
    z-index: 10;
}



/* ===========================
   HERO STAGE
   Uses CSS custom property so it's always correct
   =========================== */
.hero-stage {
    position: relative;
    width: 100%;
    /* Increased height for better image visibility */
    height: 42vh;
    min-height: 280px;
    max-height: 450px;
    overflow: hidden;
    background: #0a121e;
}


.hero-image-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.slide-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slideFadeCycle 9s infinite;
}

.hero-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-slider-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.hero-slider-btn.prev {
    left: 20px;
}

.hero-slider-btn.next {
    right: 20px;
}

.full-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}



.bottom-features {
    padding: 1rem 0 0.3rem;
    /* Added a small gap below hero for breathing room */
    position: relative;
    z-index: 5;
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    /* Reduced gap */
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-block {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center icon-text group horizontally */
    gap: 1.2rem;
    /* Refined breathing room between icon and text */
    padding: 0.3rem 1rem;
    min-height: 70px;
    border-radius: 8px;
    transition: transform 0.3s, background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.feature-block:active {
    background: var(--color-orange) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border: none !important;
}

.block-orange {
    background: var(--color-orange);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.block-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.icon-qs,
.icon-explore,
.icon-custom {
    height: 45px !important; /* Scaled down slightly to balance with text */
    width: auto !important;
    filter: brightness(0) invert(1);
    transition: height 0.3s ease;
}

.block-text h3 {
    font-size: 1.2rem;
    /* Reduced from 1.4rem */
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.block-text p {
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    opacity: 0.9;
    font-weight: 600;
}

.primary-actions {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    /* Increased gap for better visual separation */
    margin-top: 1rem;
    /* Synchronized with feature padding for symmetric rhythm */
}

.btn-lg-orange,
.btn-lg-navy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    /* Increased for better prominence */
    font-size: 1.4rem;
    /* Significantly larger text */
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    min-width: 240px;
    /* Wider presence per user request */
    transition: all 0.2s, background 0.2s;
    letter-spacing: 1px;
    text-decoration: none;
}

.btn-lg-orange:active,
.btn-lg-navy:active {
    background: var(--color-orange) !important;
    border: none !important;
    transform: translateY(-1px);
}

.btn-lg-orange {
    background: var(--color-navy);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn-lg-navy {
    background: var(--color-navy);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn-lg-orange:hover,
.btn-lg-navy:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ===========================
   LARGE SCREEN SCALING - HOME + FORMS
   =========================== */

/* Extra large screens (1800px+) */
@media (min-width: 1800px) {
    .feature-row {
        max-width: 1800px;
        gap: 2.5rem;
    }

    .feature-block {
        padding: 1rem 1.8rem;
    }

    .icon-qs,
    .icon-explore,
    .icon-custom {
        height: 90px !important; /* Scaled down for large screens to balance with text */
    }

    .block-text h3 {
        font-size: 1.7rem;
    }

    .block-text p {
        font-size: 1.15rem;
    }

    .btn-lg-orange,
    .btn-lg-navy {
        padding: 1.3rem 5rem;
        font-size: 1.8rem;
        min-width: 280px;
    }

    .hero-stage {
        max-height: 1000px;
    }

    .qs-container {
        max-width: 1400px;
    }

    .qs-header h2 {
        font-size: 2.8rem;
    }

    .form-group label {
        font-size: 1.35rem;
    }

    .qs-select {
        padding: 1.1rem 1.4rem;
        font-size: 1.2rem;
    }

    .btn-qs {
        font-size: 1.25rem;
        padding: 1.3rem;
        max-width: 340px;
    }

    .cs-card {
        max-width: 1400px;
        padding: 2.5rem 3rem 2rem 3rem;
    }

    .cs-header-wrap h2 {
        font-size: 3rem;
    }

    .form-row {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }

    .cs-form {
        gap: 1.2rem;
    }

    .form-row label {
        font-size: 1.35rem;
    }

    .cs-input {
        padding: 1.1rem 1.5rem;
        font-size: 1.2rem;
    }

    .btn-cs {
        font-size: 1.3rem;
        padding: 1.3rem 4rem;
        min-width: 260px;
    }
}

/* Large screens (1400px - 1799px) */
@media (min-width: 1400px) and (max-width: 1799px) {
    .feature-row {
        max-width: 1600px;
        gap: 2.2rem;
    }

    .block-text h3 {
        font-size: 1.6rem;
    }

    .hero-stage {
        max-height: 920px;
    }

    .qs-container {
        max-width: 1300px;
    }

    .cs-card {
        max-width: 1100px;
        padding: 2.5rem 2.5rem 2rem 2.5rem;
    }

    .form-row {
        grid-template-columns: 250px 1fr;
    }

    .cs-form {
        gap: 1rem;
    }

    .form-row label {
        font-size: 1.25rem;
    }

    .cs-input {
        padding: 1rem 1.3rem;
        font-size: 1.1rem;
    }

    .cs-header-wrap h2 {
        font-size: 2.6rem;
    }

    .btn-cs {
        font-size: 1.15rem;
        padding: 1.1rem 3.5rem;
    }
}


/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Large desktop tweak */
@media (max-width: 1400px) {
    .header-brand-title {
        font-size: clamp(1.8rem, 2.8vw, 3.5rem);
    }

    .nav-item label {
        padding: 0 1.8rem;
    }
}

/* Medium desktop / laptop */
@media (max-width: 1100px) {
    :root {
        --header-height: 140px;
    }

    .header-logo-section {
        width: 180px;
    }

    .brand-logo-img {
        max-height: 100px;
    }

    .header-brand-title {
        font-size: clamp(1.6rem, 2.5vw, 2.8rem);
    }

    .nav-item label {
        padding: 0 1.3rem;
        font-size: 12px;
    }
}

/* Tablet */
@media (max-width: 900px) {
    :root {
        --header-height: 130px;
    }

    .header-logo-section {
        width: 150px;
        padding: 0.8rem;
    }

    .brand-logo-img {
        max-height: 90px;
    }

    .header-brand-title {
        font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    }

    .profile-circle {
        width: 40px;
        height: 40px;
    }

    .nav-item label {
        padding: 0 1rem;
        font-size: 0.9rem;
    }

    .feature-row {
        gap: 1.2rem;
    }
}

/* ===========================
   MOBILE ONLY - EXACT MATCH TO YOUR IMAGE
   White lines, icon sizes, orange underline - ALL FIXED
   =========================== */
@media (max-width: 768px) {
    :root {
        --header-height: 100px;
    }

    /* Crisp white borders exactly like image */
    .app-header {
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    }

    .header-wrap {
        flex-direction: row;
        height: var(--header-height);
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    }

    /* Logo - perfect size and position */
    .header-logo-section {
        width: auto;
        height: 100%;
        padding: 0;
        border-right: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .brand-logo-img {
        height: 65px;
        width: auto;
        max-width: none;
        object-fit: contain;
    }

    .header-content-col {
        flex: 0 1 auto;
        height: auto;
        display: flex;
        justify-content: flex-end;
    }

    .header-row-top {
        border-bottom: none;
        padding: 0;
        height: auto;
        width: 100%;
        justify-content: flex-end;
    }

    .header-controls {
        gap: 0.5rem;
        display: flex;
        align-items: center;
        margin-right: -0.8rem;
        /* Move much closer to right edge */
    }

    .user-logged-in-wrap {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .title-area {
        display: none;
    }

    .header-brand-title {
        display: none;
    }

    /* Uniform size for all 4 icons like support and cart */
    .cart-circle,
    .signup-circle,
    .profile-circle,
    .mobile-menu-btn {
        width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .profile-circle {
        border: 1.5px solid rgba(255, 255, 255, 0.5);
    }

    .cart-circle svg,
    .signup-circle svg {
        width: 20px !important;
        height: 20px !important;
    }

    .profile-circle svg {
        width: 24px !important;
        height: 24px !important;
    }

    .mobile-menu-btn svg {
        width: 32px !important;
        height: 32px !important;
    }

    /* Mobile navigation - orange underline FIXED */
    .header-row-bottom {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(16, 26, 46, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: 2px solid var(--color-orange);
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .nav-item {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: relative;
    }

    .nav-item a {
        padding: 1.2rem;
        width: 100%;
        font-size: 1.1rem;
        justify-content: flex-start;
        /* Align left like screenshot */
        position: relative;
        display: flex;
        align-items: center;
        color: #b0bec5;
        text-decoration: none;
    }

    .nav-item.active-tab a {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }

    /* FIXED: Orange underline for active tabs on mobile */
    .nav-item.active-tab a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background-color: var(--color-orange);
        box-shadow: 0 0 15px rgba(206, 105, 45, 1);
        z-index: 20;
    }

    /* Hero - sleek height like your image */
    .hero-stage {
        height: 140px;
        min-height: 140px;
        max-height: 140px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    }

    /* Features - icon sizes exactly like image */
    .feature-row {
        grid-template-columns: 1fr;
        padding: 1.8rem 1.2rem;
        gap: 1.2rem;
    }

    .feature-block {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0.8rem 1.2rem;
        height: 95px; /* Restored standard uniform height */
        gap: 1.2rem;
        overflow: hidden;
    }

    .icon-qs,
    .icon-custom,
    .icon-explore {
        height: 60px !important; /* Trimmed icon can share same height */
        width: auto !important;
        flex-shrink: 0;
    }

    .block-text h3 {
        font-size: 1.2rem;
        margin-bottom: 0.1rem;
    }

    .block-text p {
        font-size: 0.85rem;
        opacity: 0.9;
    }

    /* Side-by-side buttons - perfect proportions */
    .primary-actions {
        flex-direction: row !important;
        gap: 0.8rem;
        width: 90%;
        margin: 1.2rem auto 2.5rem;
        padding: 0 1.2rem;
        box-sizing: border-box;
    }

    .btn-lg-orange,
    .btn-lg-navy {
        flex: 1;
        min-width: unset;
        font-size: 1rem;
        padding: 0.8rem 0.3rem;
        border-radius: 6px;
        border: 1.5px solid rgba(255, 255, 255, 0.2);
    }
}

/* Small Mobile - perfect scaling */
@media (max-width: 480px) {
    :root {
        --header-height: 90px;
    }

    .brand-logo-img {
        height: 55px;
    }

    .cart-circle,
    .signup-circle,
    .profile-circle,
    .mobile-menu-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .cart-circle svg,
    .signup-circle svg {
        width: 18px !important;
        height: 18px !important;
    }

    .profile-circle svg {
        width: 22px !important;
        height: 22px !important;
    }

    .mobile-menu-btn svg {
        width: 30px !important;
        height: 30px !important;
    }

    .menu-icon-img {
        width: 20px;
    }

    .hero-stage {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }

    .feature-block {
        padding: 0.6rem 1rem;
        height: 85px;
        gap: 1rem;
    }

    .icon-qs,
    .icon-custom,
    .icon-explore {
        height: 50px !important;
        width: auto !important;
        flex-shrink: 0;
    }

    .block-text h3 {
        font-size: 1.1rem;
    }

    .block-text p {
        font-size: 0.8rem;
    }

    .btn-lg-orange,
    .btn-lg-navy {
        font-size: 12px;
        padding: 0.7rem 0.3rem;
    }
}

/* Very Small Mobile */
@media (max-width: 320px) {

    .btn-lg-orange,
    .btn-lg-navy {
        font-size: 0.8rem;
        padding: 0.6rem 2rem;
    }
}


.view-home {
    overflow: hidden;
    /* Added to enforce scroll-free "single look" */
}

/* Default View State - MODIFIED FOR PHP */
.view-home,
.view-quick-select,
.view-explore,
.view-custom-specs {
    animation: fadeIn 0.4s ease-out;
}

.view-quick-select {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto !important;
    padding: 0.5rem 0;
    /* Tightened padding */
    box-sizing: border-box;
}


/* ===========================
   QUICK SELECT "PAGE" STYLING
   =========================== */

.qs-refined-header {
    /* Equal gap between site header and card */
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.qs-refined-header {
    width: 95%;
    max-width: 850px;
    margin: 0 auto 0.5rem auto;
    padding-top: 1rem;
}

.qs-refined-header .explore-header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    position: relative;
    min-height: 44px;
    /* Slimmed down */
    padding: 0 !important;
}

.qs-refined-header .explore-title-area {
    flex: 0 1 auto !important;
    width: auto !important;
    text-align: center;
}

.qs-refined-header .explore-main-title {
    font-size: clamp(1.4rem, 4vw, 2rem) !important;
    margin: 0;
}

.qs-refined-header .explore-back-area {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    /* Centers perfectly with title */
    z-index: 100;
}

.qs-refined-header .explore-forward-area {
    display: none;
}

.qs-container {
    width: 95%;
    max-width: 620px;
    margin: 0 auto;
    background: transparent;
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 1.5rem 2rem 2.5rem;
    /* Restored breathing room */
}


.qs-header {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.1rem 0;
}

.qs-header h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Reuse existing form styles but tweak for page layout */
.quick-select-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0px;
}

.form-group label {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
}

/* Inputs */
.qs-select,
.qs-input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid #111;
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.qs-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.qs-input-field {
    border: 1.5px solid #111;
    outline: none;
}

.qs-input-field::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.qs-input-field:focus {
    border-color: var(--color-orange);
}

.qs-select:focus,
.qs-input-field:focus {
    border-color: var(--color-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(206, 105, 45, 0.2);
}

/* Action Buttons Container */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
}

@media (max-height: 900px) {
    .qs-refined-header {
        margin-bottom: 0.3rem !important;
        padding-top: 0.2rem !important;
    }

    .qs-refined-header .explore-header-top {
        min-height: 36px !important;
    }

    .qs-container {
        padding: 0.8rem 1.5rem !important;
        /* Restored */
    }

    .qs-container .form-group {
        margin-bottom: 0.5rem !important;
        gap: 0.6rem !important;
    }

    .qs-container .modal-actions {
        margin-top: 0.6rem !important;
    }

    .quick-select-form {
        gap: 0.5rem !important;
    }

    .quick-select-form {
        gap: 0.3rem !important;
    }

    .qs-header {
        margin-bottom: 1rem;
    }

    .quick-select-form {
        gap: 0.5rem;
    }

    .form-group {
        gap: 0.5rem;
    }

    .form-group label {
        font-size: 1.05rem;
    }

    .qs-select,
    .qs-input-field {
        padding: 0.5rem 0.8rem;
        font-size: 12px;
    }

    .btn-qs {
        padding: 0.6rem 1rem;
        min-width: 170px;
    }

    .modal-actions {
        margin-top: 0.7rem;
    }
}

.btn-qs {
    flex: 1;
    min-width: unset;
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: #8fa0b3;
    color: white;
    letter-spacing: 0.5px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Change Category button - responsive font size, never wraps */
.btn-qs.qs-btn-change {
    white-space: normal; text-align: center;
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    letter-spacing: 0.3px;
}

.btn-qs:focus {
    outline: none;
    border-color: var(--color-orange);
}

.qs-orange {
    background: var(--color-orange) !important;
}

.qs-select:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: 0 0 10px rgba(206, 105, 45, 0.3);
}

.btn-qs:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-qs:active {
    background: var(--color-orange) !important;
    border-color: #fff !important;
    transform: scale(0.98);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.3);
}

/* Very Large Screens (1440px+) */
@media (min-width: 1440px) {
    .qs-container {
        max-width: 800px;
        padding: 1.2rem 2rem;
    }

    .form-group {
        grid-template-columns: 250px 1fr;
    }

    .form-group label {
        font-size: 1.25rem;
    }

    .qs-select,
    .qs-input-field {
        padding: 1rem 1.3rem;
        font-size: 1.1rem;
    }

    .btn-qs {
        font-size: 1.15rem;
        padding: 1.1rem 3.5rem;
    }

    .btn-qs.qs-btn-change {
        font-size: 1.15rem;
    }
}

/* Ultra-Large Screens (1800px+) */
@media (min-width: 1800px) {
    .qs-container {
        max-width: 1000px;
        padding: 1.5rem 2.5rem;
    }

    .form-group {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }

    .form-group label {
        font-size: 1.35rem;
    }

    .qs-select,
    .qs-input-field {
        padding: 1.1rem 1.5rem;
        font-size: 1.2rem;
    }

    .btn-qs {
        font-size: 1.3rem;
        padding: 1.3rem 4rem;
        min-width: 260px;
    }

    .btn-qs.qs-btn-change {
        font-size: 1.3rem;
    }
}


/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   CART REFINED HEADER (Breadcrumb)
   =========================== */

.cart-refined-header {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 0.5rem auto;
    padding-top: 0.5rem;
}

.cart-refined-header .explore-header-top {
    display: flex !important;
    justify-content: center !important;
    width: 100%;
    position: relative;
    min-height: 50px;
    padding: 0 !important;
}

.cart-refined-header .explore-title-area {
    flex: 0 1 auto !important;
    width: auto !important;
    text-align: center;
}

.cart-refined-header .explore-back-area {
    position: absolute;
    left: 0;
    top: 20px;
    z-index: 100;
}

.cart-refined-header .explore-forward-area {
    display: none;
}

/* Explore Product Selection Form Focus */
.ps-selection-form select:focus,
.ps-selection-form input:focus {
    outline: none !important;
    border-color: #ff6b00 !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1) !important;
}

/* ===========================
   EXPLORE REFINED HEADER (Dual Breadcrumbs)
   =========================== */

.explore-refined-header {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 2.5rem auto;
    padding-top: 1.5rem;
}

.explore-refined-header .explore-header-top {
    display: flex !important;
    justify-content: center !important;
    width: 100%;
    position: relative;
    min-height: 80px;
    padding: 0 !important;
}

.explore-refined-header .explore-title-area {
    flex: 0 1 auto !important;
    width: auto !important;
    text-align: center;
}

.explore-refined-header .explore-back-area {
    position: absolute;
    left: 2.5rem;
    /* Align with grid padding */
    top: 40px;
    z-index: 100;
}

.explore-refined-header .explore-forward-area {
    position: absolute;
    right: 2.5rem;
    /* Align with grid padding */
    top: 40px;
    z-index: 100;
}



@media (max-width: 767px) {

    /* Header Fix: Back arrow and title non-overlap */
    .qs-refined-header .explore-header-top {
        display: flex !important;
        align-items: center;
        justify-content: center !important;
        min-height: 40px;
        position: relative;
    }

    .qs-refined-header .explore-main-title {
        font-size: 1.6rem;
    }

    .view-quick-select {
        margin-top: -60px;
    }

    .explore-header-v2 {
        margin-bottom: 0.4rem;
    }

    .view-explore,
    .view-quick-select {
        padding: 0.5rem 0.5rem 0.2rem;
    }

    .explore-container {
        margin-top: 0;
    }

    .qs-refined-header .explore-back-area {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 110;
        margin-top: 0;
    }

    .qs-refined-header .explore-title-area {
        padding: 0 50px;
        /* Space for the floating back arrow */
        width: 100%;
        text-align: center;
    }

    .qs-container {
        width: calc(100% - 32px);
        max-width: none;
        margin: 0 16px;
        padding: 0.5rem 0.6rem 0.7rem;
        background: transparent;
        backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        border-radius: 8px;
        box-sizing: border-box;
    }

    .qs-header h2 {
        font-size: 1.6rem;
        font-weight: 600;
        color: #ffffff;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 0.15rem;
    }

    .form-group label {
        text-align: left;
        font-size: 0.8rem;
        color: #ffffff;
        padding-left: 0.1rem;
        margin-bottom: 0px;
    }

    .qs-select,
    .qs-input-field {
        width: 100%;
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        box-sizing: border-box;
    }

    .modal-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.2rem;
    }

    .btn-qs {
        flex: 1;
        min-width: unset;
        font-size: 12px;
        padding: 0.3rem 0.6rem;
        min-height: 32px;
    }

    .qs-orange {
        width: 100% !important;
        flex: none !important;
        order: -1;
        /* Add to Cart on top */
    }
}

/* Tablet view (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .qs-container {
        width: 90%;
        max-width: 600px;
        margin: 2rem auto;
        padding: 1.5rem 2rem 2.5rem;
        background: transparent;
        backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }

    .form-group {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 0.8rem;
    }

    .form-group label {
        color: #ffffff;
    }

    .modal-actions {
        display: flex;
        gap: 12px;
    }

    .btn-qs {
        flex: 1;
    }
}

@media (max-width: 360px) {
    :root {
        --header-height: 85px;
    }

    .brand-logo-img {
        height: 48px;
    }

    .profile-circle {
        width: 32px;
        height: 32px;
    }

    .mobile-menu-btn {
        width: 32px;
        height: 32px;
    }

    .hero-stage {
        height: 100px;
        min-height: 100px;
        max-height: 100px;
    }

    .icon-qs,
    .icon-explore,
    .icon-custom {
        height: 28px !important;
    }
}

/* ===========================
   EXPLORE PRODUCTS V3 (4-Column Grid + Selection Card)
   =========================== */

#explore:target {
    display: block;
}

.view-explore,
.view-quick-select {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: transparent;
    padding: 1rem;
    animation: fadeIn 0.4s ease-out;
    overflow: hidden !important;
}

.explore-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.explore-header-v2 {
    width: 100%;
    margin-bottom: 2rem;
    color: white;
}

.explore-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.explore-back-area {
    flex: 1;
}

.btn-explore-back-v2 {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.btn-explore-back-v2:hover {
    transform: translateX(-5px);
}

.explore-title-area {
    flex: 2;
    text-align: center;
}

.explore-main-title {
    font-size: 2.2rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
}

.explore-forward-area {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.explore-subtitle-v2 {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Vertical Scrollable Grid for Level 0 and 1 */
.explore-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    padding: 0 2rem;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-orange) transparent;
}

.explore-grid-v2::-webkit-scrollbar {
    width: 6px;
}

.explore-grid-v2::-webkit-scrollbar-thumb {
    background: var(--color-orange);
    border-radius: 10px;
}

.explore-grid-v2::-webkit-scrollbar-track {
    background: transparent;
}

.explore-card-v3 {
    text-decoration: none;
    transition: transform 0.2s;
}

.explore-card-v3:hover {
    transform: translateY(-5px);
}

.explore-card-body-v3 {
    background: #e2e8f0;
    border-radius: 4px;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* BUG FIX: Image must be contained inside the card body.
   Use flex: 1 + min-height:0 so it fills the space ABOVE the label,
   not the full card height (which caused overflow above the card). */
.explore-card-body-v3 .card-img-area {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explore-card-body-v3 .card-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Legacy: direct img child (no wrapper) — also constrained */
.explore-card-body-v3 > img {
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: cover;
    display: block;
}

.explore-placeholder-v3 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.explore-card-label-v3 {
    flex-shrink: 0;
    width: 100%;
    background: #e2e8f0;
    color: #333;
    text-align: center;
    padding: 0.6rem;
    font-weight: 600;
    font-size: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative; /* No longer absolutely positioned — sits in flow below image */
    z-index: 1;
}

/* ===========================
   CATEGORY IMAGE CAROUSEL (Grid cards & Level-2 modal)
   =========================== */

/* Grid card carousel */
.cat-carousel {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cat-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.cat-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 13px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.cat-carousel-btn:hover {
    background: rgba(0,0,0,0.72);
}

.cat-carousel-btn.prev { left: 4px; }
.cat-carousel-btn.next { right: 4px; }

.cat-carousel-dots {
    position: absolute;
    bottom: 24px; /* Moved up more to clear labels and be clearly on the image */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 20; /* Ensure it's above arrows */
    pointer-events: none;
}

.cat-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    pointer-events: auto;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cat-carousel-dot.active {
    background: #f5820d !important;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(245,130,13,0.6);
    border-color: rgba(255,255,255,0.5);
}

/* ===========================
   LEVEL-2 MODAL FULL-WIDTH IMAGE CAROUSEL
   =========================== */

/* Full-width banner carousel replacing the old ps-image-box */
.ps-carousel-banner {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    flex-shrink: 0;
}

.ps-carousel-banner .cat-carousel-track {
    height: 220px;
}

.ps-carousel-banner .cat-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-carousel-banner .cat-carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.ps-carousel-banner .cat-carousel-dots {
    bottom: 8px;
}

.ps-carousel-banner .cat-carousel-dot {
    width: 8px;
    height: 8px;
}

/* Single static image in banner */
.ps-carousel-banner .ps-static-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.ps-carousel-banner .ps-img-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
    background: #e2e8f0;
    border-radius: 8px;
}

/* Touch/swipe support visual */
.cat-carousel-track {
    touch-action: pan-y;
    user-select: none;
}

.btn-explore-forward-v2 {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.btn-explore-forward-v2:hover {
    transform: translateX(5px);
}

.back-text {
    margin-left: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Product Selection Card (White Card) */
.product-selection-card {
    background: #f1f5f9;
    border-radius: 8px;
    width: 95%;
    max-width: 740px;
    margin: auto; /* Changed to auto for vertical & horizontal centering */
    padding: 1.5rem;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}


@media (max-height: 850px) {
    .product-selection-card {
        padding: 0.8rem 1.2rem;
        gap: 0.6rem;
    }
}

.ps-top-section {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-right: 12px;
    /* Pull image in to align with fields */
}

.ps-details {
    flex: 1;
}

.ps-product-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #0f172a;
}

@media (max-height: 850px) {
    .ps-product-name {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }
}

.ps-product-desc {
    font-size: 12px;
    line-height: 1.4;
    color: #475569;
}

@media (max-height: 850px) {
    .ps-product-desc {
        font-size: 0.85rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.ps-image-box {
    width: 280px;
    height: 140px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

@media (max-height: 850px) {
    .ps-image-box {
        width: 240px;
        height: 120px;
    }
}

@media (max-height: 700px) {
    .ps-image-box {
        width: 180px;
        height: 90px;
    }
}

.ps-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-form-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.8rem;
    align-items: center;
}

.ps-form-grid label {
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
}

.ps-form-grid select,
.ps-form-grid input {
    padding: 0.5rem 0.8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
    max-width: 500px;
    /* Prevent stretching too wide on desktop */
}

@media (max-height: 850px) {

    .ps-form-grid select,
    .ps-form-grid input {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }

    .ps-form-grid {
        gap: 0.5rem;
    }
}

.ps-form-grid select:focus,
.ps-form-grid input:focus {
    border-color: var(--color-orange);
}

.ps-footer-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}

.btn-ps-add,
.btn-ps-cart {
    background: rgba(135, 145, 160, 0.9);
    color: white;
    border: 1px solid #ffffff;
    padding: 0.6rem 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ps-add:hover,
.btn-ps-cart:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-ps-add:active,
.btn-ps-cart:active {
    background: var(--color-orange) !important;
    transform: translateY(1px);
}

/* Actions at bottom of grid - RESTORED ORIGINAL STYLES */
.explore-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
    padding: 1rem 2.5rem 1rem 1.5rem; /* Left padded less to move orange button left, Right kept at 2.5rem to revert View Cart */
}



.btn-explore-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 220px;
    letter-spacing: 0.5px;
    background: rgba(135, 145, 160, 0.9);
    color: #f8fafc;
    border: 1px solid #ffffff;
}

.btn-explore-action:active {
    background: var(--color-orange) !important;
    transform: translateY(1px);
}

/* Footer Navigation (Forward/Back) */
.explore-footer-nav {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 1rem 2.5rem;
    margin-top: -2rem;
    /* Pull up closer to grid */
}

.btn-nav-explore {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-nav-explore:active {
    border-color: var(--color-orange);
    color: var(--color-orange);
}

/* Responsive Grid fallback */
@media (max-width: 1024px) {
    .explore-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    /* === SINGLE-PAGE VIEW: FIXED LAYOUT === */
    .view-explore {
        padding: 0;
        height: calc(100dvh - var(--header-height, 100px));
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative;
    }

    /* Small screen adjustment */
    @media (max-height: 600px) {
        .view-explore {
            height: calc(100dvh - 85px);
        }
    }

    .explore-container {
        width: 100%;
        height: 100%;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
    }

    /* === COMPACT BREADCRUMB / TITLE === */
    .explore-refined-header {
        margin: 0;
        padding: 0.2rem 0;
        flex-shrink: 0;
    }

    .explore-refined-header .explore-header-top {
        min-height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center !important;
        position: relative;
    }

    .explore-refined-header .explore-back-area {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 110;
    }

    .explore-refined-header .explore-back-area svg {
        width: 24px;
        height: 24px;
    }

    .explore-refined-header .explore-title-area {
        padding: 0 45px;
        width: 100%;
        text-align: center;
    }

    .explore-main-title {
        font-size: clamp(0.9rem, 4.8vw, 1.25rem); /* Scaled down to fit one line */
        font-weight: 700;
        white-space: normal; text-align: center; /* Single line view */
        line-height: 1.2;
        margin-bottom: 0.1rem;
        padding-left: 35px; /* Offset for back arrow */
        padding-right: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .explore-subtitle-v2 {
        font-size: 0.75rem;
        margin-top: 0.1rem;
        opacity: 0.8;
        text-align: center;
    }

    .explore-header-v2 {
        margin-bottom: 0.4rem;
    }

    /* === SCROLLABLE GRID === */
    .explore-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.4rem 0.5rem;
        grid-auto-rows: 130px; /* Reduced to show 3-4 rows */
        flex: 1 1 auto !important;
        /* Force to fill space */
        min-height: 0;
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        display: grid !important;

        /* Hide Scrollbar for Mobile */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .explore-grid-v2::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }


    /* Card styling refinement for 2-column grid (Smaller) */
    .explore-card-body-v3 {
        min-height: 130px;
        padding: 0;
        border-radius: 4px;
        background: #e2e8f0;
    }

    .explore-card-label-v3 {
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
        font-weight: 700;
        color: #333;
        background: #f1f5f9;
        line-height: 1.2;
    }

    /* Carousel buttons smaller on mobile */
    .cat-carousel-btn {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    /* Level 2 modal: thinner banner on small screens */
    .ps-carousel-banner .cat-carousel-track,
    .ps-carousel-banner .ps-static-img,
    .ps-carousel-banner .ps-img-placeholder {
        height: 160px;
    }

    /* === PINNED FOOTER ACTIONS === */
    .explore-actions {
        padding: 0.8rem 0.8rem; /* Enough padding to prevent overflow */
        gap: 1.2rem; /* Clear gap between buttons */
        flex-shrink: 0;
        /* DO NOT SHRINK */
        margin-top: auto;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        background: transparent;
        border-top: none;
        z-index: 100;
        box-shadow: none;
    }


    .explore-actions .btn-explore-action {
        min-width: unset !important;
        font-size: 0.68rem !important; /* Tightened for single line fit */
        padding: 0.7rem 0.2rem !important;
        white-space: nowrap !important; /* Force single line */
        text-align: center;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        letter-spacing: 0px; /* Reduced letter spacing for fit */
    }

    /* Specific widths to give Switch button more room */
    .explore-actions .btn-switch {
        flex: 0 0 65% !important;
    }

    .explore-actions .btn-cart {
        flex: 0 0 30% !important;
    }

    /* Override any qs-orange specific mobile styles */
    .explore-actions .qs-orange {
        width: auto !important;
        flex: 1 !important;
        order: unset !important;
    }

    /* === PRODUCT SELECTION CARD (LVL 2) === */
    .product-selection-card {
        padding: 0.8rem;
        gap: 0.6rem;
        margin: 0.4rem auto;
        overflow-y: auto;
        flex: 1;
        /* Hide Scrollbar for Mobile */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .product-selection-card::-webkit-scrollbar {
        display: none;
    }


    .ps-breadcrumb .btn-explore-back-v2 svg {
        width: 20px;
        height: 20px;
    }

    .back-text {
        font-size: 0.85rem;
    }

    .ps-top-section {
        gap: 0.8rem;
    }

    .ps-product-name {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .ps-product-desc {
        font-size: 0.85rem;
    }

    /* Legacy ps-image-box kept for fallback */
    .ps-image-box {
        height: 120px;
        width: 100%;
    }

    .ps-form-grid {
        gap: 0.5rem;
    }

    .ps-form-grid label {
        font-size: 0.9rem;
    }

    .ps-form-grid select,
    .ps-form-grid input {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Fixed buttons for Product Selection Level 2 on Mobile */
    .ps-footer-actions {
        position: sticky;
        bottom: -0.8rem; /* Match card padding */
        background: #f1f5f9; /* Match card background */
        padding: 1rem 0.5rem;
        margin: 1rem -0.8rem -0.8rem -0.8rem; /* Bleed to edges of card */
        border-top: 1px solid #e2e8f0;
        z-index: 10;
        display: flex !important;
        width: calc(100% + 1.6rem);
    }

}


/* ===========================
   CUSTOM SPECIFICATIONS VIEW
   =========================== */

/* Hide Home/QS/Explore when Custom Specs or How to Buy is active */
body:has(#custom-specs:target) .view-home,
body:has(#how-to-buy:target) .view-home,
body:has(#custom-specs:target) .view-quick-select,
body:has(#custom-specs:target) .view-explore {
    display: none;
}

/* Force NO SCROLL & HIDE HEADER when how-to-buy or custom-specs is active */
body:has(#how-to-buy:target) .app-header,
body:has(#custom-specs:target) .app-header {
    display: none;
}

body:has(#how-to-buy:target),
body:has(#custom-specs:target),
body.show-why-iiis {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Allow Contact Us to scroll if content exceeds viewport */
body.show-contact-us {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

/* Hide Home when specific views are active */
body.show-why-iiis .view-home,
body.show-contact-us .view-home,
body:has(#custom-specs:target) .view-home,
body:has(#how-to-buy:target) .view-home {
    display: none;
}

/* View: About & Why IIIS */
.view-about-why {
    display: none;
    width: 100%;
    height: calc(100vh - var(--header-height));
    padding: 2rem 3rem;
    /* Balanced padding */
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
    position: relative;
    overflow-y: auto;
}

body.show-why-iiis .view-about-why {
    display: flex;
}

.about-why-container {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 2rem;
    width: 95%;
    max-width: 1000px;
    /* Further reduced from 1200px */
    margin: -5vh auto 0;
    /* Shifts content slightly up while staying centered */
}

/* About Column */
.about-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.about-title {
    font-size: 1.5rem;
    /* Further reduced from 1.75rem */
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 0;
}

/* Orange underlines removed */

.why-title {
    font-size: 1.5rem;
    /* Further reduced from 1.75rem */
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 0;
}

/* Orange underlines removed for why-title */

.about-content {
    font-size: 0.9rem;
    /* Reduced from 0.95rem */
    line-height: 1.5;
    /* Reduced from 1.6 */
    color: rgba(255, 255, 255, 0.85);
}

.about-content p {
    margin-bottom: 1rem;
}

.about-content strong {
    color: #ffffff;
    font-weight: 700;
}

/* Why Column */
.why-column {
    display: flex;
    flex-direction: column;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.why-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    /* Subtly reduced gap */
    background: rgba(255, 255, 255, 0.05);
    /* Reverted to transparent glassy color */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Reverted border */
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    /* Reduced from 0.9rem 1.4rem */
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Orange accent line removed */


.why-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Orange line on hover removed */

.why-card-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.why-card-icon img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 0 6px rgba(206, 105, 45, 0.3));
}

.why-card-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.why-card-text p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.7);
}

/* No close button needed */

/* View: Contact Us - Aggressively Compact for Single Page View */
.view-contact-us {
    display: none;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    padding: 3vh 2rem;
    /* Ensure gap above and below */
    animation: fadeIn 0.4s ease-out;
}

body.show-contact-us .view-contact-us {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.contact-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0.8rem;
}

.contact-main-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.contact-support-box {
    padding-right: 1.5rem;
}

.contact-address-box {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    position: relative;
    padding-bottom: 0.2rem;
}

.contact-section-title::after {
    display: none;
    /* Removed the orange underline */
}

.support-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.support-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333333;
    font-size: 0.8rem;
}

.support-item svg {
    flex-shrink: 0;
}

.wa-icon-link {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.wa-icon-link:hover {
    transform: scale(1.1);
}

.address-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #444444;
    font-size: 0.75rem;
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a1a1a;
    /* Dark header text */
}

/* FAQ Section */
.contact-faq-section {
    padding-top: 1.2rem;
    /* Reduced from 2rem */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 0.8rem;
    /* Reduced from 1rem */
}

.faq-heading {
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.2rem;
}

.faq-question {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    transition: background 0.2s;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.8rem;
}

.faq-question:hover {
    background: rgba(0, 0, 0, 0.03);
}

.faq-toggle {
    font-size: 1.2rem;
    color: var(--color-orange);
    transition: transform 0.3s;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s;
    background: rgba(255, 255, 255, 0.4);
    /* Lighter background for answer */
    color: #333333;
    /* Darker text */
    font-size: 0.9rem;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 1rem 1.2rem;
    overflow-y: auto;
}

.faq-answer p {
    margin-bottom: 0.8rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Height-based Compactness for Contact Us */
@media (max-height: 750px) {
    .view-contact-us {
        padding: 2vh 1rem;
    }

    .contact-main-card {
        padding: 0.8rem 1.2rem;
    }

    .contact-section-title {
        font-size: 0.9rem;
    }

    .support-item,
    .address-content {
        font-size: 0.7rem;
    }

    .faq-question {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Responsive for Contact Us */
@media (max-width: 900px) {
    .contact-top-row {
        grid-template-columns: 1fr;
    }

    .contact-support-box {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .contact-address-box {
        padding-left: 0;
        border-left: none;
        /* Remove separator on mobile */
    }

    .view-contact-us {
        padding: 1rem;
    }
}

/* Responsive for View About Why */
@media (max-width: 1100px) {
    .about-why-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 2rem;
        overflow-y: auto;
        height: 100%;
        scrollbar-width: none;
    }

    .about-why-container::-webkit-scrollbar {
        display: none;
    }

    .view-about-why {
        padding: 1.5rem;
        height: calc(100vh - var(--header-height));
        align-items: flex-start;
    }

    .about-title,
    .why-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 600px) {
    .view-about-why {
        padding: 1.5rem;
    }

    .about-why-container {
        padding-top: 3rem;
    }

    .why-card {
        padding: 1rem;
        gap: 1rem;
    }

    .why-card-icon {
        width: 40px;
        height: 40px;
    }

    .why-card-text h3 {
        font-size: 1.05rem;
    }

    .why-card-text p {
        font-size: 0.85rem;
    }
}

#custom-specs:target {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.view-custom-specs {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    margin-top: 0;
    background: transparent;
    padding: 0.5rem 1rem;
    animation: fadeIn 0.4s ease-out;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
}

.cs-header-wrap {
    text-align: center;
    margin-bottom: 0.5rem;
}

.cs-header-wrap h2 {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Custom Specs Refined Header (to match Quick Select style) */
.cs-refined-header {
    width: 95%;
    max-width: 850px;
    margin: 0 auto 0.2rem auto;
    padding-top: 1rem;
}

.cs-refined-header .explore-header-top {
    display: flex !important;
    justify-content: center !important;
    width: 100%;
    position: relative;
    min-height: 60px;
    padding: 0 !important;
}

.cs-refined-header .explore-title-area {
    flex: 0 1 auto !important;
    width: auto !important;
    text-align: center;
}

.cs-refined-header .explore-back-area {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.cs-refined-header .explore-forward-area {
    display: none;
}

.cs-card {
    background: #e2e5e9;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    width: 95%;
    max-width: 620px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.cs-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0px;
}

.form-row label {
    font-size: 12px;
    color: #1e293b;
    font-weight: 500;
    text-align: left;
}

.cs-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    color: #334155;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cs-input:focus {
    outline: none !important;
    border-color: #ff6b00 !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1) !important;
}

/* File Upload Row Styling */
.file-upload-row {
    margin-top: 0.4rem;
    background: #b0b5bb;
    border-radius: 6px;
    padding: 5px 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
    min-height: 40px;
}

.file-label {
    padding: 0;
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 500;
}

.file-input-wrapper {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    position: relative;
    cursor: pointer;
    margin: 0;
    padding: 0.35rem 0.8rem; /* Reduced height */
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #374151;
    font-size: 0.85rem;
}

.file-input-wrapper>span {
    flex-grow: 1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.chevron-right {
    color: #374151;
    opacity: 0.7;
}

.upload-icon {
    flex-shrink: 0;
    margin-right: 0.6rem;
}

.cs-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Buttons */
.cs-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.8rem;
}

.btn-cs {
    padding: 0.7rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    min-width: 180px;
    transition: all 0.2s;
    background: #8fa0b3;
    color: white;
}

/* Hover State */
.btn-cs:hover {
    filter: brightness(1.1);
}

/* ACTIVE STATE - ORANGE */
.btn-cs:active,
.cs-add:active {
    background: var(--color-orange) !important;
    transform: translateY(1px);
}

/* Specific button override if needed, but per request both start neutral */
.cs-add {
    background: #8fa0b3;
}

/* Responsive adjustments for the form */
@media (max-width: 768px) {
    .view-custom-specs {
        padding: 0.5rem;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .cs-card {
        padding: 0.8rem;
        background: #e2e5e9;
        width: 100%;
        margin-top: 0.1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .cs-form {
        gap: 0.4rem;
    }

    .cs-header-wrap h2 {
        font-size: 1.2rem;
        font-style: italic;
    }

    .cs-header-wrap {
        margin-bottom: 0.2rem;
    }

    .form-row,
    .form-row-split,
    .file-upload-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .form-row label {
        font-size: 0.85rem;
        color: #1e293b;
        padding-left: 0.2rem;
    }

    .cs-input {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .file-label {
        color: #ffffff;
        padding-bottom: 0.1rem;
        padding-top: 0.3rem;
        font-size: 0.8rem;
    }

    .cs-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.8rem;
        margin-top: 1rem;
        width: 100%;
    }

    .btn-cs {
        flex: 1 !important;
        min-width: unset !important;
        padding: 0.65rem 0.5rem !important;
        font-size: 0.9rem !important;
        white-space: normal; text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        box-sizing: border-box;
    }

    /* Force the orange button to share space in this specific layout */
    .cs-actions .btn-cs.qs-orange {
        width: auto !important;
        flex: 1 !important;
        margin: 0 !important;
    }
}

/* ===========================
   CUSTOM SPECS - LARGE SCREEN OVERRIDES
   (Must come AFTER base .cs-card styles)
   =========================== */

@media (min-width: 1400px) {
    .cs-card {
        max-width: 800px;
        /* Further reduced from 900px */
        padding: 1.2rem 2rem;
    }

    .cs-header-wrap h2 {
        font-size: 2.6rem;
    }

    .cs-form {
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 250px 1fr;
    }

    .form-row label {
        font-size: 1.25rem;
    }

    .cs-input {
        padding: 1rem 1.3rem;
        font-size: 1.1rem;
    }

    .btn-cs {
        font-size: 1.15rem;
        padding: 1.1rem 3.5rem;
    }
}

@media (min-width: 1800px) {
    .cs-card {
        max-width: 1000px;
        /* Further reduced from 1100px */
        padding: 1.5rem 2.5rem;
    }

    .cs-header-wrap h2 {
        font-size: 3rem;
    }

    .cs-form {
        gap: 1.2rem;
    }

    .form-row {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }

    .form-row label {
        font-size: 1.35rem;
    }

    .cs-input {
        padding: 1.1rem 1.5rem;
        font-size: 1.2rem;
    }

    .btn-cs {
        font-size: 1.3rem;
        padding: 1.3rem 4rem;
        min-width: 260px;
    }
}

/* Stop body and html scrolling when login is active */
html:has(#login:target),
body:has(#login:target) {
    overflow: hidden !important;
    height: 100% !important;
}

/* ===========================
   LOGIN VIEW
   =========================== */
.view-login,
.view-signup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    /* Above header (100) and mobile menu (1000) */
    overflow-y: auto;
    /* Use the global background image to cover everything underneath */
    background: url('assets/background image.png') no-repeat center center fixed;
    background-size: cover;
}

/* Show when target is active */
.view-login:target,
.view-signup:target,
#forgot-password:target,
#reset-password:target {
    display: flex;
    flex-direction: column;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Optional: Slight backdrop to make text readable if bg is busy */
    /* background: rgba(0, 0, 0, 0.2); 
    border-radius: 10px; */
}

.login-brand {
    position: relative;
    width: 100%;
    height: 0;
    /* No height, elements will ignore it */
    margin: 0;
    overflow: visible;
    z-index: 10;
}

.login-logo {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    height: 125px;
    width: auto;
    max-width: none;
    object-fit: contain;
    z-index: 20;
}

.login-title {
    font-size: 1.6rem;
    /* Match signup */
    font-weight: 600;
    color: #fff;
    margin-top: 105px;
    /* Increased to prevent overlap */
    margin-bottom: 2rem;
    /* Reduced from 3rem for more compact look */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.login-input-group {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 38px;
    /* Match signup input height */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.login-input-group:focus-within {
    border-color: var(--color-orange);
    box-shadow: 0 0 10px rgba(206, 105, 45, 0.5);
    background: #fff;
}

.input-icon {
    flex-shrink: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-orange);
    /* Start with orange, change via specific classes if needed */
}

.input-icon svg {
    width: 28px;
    height: 28px;
}

.input-icon-right svg {
    width: 26px;
    height: 26px;
}

/* Adjust specific icon colors based on screenshot */
.login-input-group:first-child .input-icon svg {
    stroke: #ce692d;
    /* Orange phone icon */
}

.login-input-group:nth-child(2) .input-icon svg {
    stroke: #ce692d;
    /* Orange lock icon */
}

.input-icon-right {
    padding: 0 12px;
    height: 100%;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.input-icon-right.show-toggle {
    display: flex;
    /* Shown when typing */
}

.input-icon-right svg {
    stroke: #000000;
    /* Black eye icon by default */
    transition: stroke 0.2s;
}

.input-icon-right:hover svg,
.input-icon-right:active svg {
    stroke: #ce692d;
    /* Orange on hover/click */
}


.login-input {
    flex: 1;
    min-width: 0;
    /* Prevents flex flex-grow issues causing overlap */
    border: none;
    outline: none;
    background: transparent;
    height: 100%;
    font-size: 1rem;
    color: #333;
    padding-left: 0.5rem;
}

.login-input::placeholder {
    color: #888;
}

/* Hide default browser password reveal/clear buttons */
.login-input::-ms-reveal,
.login-input::-ms-clear {
    display: none;
}

.login-input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
}

.login-options {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: -0.2rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 12px;
    color: #ddd;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 3px;
    position: relative;
    display: inline-block;
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.btn-login-submit {
    background: var(--color-navy);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    /* Match signup */
    font-size: 12px;
    /* Match signup */
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    margin-top: 0.2rem;
    /* Match signup */
    letter-spacing: 0.5px;
}

.btn-login-submit:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn-login-submit:active {
    background: var(--color-orange) !important;
    border: none !important;
    transform: translateY(-1px);
}

/* ===========================
   LOGIN VIEW RESPONSIVENESS
   =========================== */
@media (max-width: 768px) {

    /* Center the login/signup overlay both axes, shift content up */
    .view-login,
    .view-signup {
        justify-content: center;
        align-items: center;
        padding-bottom: 15vh;
    }

    .login-container {
        padding: 0.5rem 1rem;
        width: 90%;
        margin: auto;
        align-items: center;
        text-align: center;
    }

    .login-title {
        font-size: 1.8rem;
        margin-top: 100px;
        text-align: center;
        width: 100%;
    }

    .login-brand {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .login-logo {
        height: 110px !important;
        top: -25px !important;
    }

    .login-form {
        align-items: center;
    }

    .login-options {
        justify-content: flex-start;
        width: 100%;
    }

    .btn-login-submit {
        font-size: 0.9rem;
        padding: 0.5rem;
        width: 100%;
    }

    .forgot-password {
        text-align: center;
        width: 100%;
        display: block;
    }

    .login-footer {
        text-align: center;
        width: 100%;
    }

    .login-footer p {
        text-align: center;
    }

    .signup-container {
        align-items: center;
        text-align: center;
        width: 90%;
        margin: auto;
    }

    .signup-title {
        text-align: center;
        width: 100%;
    }

    .signup-footer {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
        width: 95%;
        margin: auto;
    }

    .login-title {
        font-size: 1.6rem;
        margin-top: 85px;
        text-align: center;
    }

    .login-logo {
        height: 100px !important;
        top: -20px !important;
    }

    .signup-container {
        width: 95%;
        margin: auto;
    }
}

/* Ultra-wide support */
@media (min-width: 1800px) {
    .login-container {
        max-width: 500px;
    }

    .login-title,
    .signup-title {
        font-size: 1.8rem;
        /* Kept from getting too big/overlapping */
        margin-top: 100px;
        /* Adjusted to prevent overlap */
    }

    .login-logo {
        height: 120px !important;
        /* Reduced for big screens too */
        top: -40px !important;
    }
}

.forgot-password {
    text-align: center;
    color: #ccc;
    text-decoration: none;
    font-size: 12px;
    margin-top: 1rem;
    display: block;
}

.forgot-password:hover,
.forgot-password:active {
    color: var(--color-orange);
    text-decoration: underline;
}

.login-footer {
    margin-top: 1.5rem;
    /* Moved up from 4rem */
    text-align: center;
    color: #ddd;
    font-size: 12px;
}

.verify-otp {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.3rem;
    transition: color 0.2s;
}

.verify-otp:hover,
.verify-otp:active {
    color: var(--color-orange);
    text-decoration: underline;
}

/* ===========================
   HEADER - SIGNUP ICON
   =========================== */
.user-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.signup-icon-link {
    text-decoration: none;
}

.signup-circle {
    flex-shrink: 0;
    width: clamp(36px, 0.35 * var(--header-height), 60px);
    height: clamp(36px, 0.35 * var(--header-height), 60px);
    border-radius: 50%;
    background-color: var(--color-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s;
}

.signup-circle:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

.signup-circle svg {
    width: 55%;
    height: 55%;
}

/* ===========================
   SIGN UP VIEW
   =========================== */

/* Stop body scrolling when signup is active */
html:has(#signup:target),
body:has(#signup:target) {
    overflow: hidden !important;
    height: 100% !important;
}

/* Show when target is active */
/* Consolidated at line 2372 */

.signup-container {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 1.5rem;
    /* Further reduced from 1rem */
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The specific logo adjustment has been applied globally */
/* .view-signup .login-logo block removed to prevent conflicts, global .login-logo handles it */

.signup-title {
    font-size: 1.6rem;
    /* Reduced from 1.8rem */
    font-weight: 600;
    color: #fff;
    margin-top: 75px;
    /* Restored some gap to not squash the title into the logo */
    margin-bottom: 0.8rem;
    /* Reduced from 1.5rem */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

.signup-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signup-input-group {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 38px;
    /* Further reduced from 42px */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.signup-input-group:focus-within {
    border-color: var(--color-orange);
    box-shadow: 0 0 10px rgba(206, 105, 45, 0.5);
    background: #fff;
}

/* OTP Row — input + SEND OTP button */
.otp-row .login-input {
    flex: 1;
}

.btn-send-otp {
    background: var(--color-navy);
    color: white;
    border: none;
    padding: 0 0.7rem;
    height: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: normal; text-align: center;
    flex-shrink: 0;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-send-otp:hover {
    filter: brightness(1.12);
}

.btn-send-otp:active {
    background: var(--color-orange) !important;
}

.btn-send-otp:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    filter: none;
}

#signup-otp-msg {
    transition: all 0.3s ease;
}

/* SUBMIT button — navy default, orange on click */
.btn-signup-submit {
    background: var(--color-navy);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    /* Further reduced from 0.7rem */
    font-size: 12px;
    /* Further reduced from 1rem */
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    margin-top: 0.2rem;
    /* Further reduced from 0.3rem */
    letter-spacing: 0.5px;
}

.btn-signup-submit:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn-signup-submit:active {
    background: var(--color-orange) !important;
    border: none !important;
    transform: translateY(-1px);
}

/* Hide default browser password reveal for signup fields */
.signup-password::-ms-reveal,
.signup-password::-ms-clear {
    display: none;
}

.signup-password::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
}

/* Signup footer */
.signup-footer {
    margin-top: 0.6rem;
    /* Further reduced from 1rem */
    text-align: center;
    color: #ddd;
    font-size: 0.85rem;
    /* Further reduced from 0.9rem */
}

/* Login link — gray default, orange glow on hover (matches other links) */
.signup-login-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.3rem;
    transition: color 0.2s;
}

.signup-login-link:hover,
.signup-login-link:active {
    color: var(--color-orange);
    text-decoration: underline;
}

/* ===========================
   SIGN UP VIEW RESPONSIVENESS
   =========================== */
@media (max-width: 768px) {
    .signup-container {
        padding: 1rem 1rem;
        width: 90%;
        margin: auto;
    }

    .view-signup .login-logo {
        height: 90px !important;
        top: -15px !important;
    }

    .signup-title {
        font-size: 1.4rem;
        margin-top: 70px;
        margin-bottom: 0.8rem;
    }

    .btn-signup-submit {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .signup-input-group .input-icon svg {
        width: 30px !important;
        height: 30px !important;
        stroke-width: 2.5px !important;
    }

    .signup-input-group .login-input {
        font-size: 0.9rem;
        /* Slightly smaller input text/placeholder for medium screens */
    }
}

@media (max-width: 480px) {
    .signup-container {
        padding: 1rem 0.25rem;
        width: 98%;
        margin: auto;
    }

    .view-signup .login-logo {
        height: 70px !important;
        top: -10px !important;
    }

    .signup-title {
        font-size: 1.3rem;
        margin-top: 60px;
        margin-bottom: 0.6rem;
    }

    .signup-input-group {
        height: 38px;
        /* Restored to standard height so fields aren't too big */
    }

    .signup-input-group .input-icon {
        width: 45px;
    }

    .signup-input-group .input-icon svg {
        width: 32px !important;
        height: 32px !important;
        stroke-width: 2.8px !important;
    }

    .signup-input-group .login-input {
        font-size: 0.75rem;
        /* Small enough so "+91 Mobile Number..." fits 320px */
        padding-left: 0.25rem;
    }

    .signup-input-group .btn-send-otp {
        padding: 0 0.5rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 500px) {
    .view-signup .login-logo {
        height: 100px !important;
        top: -40px !important;
    }
}

/* Ultra-wide support */
@media (min-width: 1800px) {
    .signup-container {
        max-width: 500px;
    }

    .signup-title {
        font-size: 1.8rem;
        margin-top: 80px;
    }
}

/* ===========================
   HOW TO BUY - FIXED TIMELINE
   Drop this into your existing CSS, replacing the htb section
   =========================== */

.view-how-to-buy {
    display: none;
    min-height: 100vh;
    padding: 2rem 1rem;
    animation: fadeIn 0.4s ease-out;
}

#how-to-buy:target,
.view-how-to-buy.standalone {
    display: flex;
    flex-direction: column;
}

.htb-container {
    width: 95%;
    max-width: 680px;
    margin: 3vh auto;
    color: white;
    display: flex;
    flex-direction: column;
}

.htb-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

/* ── TIMELINE WRAPPER ── */
.htb-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    /* Left edge aligns with center of 50px circle */
    padding-left: 0;
}

/* The continuous orange vertical line */
.htb-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    /* center of 50px circle (25px) - 1px */
    top: 25px;
    /* start at center of first circle */
    bottom: 25px;
    /* end at center of last circle */
    width: 3px;
    background: var(--color-orange);
    z-index: 0;
}

/* ── EACH STEP ── */
.htb-step {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    position: relative;
    padding: 0.6rem 0 1.4rem 0;
}

/* ── CIRCLE MARKER ── */
.htb-step-marker {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.htb-step-circle {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 40% 38%, #f5944e 0%, #d9621c 50%, #c05515 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 6px #ffffff,
        0 0 0 16px var(--color-orange),
        0 5px 16px rgba(0, 0, 0, 0.45);
    border: none;
    position: relative;
}

.htb-step-circle svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 1.8;
    fill: none;
}

/* Step number badge */
.htb-step-num {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #fff;
    color: var(--color-orange);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 1.5px solid var(--color-orange);
    z-index: 3;
}

/* ── STEP CONTENT ── */
.htb-step-content {
    padding-top: 0.6rem;
    flex: 1;
}

.htb-step-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.htb-step-content p {
    font-size: 12px;
    line-height: 1.55;
    color: #e2e8f0;
    margin-bottom: 0.3rem;
}

.htb-step-content ul {
    margin: 0.4rem 0 0.4rem 0;
    padding-left: 1.1rem;
    color: #e2e8f0;
    font-size: 0.92rem;
}

.htb-step-content ul li {
    margin-bottom: 0.25rem;
    line-height: 1.45;
}

/* ── CONNECTOR SEGMENT between circles (orange dashed tick-marks) ── */
/* These are the short horizontal orange dashes that appear on the line
   between circles in the reference image — achieved via pseudo on each step */
.htb-step:not(:last-child) .htb-step-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 2px);
    width: 3px;
    /* Height bridges from bottom of this circle to top of next */
    height: 100%;
    /* will be overridden per-step if needed */
    background: transparent;
    border-left: 3px dashed rgba(206, 105, 45, 0.45);
    z-index: 1;
}

/* Footer wrap */
.htb-footer-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.htb-docs-note {
    font-weight: 600;
    color: #fff !important;
    font-size: 0.88rem;
    margin: 0;
}

.htb-social-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .htb-container {
        width: 100%;
        padding: 0 0.5rem;
        margin-top: 1rem;
    }

    .htb-title {
        font-size: 1.6rem;
    }

    .htb-step-marker,
    .htb-step-circle {
        width: 42px;
        height: 42px;
    }

    .htb-timeline::before {
        left: 20px;
        top: 21px;
        bottom: 21px;
    }

    .htb-step-circle svg {
        width: 18px;
        height: 18px;
    }

    .htb-step-content h3 {
        font-size: 1.05rem;
    }

    .htb-step-content p,
    .htb-step-content ul {
        font-size: 0.85rem;
    }

    .htb-step {
        gap: 1rem;
        padding-bottom: 1.2rem;
    }
}

/* ===========================
   VIEW CART PAGE
   =========================== */

.view-cart {
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    padding: 0.2rem 1rem 0.5rem;
    animation: fadeIn 0.4s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cart-container {
    width: 98%;
    max-width: 850px;
    /* Reduced from 900px */
    margin: 0 auto;
}

/* Header */
.cart-header-section {
    text-align: center;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
}

.cart-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Empty State */
.cart-empty-msg {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: #94a3b8;
    text-align: center;
}

.cart-empty-icon {
    opacity: 0.5;
}

.cart-empty-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #cbd5e1;
    margin: 0;
}

.cart-empty-sub {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.btn-go-shop {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.8rem 2.5rem;
    background: var(--color-orange);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: filter 0.2s;
}

.btn-go-shop:hover {
    filter: brightness(1.1);
}

/* Main Cart Card */
.cart-card {
    background: #dde3eb;
    border-radius: 6px;
    overflow-x: auto;
    /* Changed from hidden for table responsiveness */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #1e293b;
}

.cart-table thead tr {
    background: #c8d0db;
}

.cart-table thead th {
    padding: 0.4rem 0.6rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
    border-bottom: 2px solid #b0bac6;
}

.cart-table tbody tr {
    border-bottom: 1px solid #c0cad5;
    transition: background 0.15s;
}

.cart-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
}

.cart-table td {
    padding: 0.4rem 0.6rem;
    vertical-align: middle;
}

.cart-sr {
    font-weight: 700;
    color: #334155;
    width: 48px;
}

.cart-item-name {
    font-weight: 600;
    color: #0f172a;
}

.cart-thickness {
    font-weight: 600;
    color: #334155;
}

.cart-variant {
    color: #475569;
}

.cart-qty {
    color: #334155;
    font-weight: 500;
}

.cart-actions {
    white-space: normal; text-align: center;
}

.btn-cart-edit,
.btn-cart-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 0.2rem;
    transition: opacity 0.2s;
}

.btn-cart-edit {
    color: var(--color-orange);
}

.btn-cart-delete {
    color: #dc2626;
}

.btn-cart-edit:hover,
.btn-cart-delete:hover {
    opacity: 0.75;
}

.cart-action-sep {
    color: #94a3b8;
    margin: 0 0.15rem;
    font-size: 0.85rem;
}

/* Subtotal Row */
.cart-table tfoot tr {
    background: #c8d0db;
    border-top: 2px solid #b0bac6;
}

.cart-table tfoot td {
    padding: 0.3rem 1rem;
    font-weight: 700;
    color: #0f172a;
}

/* Pagination */
.cart-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    background: #c8d0db;
    border-top: 1px solid #b0bac6;
}

.cart-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 0.4rem;
    border: 1.5px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.cart-page-btn:hover {
    background: #e2e8f0;
    border-color: var(--color-orange);
    color: var(--color-orange);
}

.cart-page-btn.active {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: #fff;
}

/* Delivery Location */
.cart-delivery {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 1rem;
    /* Reduced padding */
    background: #1e3a52;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.delivery-icon-wrap {
    width: 32px;
    height: 32px;
    background: var(--color-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.delivery-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.delivery-label {
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
}

.delivery-address {
    color: #94b8d0;
    font-size: 0.85rem;
}

.btn-delivery-edit {
    background: none;
    border: none;
    color: var(--color-orange);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}

.btn-delivery-edit:hover {
    opacity: 0.75;
}

.btn-delivery-share {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
    transition: background 0.2s;
}

.btn-delivery-share:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Submit Row & Logistics Note */
.cart-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 1rem;
    background: #dde3eb;
    border-top: 1px solid #b0bac6;
}

.cart-logistics-note {
    font-size: 0.85rem;
    color: #475569;
    font-style: italic;
}

.btn-submit-quote {
    background: var(--color-orange);
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-submit-quote:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(206, 105, 45, 0.45);
}

.btn-submit-quote:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* ==========================================
   CART MODALS (Delivery / Edit Item)
   ========================================== */
.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.cart-modal {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2rem;
    width: 95%;
    max-width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: #1e293b;
    animation: fadeIn 0.25s ease-out;
}

.cart-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--color-navy);
    flex-shrink: 0;
}

.cart-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    padding-right: 5px;
}

.cart-modal-body label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    margin-top: 0.4rem;
}

.cart-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12px;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.cart-modal-input:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 3px rgba(206, 105, 45, 0.15);
}

.cart-modal-input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.cart-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.btn-modal-cancel {
    padding: 0.6rem 1.5rem;
    border: 1.5px solid #94a3b8;
    background: transparent;
    color: #475569;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
}

.btn-modal-save {
    padding: 0.6rem 1.5rem;
    background: var(--color-orange);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s;
}

.btn-modal-save:hover {
    filter: brightness(1.1);
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.cart-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: normal; text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
}

.cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.cart-toast-success {
    background: #1e3a2e;
    border-left: 4px solid #22c55e;
}

.cart-toast-error {
    background: #3a1e1e;
    border-left: 4px solid #ef4444;
}

.cart-toast-info {
    background: #1e2d3a;
    border-left: 4px solid #3b82f6;
}

/* ==========================================
   CART BADGE on VIEW CART buttons
   ========================================== */
.qs-cart-badge {
    display: inline-block;
    font-size: 0.85em;
    font-weight: 700;
    color: #fff;
    opacity: 0.9;
    margin-left: 2px;
    letter-spacing: 0;
}

/* ==========================================
   CART PAGE RESPONSIVE
   ========================================== */
@media (max-width: 600px) {

    .cart-table thead th,
    .cart-table tbody td,
    .cart-table tfoot td {
        padding: 0.5rem 0.5rem;
        font-size: 0.82rem;
    }

    .cart-delivery {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .cart-modal {
        padding: 1.2rem;
    }

    .btn-submit-quote {
        width: 100%;
        text-align: center;
    }

    .cart-submit-row {
        justify-content: stretch;
    }
}

/* Empty row inside cart table */
.cart-empty-row {
    text-align: center;
    padding: 2.2rem 1rem !important;
    color: #64748b;
    font-size: 0.97rem;
    background: #f0f4f8;
}

.cart-empty-row-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cart-empty-link {
    color: var(--color-orange);
    font-weight: 700;
    text-decoration: none;
}

.cart-empty-link:hover {
    text-decoration: underline;
}

/* Specifications Attached Display */
.cart-spec-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.spec-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.spec-attached {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.attached-text {
    color: #22c55e;
    font-weight: 700;
    font-size: 12px;
}

.spec-check-icon {
    flex-shrink: 0;
}

.delivery-phone {
    font-size: 0.85rem;
    color: #94b8d0;
    font-style: italic;
    margin-top: 0.1rem;
}

.ps-breadcrumb {
    padding: 0 0 12px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
    color: #475569;
    /* ADD THIS */
}

.ps-breadcrumb a {
    color: #475569;
    /* ADD THIS */
    text-decoration: none;
}

.cart-icon-link {
    text-decoration: none;
    position: relative;
}

.cart-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--color-orange);
    /* orange default */
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cart-circle:hover {
    background-color: var(--color-navy);
    /* navy on hover */
    transform: scale(1.05);
}

.cart-header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    /* white background */
    color: var(--color-orange);
    /* orange number */
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-orange);
}

@media (max-width: 768px) {
    /* === Level 2: Product Detail / Selection Card (Mobile Only) === */
    /* === Level 2: Product Detail / Selection Card (Mobile Only) === */
    .product-selection-card {
        width: 94%; 
        max-width: 400px;
        margin: 0 auto !important;
        border-radius: 12px;
        padding: 10px 10px 2px 10px !important; /* ULTRA TIGHT BOTTOM */
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
        max-height: calc(100vh - 105px); /* Room for header + external padding */
        overflow-y: auto;
        background: #ffffff;
        position: relative;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        gap: 0;
    }

    .ps-breadcrumb {
        padding: 0 5px 4px 5px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 6px;
        font-size: 0.75rem;
        color: #475569;
        text-align: left;
    }

    .ps-top-section {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 4px;
        padding: 0 5px;
    }

    .ps-product-name {
        font-size: 1rem;
        font-weight: 800;
        margin: 0;
        line-height: 1.1;
        color: #1e293b;
        text-align: left;
    }

    .ps-image-box {
        width: 92%;
        margin: 6px auto;
        height: 120px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        overflow: hidden;
    }

    .ps-img-placeholder {
        padding: 10px;
        font-size: 0.85rem;
        color: #94a3b8;
    }

    .ps-form-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        padding-bottom: 4px;
    }

    .ps-form-grid label {
        margin: 1px 0 !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        color: #334155;
        text-align: center !important;
        width: 100%;
    }

    .ps-form-grid select,
    .ps-form-grid input {
        padding: 4px 10px !important;
        font-size: 0.85rem !important;
        height: 32px !important;
        width: 85% !important;
        margin: 0 auto 5px auto !important;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        color: #1e293b;
        background: #fff;
    }

    .ps-form-grid input#ps-quantity {
        margin-bottom: 0 !important;
    }

    .ps-footer-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 10px 5px 10px 5px !important; /* Balanced internal padding */
        margin: 15px 0 0 0 !important; /* MOVED LOWER - increased margin-top */
        border-top: 1px solid #f1f5f9;
        background: transparent;
    }

    .btn-ps-add,
    .btn-ps-cart {
        flex: 1 !important;
        height: 40px !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        text-transform: uppercase;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 4px !important;
    }

    /* PERFECT CENTERING WITH EXTERNAL GAPS */
    .explore-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: calc(100vh - 65px) !important; 
        padding: 10px 0 !important; /* ADD BREATHING ROOM AT TOP/BOTTOM */
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .btn-ps-add {
        background: var(--color-orange) !important;
        color: #fff !important;
    }

    .btn-ps-cart {
        background: #64748b !important;
        color: #fff !important;
    }

    /* Reverted global overrides that affected Level 0 and Level 1 */
}

@media (max-width: 768px) {
    .back-text {
        font-size: 0.9rem;
        white-space: normal; text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
/* .view-explore {
        height: auto !important;
        overflow-y: auto !important;
        min-height: calc(100vh - var(--header-height));
    }

    .explore-container {
        height: auto !important;
    } */

}

.header-row-bottom.mobile-open {
    display: flex !important;
    flex-direction: column;
    height: auto;
    position: fixed;
    top: var(--header-height);
    left: 0 !important;
    width: 100vw !important;
    background: rgba(16, 26, 46, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid var(--color-orange);
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   CART - MOBILE RESPONSIVE (replaces table with cards)
   ========================================== */
@media (max-width: 768px) {

    .cart-title {
        font-size: 1.4rem;
    }

    /* Hide table headers on mobile */
    .cart-table thead {
        display: none;
    }

    /* Each row becomes a card */
    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tbody tr {
        background: #fff;
        border-radius: 6px;
        margin: 0.4rem 0.6rem;
        padding: 0.6rem;
        border: 1px solid #c0cad5;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        position: relative;
    }

    .cart-table tbody tr:hover {
        background: #fff;
    }

    /* Hide SR number on mobile */
    .cart-table td.cart-sr {
        display: none;
    }

    /* Each cell gets a label before it */
    .cart-table td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
        margin-bottom: 0.15rem;
    }

    .cart-table td {
        padding: 0.2rem 0;
        border: none;
        font-size: 0.85rem;
    }

    .cart-item-name {
        font-size: 1rem;
        font-weight: 700;
        color: #0f172a;
        padding-bottom: 0.4rem !important;
        border-bottom: 1px solid #e2e8f0 !important;
        margin-bottom: 0.3rem;
    }

    /* Actions row - right aligned */
    .cart-table td.cart-actions {
        text-align: right;
        padding-top: 0.5rem !important;
        border-top: 1px solid #e2e8f0 !important;
        margin-top: 0.3rem;
    }

    .cart-table td.cart-actions::before {
        display: none;
    }

    /* Tfoot subtotal */
    .cart-table tfoot tr {
        display: block;
        margin: 0;
        border-radius: 0;
    }

    .cart-table tfoot td {
        display: block;
        padding: 0.4rem 1rem;
        text-align: right !important;
    }

    /* Delivery section */
    .cart-delivery {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.4rem 0.6rem;
    }

    .delivery-info {
        flex: 1;
        min-width: 0;
    }

    .delivery-label {
        font-size: 0.9rem;
    }

    .delivery-address,
    .delivery-phone {
        font-size: 0.8rem;
        word-break: break-word;
    }

    /* Submit button full width */
    .cart-submit-row {
        padding: 0.4rem;
        flex-direction: column-reverse;
        gap: 0.4rem;
        text-align: center;
    }

    .cart-logistics-note {
        font-size: 0.8rem;
    }

    .btn-submit-quote {
        width: 100%;
        padding: 0.6rem;
        font-size: 12px;
    }

    /* Modal full width on mobile */
    .cart-modal {
        width: 95%;
        max-width: none;
        margin: 1rem;
        padding: 1.2rem;
    }

    .cart-modal-overlay {
        padding: 0.5rem;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PROFORMA INVOICE (PI) — DOCUMENT MODAL
   ══════════════════════════════════════════════════════════════════════════════ */
.pi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    z-index: 11000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.pi-modal-overlay.active {
    display: flex;
}

.pi-modal-doc {
    background: #ffffff;
    width: 100%;
    max-width: 820px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    margin: 2rem auto;
    animation: fadeIn 0.3s ease-out;
    position: relative;
}

/* Close btn */
.pi-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.pi-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* PDF download */
.pi-pdf-btn {
    position: absolute;
    top: 10px;
    right: 52px;
    border: none;
    background: #103752;
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    z-index: 2;
}

.pi-pdf-btn:hover {
    background: #1e4d6e;
}

/* Document inner */
.pi-inner {
    padding: 30px 35px;
}

/* Company header */
.pi-company-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 3px solid #103752;
}

.pi-company-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #103752;
    letter-spacing: 0.5px;
}

.pi-company-city {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* PI title */
.pi-doc-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #103752;
    text-transform: uppercase;
    margin: 14px 0;
    padding: 6px 0;
    background: #f1f5f9;
    border-radius: 4px;
}

/* Info grid - buyer left, voucher right */
.pi-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 0.82rem;
}

.pi-info-block {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fafbfc;
}

.pi-info-block h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 6px;
}

.pi-info-row {
    display: flex;
    gap: 6px;
    margin-bottom: 3px;
    line-height: 1.45;
}

.pi-info-label {
    font-weight: 600;
    color: #475569;
    min-width: 100px;
    flex-shrink: 0;
}

.pi-info-value {
    color: #1e293b;
    word-break: break-word;
}

/* Items table */
.pi-table-wrap {
    overflow-x: auto;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.pi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    white-space: normal; text-align: center;
}

.pi-table thead {
    background: #103752;
    color: #ffffff;
}

.pi-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pi-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.pi-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.pi-table tbody tr:hover {
    background: #f1f5f9;
}

.pi-table .pi-desc-cell {
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    word-break: break-word;
}

.pi-table .pi-amount-cell {
    text-align: right;
    font-weight: 600;
}

/* Totals */
.pi-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.pi-totals-table {
    width: 280px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.pi-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 14px;
    font-size: 0.82rem;
    border-bottom: 1px solid #f1f5f9;
}

.pi-totals-row:last-child {
    border-bottom: none;
}

.pi-totals-label {
    color: #64748b;
    font-weight: 500;
}

.pi-totals-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}

.pi-totals-row.pi-grand-total {
    background: #103752;
    padding: 10px 14px;
}

.pi-grand-total .pi-totals-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
}

.pi-grand-total .pi-totals-value {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Amount in words */
.pi-amount-words {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 18px;
    font-style: italic;
}

/* Bank details */
.pi-bank-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.pi-bank-block {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fafbfc;
    font-size: 0.78rem;
}

.pi-bank-block h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 6px;
}

.pi-bank-row {
    display: flex;
    gap: 6px;
    margin-bottom: 2px;
}

.pi-bank-label {
    font-weight: 600;
    color: #64748b;
    min-width: 90px;
}

.pi-bank-value {
    color: #1e293b;
    font-weight: 500;
}

.pi-signatory-block {
    text-align: right;
    padding-top: 20px;
}

.pi-signatory-company {
    font-weight: 700;
    color: #103752;
    font-size: 0.82rem;
}

.pi-signatory-label {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer note */
.pi-footer-note {
    text-align: center;
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    padding: 12px 0 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

/* Payment action buttons */
.pi-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 35px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
}

.pi-btn-offline {
    padding: 12px 16px;
    border: none;
    background: #103752;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pi-btn-offline:hover {
    background: #0a263a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 55, 82, 0.3);
}

.pi-btn-online {
    padding: 12px 16px;
    border: none;
    background: #ce692d;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pi-btn-online:hover {
    background: #b85d28;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(206, 105, 45, 0.4);
}

.pi-gateway-note {
    grid-column: span 2;
    text-align: center;
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: -4px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   MY PIs PANEL (in Profile dropdown area)
   ══════════════════════════════════════════════════════════════════════════════ */
.my-pis-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease-out;
}

.my-pis-overlay.active {
    display: flex;
}

.my-pis-panel {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.25s ease-out;
}

.my-pis-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.my-pis-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #103752;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.my-pis-header h3 span.pi-count-badge {
    font-size: 0.7rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.my-pis-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.my-pis-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.my-pis-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

.my-pis-body::-webkit-scrollbar {
    width: 5px;
}

.my-pis-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* PI Card */
.pi-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
    transition: all 0.2s;
    position: relative;
}

.pi-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pi-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pi-card-number {
    font-size: 12px;
    font-weight: 700;
    color: #103752;
}

.pi-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.pi-badge-valid {
    background: #dcfce7;
    color: #16a34a;
}

.pi-badge-expired {
    background: #fef2f2;
    color: #dc2626;
}

.pi-badge-custom {
    background: #fff7ed;
    color: #f5820d;
    border: 1px solid #ffedd5;
}

.pi-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 10px;
}

.pi-card-meta strong {
    color: #475569;
    font-weight: 600;
}

.pi-card-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: #103752;
    margin-bottom: 10px;
}

.pi-card-actions {
    display: flex;
    gap: 8px;
}

.pi-card-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pi-btn-view {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.pi-btn-view:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.pi-btn-requote {
    background: #103752;
    border: none;
    color: #fff;
}

.pi-btn-requote:hover {
    background: #1e4d6e;
}

/* Loading and empty states */
.pi-list-loading,
.pi-list-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.pi-list-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PI RESPONSIVE — MOBILE
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .pi-modal-doc {
        margin: 0.5rem auto;
        border-radius: 8px;
    }

    .pi-inner {
        padding: 18px 14px;
    }

    .pi-company-name {
        font-size: 1.1rem;
    }

    .pi-doc-title {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .pi-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pi-info-label {
        min-width: 80px;
    }

    .pi-table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    .pi-table {
        font-size: 0.72rem;
    }

    .pi-table th,
    .pi-table td {
        padding: 6px 8px;
    }

    .pi-totals {
        justify-content: stretch;
    }

    .pi-totals-table {
        width: 100%;
    }

    .pi-bank-section {
        grid-template-columns: 1fr;
    }

    .pi-actions {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .pi-btn-offline,
    .pi-btn-online {
        width: 100%;
    }

    .pi-gateway-note {
        grid-column: span 1;
    }

    .pi-close-btn {
        top: 6px;
        right: 6px;
    }

    .pi-pdf-btn {
        top: 6px;
        right: 46px;
        padding: 5px 10px;
        font-size: 11px;
    }

    /* My PIs panel */
    .my-pis-panel {
        max-height: 92vh;
        border-radius: 10px;
    }

    .pi-card-meta {
        grid-template-columns: 1fr;
    }

    .pi-card-actions {
        flex-direction: column;
    }

    .pi-card-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pi-inner {
        padding: 12px 10px;
    }

    .pi-company-name {
        font-size: 12px;
    }

    .pi-info-block {
        padding: 8px 10px;
    }

    .pi-info-row {
        flex-direction: column;
        gap: 1px;
    }

    .pi-info-label {
        min-width: auto;
        font-size: 0.7rem;
    }
}
/* KYC Specific Styles */
.kyc-upload-box {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    background: #f8fafc;
}

.kyc-drop-zone {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kyc-drop-zone:hover {
    border-color: #f5820d;
    background: #fff7ed;
}

.kyc-drop-zone svg {
    margin-bottom: 8px;
}

.kyc-field-card {
    background: #fff;
    border-radius: 12px;
}

.kyc-container {
    animation: fadeInKyc 0.3s ease-out;
}

@keyframes fadeInKyc {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 480px) {
    .my-pis-overlay {
        padding: 12px !important;
        overflow-x: hidden !important;
    }
    .my-pis-panel {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 94vh !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
    }
    .my-pis-body {
        padding: 12px 16px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .kyc-container {
        padding: 16px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    .kyc-header {
        margin-bottom: 16px !important;
    }
    .kyc-header h4 {
        font-size: 16px !important;
    }
    .kyc-header p {
        font-size: 12px !important;
    }
    .kyc-upload-grid {
        gap: 16px !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }
    .kyc-upload-box {
        padding: 16px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .kyc-field-card {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .kyc-drop-zone span {
        font-size: 13px !important;
    }
    #kyc-submit-area {
        margin-top: 24px !important;
        padding-top: 16px !important;
    }
    #btn-submit-kyc {
        padding: 14px !important;
        font-size: 14px !important;
    }
}

/* ==========================================
   SARKAR KALANDAR PROFILE VIEW (CENTERED)
   ========================================== */
html, body {
    overflow: hidden !important;
}

.main-content {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.profile-card-container {
    width: 100%;
    max-width: 700px;
}

.profile-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
    box-shadow: none;
}

.profile-image-wrap {
    width: 100%;
    max-width: min(650px, 58vh);
    margin: 0 auto 1.5rem auto;
    position: relative;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
}

.profile-title {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        min-height: calc(100vh - var(--header-height));
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1.2rem 0.8rem;
    }
    .profile-card {
        padding: 0;
    }
    .profile-image-wrap {
        max-width: min(380px, 50vh);
        margin-bottom: 1rem;
    }
    .profile-title {
        font-size: 1.45rem;
    }
}






