﻿html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden; 
}

img, video, svg, canvas, iframe {
    max-width: 100%;
}

.listing-layout > *, .detail-grid > *, .cart-layout > *, .checkout-layout > *,
.acct-layout > *, .acct-password-layout > *, .od-layout > *, .hero-inner > *,
.editorial-inner > *, .category-banner-inner > *, .auth-shell > * {
    min-width: 0;
}

h1, h2, h3, h4, p, .product-title, .cart-item-name, .od-item-name, .acct-email {
    overflow-wrap: break-word;
}

@media (max-width: 1328px) {
    .container[style*="padding"] {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

        .container[style*="padding"] {
            padding-left: 16px !important;
            padding-right: 16px !important;
        }
}

@media (max-width: 768px) {
    .announcement-bar {
        font-size: 12px;
    }

    .announcement-inner {
        padding: 8px 40px 8px 16px;
        text-align: center;
    }

    .announcement-close {
        right: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 360px) {
    .announcement-bar {
        font-size: 11px;
    }
}

@media (min-width: 1101px) and (max-width: 1280px) {
    .header-inner {
        gap: 20px;
    }

    .logo-main {
        font-size: 26px;
    }

    .main-nav {
        min-width: 0;
    }

        .main-nav ul {
            flex-wrap: wrap;
        }

        .main-nav > ul > li > a {
            padding: 10px 8px;
            font-size: 12px;
            letter-spacing: 1px;
        }

    .search-form {
        min-width: 140px;
    }
}

@media (min-width: 1101px) {
    .main-nav {
        display: block !important;
        position: static !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }
}

@media (max-width: 1100px) {
    .header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 4px;
        padding: 10px 24px;
    }

    .logo {
        margin-right: auto;
        min-width: 0;
    }

    /* icons become direct children of the header row */
    .header-actions {
        display: contents;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
        margin-left: 2px;
    }

    .icon-btn {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* search is shown again (the base sheet hides it on phones) */
    .search-form {
        display: flex;
        order: 10;
        flex: 1 0 100%;
        min-width: 0;
        margin: 2px 0 2px;
    }

        .search-form input {
            min-width: 0;
        }

    /* the open menu panel (positioned by main.js) */
    .main-nav {
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

        .main-nav ul {
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 0;
        }

        .main-nav li {
            width: 100%;
        }

        .main-nav > ul > li > a {
            padding: 14px 4px;
            font-size: 13px;
            border-bottom: 1px solid var(--line);
        }

        .main-nav li.nav-skel {
            padding: 14px 4px;
        }

        /* touch devices have no hover: show brand list inline inside the panel */
        .main-nav .dropdown {
            position: static;
            opacity: 1;
            visibility: visible;
            transform: none;
            min-width: 0;
            border: 0;
            box-shadow: none;
            padding: 0 0 6px 14px;
        }

            .main-nav .dropdown a {
                padding: 10px 6px;
            }

    #nav-brand-list {
        max-height: 200px;
    }

    /* account dropdown must stay on-screen */
    .account-dropdown {
        right: -40px;
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 8px 16px 10px;
    }

    .logo-main {
        font-size: 22px;
    }

    .logo-sub {
        font-size: 7.5px;
        letter-spacing: 1.5px;
    }

    .search-form input {
        font-size: 16px; /* stops iOS zooming into the field */
        letter-spacing: 1px;
    }

    .account-dropdown {
        right: -70px;
    }
}

@media (max-width: 360px) {
    .logo-main {
        font-size: 19px;
    }

    .logo-sub {
        display: none;
    }

    .icon-btn, .mobile-menu-toggle {
        min-width: 36px;
        padding: 6px;
    }
}


@media (max-width: 768px) {
    .section-title {
        font-size: clamp(24px, 6.5vw, 32px);
    }

    .page-banner {
        padding: 28px 0;
    }

        .page-banner h1 {
            font-size: 26px;
        }

    .breadcrumb-wrap {
        padding: 12px 0;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 11px;
        letter-spacing: 0.5px;
        gap: 6px;
    }

        .breadcrumb .current {
            overflow-wrap: anywhere;
        }

    .form-control,
    .sort-wrap select,
    .promo-row input,
    .newsletter-form input {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 44px 0;
    }

    .btn-lg {
        padding: 14px 22px;
    }

    .pagination {
        flex-wrap: wrap;
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .auth-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .auth-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .editorial {
        padding: 48px 0;
    }

    .editorial-inner {
        gap: 28px;
    }

    .editorial-content p {
        font-size: 15px;
    }

    .testimonial {
        padding: 24px;
    }

    .brand-overlay {
        padding: 18px;
    }

        .brand-overlay h3 {
            font-size: 26px;
        }
}

@media (max-width: 480px) {
    .hero {
        padding: 36px 0 40px;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .hero-title {
        margin-bottom: 18px;
    }

    .brand-grid {
        grid-template-rows: repeat(4, 200px);
    }

    .value-bar {
        padding: 24px 0;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}


@media (max-width: 768px) {
    .category-banner {
        padding: 36px 0;
    }

    .category-banner-inner {
        gap: 24px;
    }

    .category-desc {
        font-size: 15px;
    }

    .listing-toolbar {
        margin-bottom: 20px;
    }
}
@media (max-width: 991px) {
    .filters .filter-group label {
        display: flex;
        margin-right: 0;
        padding: 9px 0;
    }

    .filters .filter-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
        flex: none;
    }

    .filter-toggle-btn {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .listing-toolbar {
        gap: 10px;
    }

    .result-count {
        flex: 1 0 100%;
        order: 3;
    }

    .sort-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

        .sort-wrap select {
            flex: 1;
            min-width: 0;
            max-width: 100%;
        }
}

@media (max-width: 1024px), (hover: none) {
    .zoom-pane {
        display: none !important;
    }

    .main-image {
        cursor: default;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 24px 0 56px;
    }

    .detail-grid {
        gap: 28px;
        margin-bottom: 40px;
    }

    .price-row {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .price-current {
        font-size: 26px;
    }

    .detail-actions {
        margin: 24px 0 20px;
    }

    .review-summary {
        flex-wrap: wrap;
        gap: 16px;
        padding: 18px;
    }

    .tab-panel h3 {
        font-size: 21px;
    }

    .note-tier {
        padding: 16px 18px;
    }

    .acc-body {
        font-size: 14px;
    }

    .acc-title {
        font-size: 12px;
        letter-spacing: 1.5px;
        padding-right: 12px;
    }

    .info-accordion {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .option-value {
        padding: 9px 14px;
    }

    .trust-badges {
        padding: 16px;
    }

    .thumb-strip {
        gap: 8px;
    }

    .review-head {
        flex-wrap: wrap;
        gap: 6px;
    }

    .stock-badge {
        display: inline-block;
        margin-left: 0;
    }
}


/* ==========================================================================
   7. CART (cart.aspx)
   ========================================================================== */
@media (max-width: 768px) {
    /* image + name on top, then  price | quantity | total  on one line */
    .cart-row {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px 10px;
        padding: 16px;
    }

    .cart-item-info {
        grid-column: 1 / -1;
        padding-right: 36px; /* room for the remove button */
        gap: 12px;
    }

        .cart-item-info img {
            width: 64px;
            height: 80px;
            flex: none;
        }

    .cart-price {
        justify-self: start;
    }

    .cart-qty {
        justify-self: center;
    }

    .cart-line-total {
        justify-self: end;
        font-weight: 600;
    }

    .cart-remove-btn {
        top: 14px;
        right: 12px;
    }

    .cart-summary {
        padding: 22px;
    }
}

@media (max-width: 480px) {
    .cart-summary {
        padding: 18px;
    }

    .promo-row {
        flex-wrap: wrap;
    }

        .promo-row input {
            flex: 1 1 100%;
        }

        .promo-row .btn {
            width: 100%;
        }

    .cart-empty {
        padding: 56px 12px;
    }
}


/* ==========================================================================
   8. CHECKOUT (checkout.aspx)  - most of its layout is inline-styled
   ========================================================================== */
.checkout-layout > * {
    min-width: 0;
}

/* "Shipping Address" title + its two buttons */
.checkout-layout > div:first-child > div:first-child {
    flex-wrap: wrap;
    gap: 10px;
}

.address-card {
    overflow-wrap: anywhere;
}

    /* keep the absolutely placed Delete button from covering the address text */
    .address-card:has(> button) label {
        padding-right: 64px;
    }

#checkout-summary-items > div {
    gap: 12px;
}

    #checkout-summary-items > div > span:first-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

@media (max-width: 600px) {
    #new-address-form-container {
        padding: 16px !important;
    }

        #new-address-form-container > div:last-child {
            flex-wrap: wrap;
        }

    .checkout-layout > div:first-child > div:first-child .btn {
        flex: 1 1 auto;
    }

    #order-confirmation {
        padding: 36px 0 !important;
    }
}


/* ==========================================================================
   9. ACCOUNT / CHANGE PASSWORD (account.aspx, change-password.aspx)
   ========================================================================== */

/* saved-address grid had a hard 320px minimum -> overflowed small phones */
#account-address-book-container {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)) !important;
}

/* "Saved Addresses" title + Add button */
#tab-content-address > div:first-child {
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 600px) {
    /* the inline-flex address rows stack their two fields */
    #account-new-address-form .form-row {
        flex-wrap: wrap;
    }

        #account-new-address-form .form-row .form-control {
            flex: 1 1 100% !important;
            min-width: 0;
        }

    #account-new-address-form {
        padding: 16px !important;
    }
}

