/* ============================================================
   RESPONSIVE & MOBILE-FIRST DESIGN
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   GLOBAL MOBILE OPTIMIZATIONS
   ────────────────────────────────────────────────────────── */

@media (max-width: 1199px) {
    :root {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    :root {
        font-size: 15.5px;
    }
}

/* ──────────────────────────────────────────────────────────
   CUSTOMISER PAGE
   ────────────────────────────────────────────────────────── */

@media (max-width: 1399px) {
    .customiser-layout {
        grid-template-columns: 270px minmax(360px, 1fr) 300px;
    }

    .canvas-container {
        min-height: 600px;
    }
}

@media (max-width: 1199px) {
    .customiser-header {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 0.8rem 0.85rem;
    }

    .customiser-title {
        order: -1;
        white-space: normal;
    }

    .customiser-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .customiser-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .customiser-sidebar--left {
        order: 2;
    }

    .customiser-canvas-area {
        order: 1;
        min-height: 0;
    }

    .customiser-sidebar--right {
        order: 3;
    }

    .canvas-container {
        min-height: 540px;
    }
}

@media (max-width: 767px) {
    .customiser-header {
        position: static;
        border-bottom: 0;
        background: transparent;
        backdrop-filter: none;
        padding: 0.7rem 0.65rem 0.4rem;
    }

    .customiser-back {
        font-size: 0.9rem;
    }

    .customiser-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
        width: 100%;
    }

    .customiser-header-actions .btn {
        width: 100%;
    }

    .customiser-layout {
        padding: 0.55rem;
        gap: 0.65rem;
    }

    .customiser-sidebar,
    .customiser-canvas-area {
        border-radius: 14px;
        padding: 0.72rem;
    }

    .tool-tabs {
        gap: 0.34rem;
        margin-bottom: 0.65rem;
    }

    .tool-tab {
        font-size: 0.78rem;
        padding: 0.5rem 0.35rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0.55rem;
    }

    .canvas-container {
        min-height: 430px;
    }

    .garment-bg img {
        max-width: 96%;
        max-height: 96%;
    }

    .view-toggle-row {
        gap: 0.35rem;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
    }

    .view-toggle-row .btn {
        flex: 0 0 auto;
    }

    .size-qty-table .d-flex {
        gap: 0.6rem;
    }

    .size-qty-table input[type="number"] {
        width: 74px;
    }

    .price-summary {
        margin: 0.6rem 0;
    }

    .dialog-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .customiser-header-actions {
        grid-template-columns: 1fr;
    }

    .upload-drop-zone {
        min-height: 150px;
    }

    .canvas-container {
        min-height: 380px;
    }

    .customiser-order-actions .btn,
    .dialog-actions .btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    :root {
        font-size: 15px;
    }

    body {
        line-height: 1.5;
    }

    /* Reduce padding/margin on mobile */
    .container {
        padding: 0 1rem !important;
    }

    h1 {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    h2 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    h3 {
        font-size: clamp(1rem, 3vw, 1.4rem);
    }
}

@media (max-width: 575px) {
    :root {
        font-size: 14px;
    }

    .container {
        padding: 0 0.75rem !important;
    }
}

/* ──────────────────────────────────────────────────────────
   SHOP PAGE - FILTERS & LAYOUT
   ────────────────────────────────────────────────────────── */

/* Medium devices (tablets) - stack filters above content */
@media (max-width: 991px) {
    .shop-layout,
    .shop-layout.container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .shop-sidebar {
        position: static;
        top: auto;
        grid-column: 1;
        margin-bottom: 1.5rem;
    }

    .shop-main {
        grid-column: 1;
    }
}

/* Small devices (phones) - drawer for filters, full-width single column */
@media (max-width: 767px) {
    /* Force fully single-column block layout on the container */
    .shop-layout,
    .shop-layout.container {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 0.75rem !important;
    }

    .shop-main {
        display: block !important;
        width: 100% !important;
        grid-column: auto !important;
        min-width: 0 !important;
        border-radius: 12px !important;
    }

    /* Mobile filters drawer — slides in from left */
    .shop-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 85vw !important;
        max-width: 360px !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 1001 !important;
        transform: translateX(-110%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 1rem !important;
        margin: 0 !important;
        grid-column: auto !important;
        display: block !important;
    }

    .shop-sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25) !important;
    }

    /* Dark overlay behind open drawer */
    .shop-sidebar.active::after {
        content: '' !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.45) !important;
        z-index: -1 !important;
    }

    /* Single column product grid on mobile */
    .product-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    /* Close button shown when drawer open */
    .sidebar-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 1.4rem;
        color: #14263f;
        padding: 0.25rem 0.5rem;
    }

    .js-filter-panel-collapsible[hidden] {
        display: none !important;
    }
}