@media (max-width: 520px) {
    #tab-btn-details, #tab-btn-address {
        padding: 10px 8px !important;
        font-size: 14px !important;
        white-space: nowrap;
    }

    .acct-section {
        padding: 32px 0 48px;
    }

    .acct-avatar {
        width: 80px;
        height: 80px;
    }

    .acct-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 400px) {
    .acct-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 900px) {
    .auth-visual-overlay {
        padding: 28px 24px;
    }

        .auth-visual-overlay p {
            max-width: 100%;
        }
}

@media (max-width: 600px) {
    .auth-visual {
        min-height: 170px;
    }

    .auth-form-side {
        padding: 28px 16px 40px;
    }

    .form-meta-row {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .auth-visual-overlay {
        padding: 20px 16px;
    }
}

.orders-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

@media (max-width: 768px) {
    .orders-toolbar {
        align-items: stretch;
    }

    .orders-filters {
        width: 100%;
    }

        .orders-filters .form-control {
            flex: 1 1 150px;
            min-width: 0;
            max-width: none;
        }

    .oc-card {
        padding: 18px 16px 16px 20px;
    }

    .od-card {
        padding: 18px;
    }

    .order-items-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .orders-filters .btn {
        flex: 1 1 100%;
    }

    .orders-pager button {
        min-width: 34px;
        height: 34px;
    }

    .od-head {
        align-items: flex-start;
    }

    .od-item {
        flex-wrap: wrap;
    }

    .od-item-info {
        flex-basis: calc(100% - 80px);
    }

    .od-item-total {
        margin-left: auto;
    }

    .od-info-row, .od-sum-row {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .oc-step-label {
        font-size: 10px;
    }

    .oc-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .wl-head {
        flex-wrap: wrap;
    }

    .wl-sizes {
        padding: 8px 10px 0;
    }
}

@media (max-width: 340px) {
    .wl-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .payment-icons {
        flex-wrap: wrap;
    }

    .footer-bottom .container {
        gap: 8px;
    }

    .footer-about {
        max-width: none;
    }
}


@media (hover: none) {
    .product-card:hover,
    .oc-card:hover {
        transform: none;
    }

        .product-card:hover .product-media img,
        .brand-card:hover img,
        .wl-card:hover .wl-media img {
            transform: none;
        }
}

@media (max-height: 480px) and (orientation: landscape) {
    .main-nav {
        max-height: calc(100vh - 90px);
    }

    .hero {
        padding: 32px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