/* ──────────────────────────────────────────────────────────
   SHOP TOOLBAR
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .shop-toolbar__right {
        width: 100%;
        display: flex;
        gap: 0.8rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    .shop-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.6rem 0.7rem;
        gap: 0.5rem;
    }

    .shop-toolbar__count {
        font-size: 0.85rem;
        display: none;
    }

    .shop-toolbar__right {
        display: flex;
        gap: 0.5rem;
        width: auto;
    }

    /* Make filters button prominent on mobile */
    .js-mobile-filters-open {
        display: inline-flex !important;
        flex-shrink: 0;
    }

    /* Hide view toggle on very small screens */
    .view-toggle {
        display: none;
    }

    /* Compact sort dropdown */
    .sort-select {
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 575px) {
    .shop-toolbar {
        padding: 0.5rem 0.5rem;
    }

    .js-mobile-filters-open {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .sort-select {
        font-size: 0.8rem;
    }
}

/* ──────────────────────────────────────────────────────────
   PRODUCT GRID
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.9rem;
    }
}

@media (max-width: 767px) {
    /* 1 column — full-width product cards on mobile */
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .product-card {
        display: grid;
        grid-template-columns: 120px 1fr;
        border-radius: 10px;
    }

    .product-card__img {
        aspect-ratio: 1/1;
    }

    .product-card__img img {
        padding: 0.5rem;
        height: 100%;
        object-fit: contain;
    }

    .product-card__body {
        padding: 0.7rem 0.7rem 0.7rem 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .product-card__name {
        font-size: 0.92rem;
        margin: 0.2rem 0 0.3rem;
        line-height: 1.3;
    }

    .product-card__brand {
        font-size: 0.72rem;
    }

    .product-card__price {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    /* View/Add button on card stays full width of body column */
    .product-card .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        width: 100%;
    }
}

/* ──────────────────────────────────────────────────────────
   FILTER GROUPS & INPUTS
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .filter-group {
        border-radius: 10px;
        padding: 0.6rem;
        margin-top: 0.6rem;
    }

    .filter-list {
        gap: 0.35rem;
    }

    .filter-list label {
        padding: 0.4rem 0.5rem;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    .filter-swatches {
        gap: 0.35rem;
    }

    .price-inputs {
        gap: 0.4rem;
    }

    .price-inputs input {
        padding: 0.4rem 0.45rem;
        font-size: 0.85rem;
    }

    .btn-block {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        margin-top: 0.7rem;
    }
}

@media (max-width: 575px) {
    .sidebar-header {
        margin-bottom: 0.6rem;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
    }

    .filter-group {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }

    .filter-group__title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .filter-list label {
        padding: 0.35rem 0.45rem;
        font-size: 0.85rem;
    }

    .price-inputs {
        grid-template-columns: 1fr 1fr;
    }

    .price-inputs input {
        font-size: 0.8rem;
    }
}

/* ──────────────────────────────────────────────────────────
   CATEGORY PAGE
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .category-header {
        grid-template-columns: 100px 1fr;
        gap: 0.7rem;
        padding: 0.7rem;
    }

    .category-header__img {
        width: 100px;
        height: 100px;
    }

    .category-header__text h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 767px) {
    .category-header {
        grid-template-columns: 80px 1fr;
        gap: 0.6rem;
        padding: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .category-header__img {
        width: 80px;
        height: 80px;
        border-radius: 8px;
    }

    .category-header__text h1 {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
        margin: 0;
    }

    .category-header__text p {
        font-size: 0.85rem;
        margin: 0.2rem 0 0;
    }

    .subcategory-bar {
        gap: 0.4rem;
        overflow-x: auto;
        padding: 0.5rem 0;
        margin-bottom: 0.75rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575px) {
    .category-header {
        grid-template-columns: 70px 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .category-header__img {
        width: 70px;
        height: 70px;
    }

    .category-header__text h1 {
        font-size: 1.1rem;
    }

    .subcategory-chip {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* ──────────────────────────────────────────────────────────
   BREADCRUMB
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .breadcrumb {
        padding: 0.5rem 0.7rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
        font-size: 0.85rem;
    }

    .breadcrumb ol {
        gap: 0.35rem;
    }
}

/* ──────────────────────────────────────────────────────────
   PAGINATION
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .pagination {
        margin-top: 1.5rem;
    }

    .pagination-list {
        gap: 0.25rem;
    }

    .pagination-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .pagination-item a {
        padding: 0.35rem 0.5rem;
    }

    .pagination--ellipsis {
        padding: 0.35rem 0;
    }
}

@media (max-width: 575px) {
    .pagination-item {
        padding: 0.3rem 0.4rem;
        font-size: 0.8rem;
    }

    .pagination-item a {
        padding: 0.25rem 0.35rem;
    }
}

/* ──────────────────────────────────────────────────────────
   HEADER & NAVIGATION
   ────────────────────────────────────────────────────────── */

.js-menu-toggle {
    display: none;
}

.mobile-nav-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
}

.search-bar {
    display: none;
}

.search-bar.is-open,
.search-bar.active {
    display: block;
}

.search-bar .container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    border: 1px solid #d9e3f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.28rem 0.7rem;
}

.search-form input[type="search"] {
    flex: 1;
    border: 0;
    min-width: 0;
    font-size: 0.95rem;
}

.search-form button {
    color: #1a3152;
}

.search-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #d9e3f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1a3152;
}

.site-header {
    padding: 0.55rem 0;
    background: #fff;
    border-bottom: 1px solid #edf1f7;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    height: clamp(42px, 3.2vw, 54px);
    flex-shrink: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.main-nav {
    justify-self: center;
    margin: 0 auto;
    padding-inline: clamp(0.6rem, 1.4vw, 1.4rem);
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 1.4vw, 1.8rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
    margin-left: 0;
    margin-right: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    color: #163052;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: transparent;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active,
.nav-item.is-open > .nav-link,
.nav-item:hover > .nav-link {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.1rem;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-item.is-open > .nav-link,
.nav-item:hover > .nav-link {
    color: #0f9d8a;
    background: rgba(15, 157, 138, 0.06);
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-item.is-open > .nav-link::after,
.nav-item:hover > .nav-link::after {
    transform: scaleX(1);
}

.nav-link i.fa-chevron-down {
    font-size: 0.6rem;
    opacity: 0.6;
}

.header-actions {
    justify-self: end;
}

@media (max-width: 991px) {
    .site-header {
        padding: 0.55rem 0;
    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .site-logo {
        width: 148px;
    }

    .site-logo img {
        max-width: 100%;
        height: auto;
    }

    .js-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        background: #fff;
        z-index: 1302;
        transform: translateX(-110%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s ease, opacity 0.2s ease;
        overflow-y: auto;
        box-shadow: none;
        padding: 1.15rem 1rem 1.8rem;
    }

    .main-nav.is-open,
    .main-nav.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.nav-open {
        overflow: hidden;
    }

    .mobile-nav-backdrop {
        display: none !important;
        position: fixed;
        inset: 0;
        background: transparent !important;
        z-index: 1300;
        opacity: 0;
        visibility: hidden;
        pointer-events: none !important;
        transition: opacity 0.2s ease;
    }

    .mobile-nav-backdrop.is-open,
    .mobile-nav-backdrop.active {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0.35rem 0 0;
        list-style: none;
    }

    .nav-item {
        width: 100%;
        min-width: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        border-bottom: 1px solid #e7edf6;
        margin-left: 0;
        margin-right: 0;
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.95rem 0.2rem;
        font-size: clamp(1.2rem, 4.5vw, 1.6rem);
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        white-space: normal;
    }

    .dropdown-menu {
        position: static !important;
        display: none;
        border: 0;
        box-shadow: none;
        width: 100%;
        background: #f7fbff;
    }

    .nav-item.is-open > .dropdown-menu {
        display: block !important;
    }

    .dropdown-list {
        margin: 0;
        padding: 0.15rem 0.2rem 0.65rem;
        list-style: none;
    }

    .dropdown-list a {
        display: block;
        padding: 0.42rem 0.2rem;
        font-size: 1.02rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 767px) {
    .site-header {
        padding: 0.6rem 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .header-inner {
        gap: 0.6rem;
    }

    .site-logo {
        width: 142px;
        flex-shrink: 0;
    }

    .header-actions {
        display: flex;
        gap: 0.5rem;
        order: 2;
    }

    .header-action-btn {
        padding: 0.5rem;
        font-size: 0.95rem;
    }

    .main-nav {
        width: 100vw;
        max-width: 100vw;
        padding: 1rem 0.9rem 1.5rem;
    }

    .nav-link {
        font-size: clamp(1.1rem, 5vw, 1.4rem);
        padding: 0.9rem 0.15rem;
    }
}

@media (max-width: 575px) {
    .site-logo {
        width: 124px;
    }

    .nav-link {
        padding: 0.82rem 0.1rem;
        font-size: clamp(1.04rem, 5.8vw, 1.25rem);
    }

    .header-action-btn {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
}

/* Force mobile nav presentation above any legacy/theme rules */
@media (max-width: 991px) {
    #main-nav.main-nav {
        inset: 0 auto 0 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        z-index: 2202 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 1.15rem 0.9rem 1.6rem !important;
    }

    #main-nav.main-nav.is-open,
    #main-nav.main-nav.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .mobile-nav-backdrop {
        z-index: 2200 !important;
        display: none !important;
        background: transparent !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #main-nav.main-nav .mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
        min-height: 52px;
        padding: 0.5rem 0.15rem 0.75rem;
        margin: 0 0 0.4rem;
        border: 0;
        border-bottom: 1px solid #e7edf6;
        border-radius: 0;
        background: transparent;
        color: #163052;
        font-weight: 700;
        font-size: clamp(0.95rem, 3.8vw, 1.12rem);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    #main-nav.main-nav .mobile-menu-close i {
        font-size: 1.05em;
    }

    #main-nav.main-nav .nav-list {
        margin: 0 !important;
        padding: 0.35rem 0 0 !important;
        gap: 0 !important;
    }

    #main-nav.main-nav .nav-item {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #main-nav.main-nav .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        min-height: 66px !important;
        padding: 1rem 0.35rem !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: clamp(1.28rem, 5.8vw, 1.82rem) !important;
        font-weight: 800 !important;
        letter-spacing: 0.04em !important;
        text-transform: uppercase !important;
        line-height: 1.15 !important;
    }

    #main-nav.main-nav .nav-link i {
        margin-left: 0.55rem !important;
        font-size: 0.88em !important;
    }

    #main-nav.main-nav .dropdown-menu {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #f7fbff !important;
    }

    #main-nav.main-nav .dropdown-list {
        padding: 0.2rem 0.2rem 0.65rem !important;
    }

    #main-nav.main-nav .dropdown-list a {
        text-align: center !important;
        text-transform: uppercase !important;
        letter-spacing: 0.03em !important;
        font-size: clamp(1rem, 4.6vw, 1.25rem) !important;
        padding: 0.55rem 0.2rem !important;
    }
}

/* ──────────────────────────────────────────────────────────
   CART & CHECKOUT PAGES
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-items,
    .checkout-form {
        grid-column: 1;
    }

    .cart-summary,
    .checkout-summary {
        grid-column: 1;
        margin-top: 1.5rem;
    }
}

@media (max-width: 767px) {
    .cart-table {
        font-size: 0.85rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 0.5rem;
    }

    .cart-item-img {
        width: 60px;
        height: 60px;
    }

    .checkout-form {
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        padding: 0.6rem 0.75rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }
}

@media (max-width: 575px) {
    .cart-table {
        font-size: 0.75rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 0.35rem;
    }

    .cart-item-img {
        width: 50px;
        height: 50px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        padding: 0.5rem 0.6rem;
    }

    .btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    .cart-summary,
    .checkout-summary {
        padding: 1rem 0.75rem;
    }
}

/* ──────────────────────────────────────────────────────────
   PRODUCT DETAILS PAGE
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-details__gallery {
        grid-column: 1;
    }

    .product-details__info {
        grid-column: 1;
    }
}

@media (max-width: 767px) {
    .product-gallery {
        max-height: 400px;
    }

    .product-info h1 {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }

    .product-price {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .product-options {
        margin-bottom: 1rem;
    }

    .size-selector {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 0.5rem;
        margin: 0.8rem 0;
    }

    .size-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .quantity-input {
        width: 100%;
        max-width: 120px;
    }

    .add-to-cart-btn {
        width: 100%;
        padding: 0.8rem;
        margin: 1rem 0 0;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .tab-content {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 575px) {
    .product-gallery {
        max-height: 300px;
    }

    .product-info h1 {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .size-selector {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 0.35rem;
    }

    .size-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .tab-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .tab-content {
        padding: 0.75rem 0.5rem;
    }
}

/* ──────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .site-footer {
        padding: 2rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-col h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .footer-col ul {
        gap: 0.4rem;
    }

    .footer-col a {
        font-size: 0.9rem;
    }

    .newsletter-form {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .newsletter-form input {
        flex: 1;
        min-width: 150px;
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .newsletter-form button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {
    .site-footer {
        padding: 1.5rem 0 0.75rem;
    }

    .footer-grid {
        gap: 1rem;
    }

    .footer-col h3 {
        font-size: 0.95rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .footer-bottom {
        padding: 1rem 0;
        font-size: 0.8rem;
    }
}

/* ──────────────────────────────────────────────────────────
   UTILITIES
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-center-mobile {
        text-align: center;
    }

    .container-fluid {
        padding: 0 0.75rem;
    }

    .mr-mobile {
        margin-right: 0.5rem;
    }

    .ml-mobile {
        margin-left: 0.5rem;
    }

    .mt-mobile {
        margin-top: 1rem;
    }

    .mb-mobile {
        margin-bottom: 1rem;
    }

    .p-mobile {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }
}

/* ──────────────────────────────────────────────────────────
   MODAL/DRAWER OVERLAYS
   ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .modal-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    .drawer {
        position: fixed;
        left: -100%;
        top: 0;
        width: 85vw;
        max-width: 400px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }

    .drawer.active {
        left: 0;
    }
}

/* ──────────────────────────────────────────────────────────
   SKIPS & PRINT STYLES
   ────────────────────────────────────────────────────────── */

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 0.5rem 1rem;
    background: #1a3154;
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

@media print {
    .site-header,
    .site-footer,
    .breadcrumb,
    .shop-toolbar,
    .pagination,
    .sidebar-header,
    .filter-group {
        display: none;
    }

    .product-card {
        page-break-inside: avoid;
    }
}
