/* ==========================================================================
   Ecommerce Website UI/UX Improvements & Design Audit
   ========================================================================== */

/* 1. UI Consistency & 60-30-10 Color Balance Variables */
:root {
    /* 60% Primary/Base: Backgrounds & Neutral areas */
    --base-bg: #f8fafc;
    --base-card-bg: #ffffff;
    --base-text: #1e293b;
    --base-muted: #64748b;
    --base-border: #e2e8f0;

    /* 30% Secondary/Supporting: Navigation, Footer, Secondary elements */
    --secondary-color: #0f172a;
    --secondary-bg: #f1f5f9;
    --secondary-text: #475569;

    /* 10% Accent: Call to actions, Sale Badges, Active states */
    --accent-color: #ff6b00;
    --accent-hover: #e85f00;

    /* Typography */
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* UI Consistency */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --btn-height: 48px;
    --input-height: 48px;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles & Typography
   ========================================================================== */
body {
    background-color: var(--base-bg) !important;
    color: var(--base-text) !important;
    font-family: var(--font-body) !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.section-heading {
    font-family: var(--font-heading) !important;
    color: var(--secondary-color) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background: var(--secondary-color) !important;
    border-bottom: none !important;
}

.site-header.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500 !important;
    transition: var(--transition-base) !important;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Footer Heading Overrides */
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6,
.site-footer .footer-title,
.site-footer .footer-col-title {
    color: #ffffff !important;
}

/* Contact Card Overrides (Dark Background) */
.contact-info-card {
    background: var(--secondary-color) !important;
}

.contact-info-card h1,
.contact-info-card h2,
.contact-info-card h3,
.contact-info-card h4,
.contact-info-card h5,
.contact-info-card h6 {
    color: #ffffff !important;
}

.contact-info-card a {
    color: var(--accent-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.contact-info-card a:hover {
    color: var(--accent-hover) !important;
}

/* ==========================================================================
   Consistent Buttons
   ========================================================================== */
.btn,
.home-cta-btn,
.product-card-v2__cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--btn-height) !important;
    padding: 0 var(--spacing-xl) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    letter-spacing: 0.01em !important;
    transition: all var(--transition-base) !important;
    text-transform: none !important;
    cursor: pointer !important;
}

.btn-sm {
    height: 36px !important;
    padding: 0 var(--spacing-md) !important;
    font-size: 0.875rem !important;
}

.btn-lg {
    height: 56px !important;
    padding: 0 var(--spacing-xxl) !important;
    font-size: 1.125rem !important;
}

.btn-accent,
.home-cta-btn {
    background: var(--accent-color) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-accent:hover,
.home-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
    background: var(--accent-hover) !important;
}

.btn-primary {
    background: var(--secondary-color) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    background: #1e293b !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

/* ==========================================================================
   Consistent Forms
   ========================================================================== */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    height: var(--input-height) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--base-border) !important;
    padding: 0 var(--spacing-md) !important;
    font-size: 1rem !important;
    color: var(--base-text) !important;
    background-color: var(--base-card-bg) !important;
    transition: all var(--transition-base) !important;
    box-shadow: none !important;
}

textarea.form-control {
    height: auto !important;
    min-height: 120px !important;
    padding-top: var(--spacing-sm) !important;
    padding-bottom: var(--spacing-sm) !important;
}

.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Products page sort filter — avoid global form overrides */
.page-products .products-toolbar .sort-filter__trigger {
    margin-bottom: 0 !important;
}

.page-products .products-toolbar .sort-filter__option {
    box-shadow: none !important;
    transform: none !important;
}

.page-products .products-toolbar .sort-filter__option:hover {
    transform: none !important;
}

.page-products .products-toolbar .shop-search__input,
.page-products .products-toolbar .shop-search__submit,
.page-products .products-toolbar .shop-search__clear {
    box-shadow: none !important;
    border-radius: 10px !important;
}

.page-products .products-toolbar .shop-search__input {
    height: 38px !important;
    border: none !important;
    background: transparent !important;
}

.page-products .products-toolbar .shop-search__submit {
    transform: none !important;
}

.page-products .products-toolbar .shop-search__submit:hover {
    transform: none !important;
}

.form-group,
.mb-3 {
    margin-bottom: var(--spacing-lg) !important;
}

label {
    font-weight: 500 !important;
    color: var(--secondary-text) !important;
    margin-bottom: var(--spacing-sm) !important;
    display: inline-block !important;
}

/* ==========================================================================
   Product Cards - Equal Height, Layout & Image Sizing
   ========================================================================== */
.product-card,
.product-card-v2 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 400px !important;
    background: var(--base-card-bg) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--base-border) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-base) !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.product-card:hover,
.product-card-v2:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--base-border) !important;
}

.product-card__media,
.product-card-v2__media {
    margin: 0 !important;
    border-radius: 0 !important;
    background: var(--secondary-bg) !important;
    aspect-ratio: 4/3 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
}

.product-card__img-link,
.product-card-v2__img-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: auto !important;
}

.product-card__img,
.product-card-v2__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: var(--spacing-md) !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.product-card:hover .product-card__img,
.product-card-v2:hover .product-card-v2__img {
    transform: scale(1.08) !important;
}

.product-card__body,
.product-card-v2__body {
    padding: var(--spacing-md) !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.product-card__title,
.product-card-v2__title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--secondary-color) !important;
    margin-bottom: var(--spacing-xs) !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.product-card__price,
.product-card-v2__price {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--accent-color) !important;
    margin-top: auto !important;
    margin-bottom: var(--spacing-sm) !important;
}

.product-card__cart-form,
.product-card-v2__cart-form {
    margin-top: auto !important;
}

/* Highlighted Add to Cart on product cards */
.product-card-v2__cta {
    width: 100% !important;
    margin-top: var(--spacing-sm) !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    border: 2px solid #4f46e5 !important;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32) !important;
}

.product-card-v2__cta::before {
    display: none !important;
}

.product-card-v2__cta-inner {
    color: #fff !important;
}

.product-card-v2__cta:hover:not(:disabled):not(.is-loading):not(.is-success) {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.42) !important;
    transform: translateY(-2px) !important;
}

.product-card-v2__cta.is-success {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25) !important;
}

.product-card-v2__cta.is-success .product-card-v2__cta-inner {
    color: #15803d !important;
}

.product-card-v2__cta.is-disabled,
.product-card-v2__cta:disabled {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

.product-card-v2__cta.is-disabled .product-card-v2__cta-inner,
.product-card-v2__cta:disabled .product-card-v2__cta-inner {
    color: #94a3b8 !important;
}

/* Badges */
.product-card-v2__sale-badge {
    position: absolute !important;
    top: var(--spacing-sm) !important;
    left: var(--spacing-sm) !important;
    background: #ef4444 !important;
    /* red for sales */
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 12px !important;
    border-radius: var(--radius-full) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   Layout, Spacing & Grid Consistency
   ========================================================================== */
.site-main {
    padding: var(--spacing-xxl) 0 !important;
}

.home-section,
.about-section,
.contact-section {
    margin-bottom: calc(var(--spacing-xxl) * 1.5) !important;
}

.section-heading {
    margin-bottom: var(--spacing-lg) !important;
    text-align: center !important;
}

.section-heading::after {
    content: '' !important;
    display: block !important;
    width: 60px !important;
    height: 4px !important;
    background: var(--accent-color) !important;
    margin: var(--spacing-md) auto 0 !important;
    border-radius: var(--radius-full) !important;
}

/* Grid padding fixes */
.row {
    margin-left: calc(var(--spacing-md) * -1) !important;
    margin-right: calc(var(--spacing-md) * -1) !important;
}

.row>[class*="col-"] {
    padding-left: var(--spacing-md) !important;
    padding-right: var(--spacing-md) !important;
    margin-bottom: calc(var(--spacing-md) * 2) !important;
}

/* ==========================================================================
   Ecommerce Specific UX
   ========================================================================== */
/* Hero section improvements */
.hero-banner {
    border-radius: 28px !important;
    /* Restored original larger border radius for hero */
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden !important;
    transform: translateZ(0) !important;
    /* Fixes corner bleeding in Safari/Webkit */
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
}

.hero-banner h1,
.hero-banner .lead,
.hero-banner p {
    color: #ffffff !important;
}

.hero-banner__overlay {
    background: rgba(15, 23, 42, 0.75) !important;
}

/* Product Detail Page */
.product-detail-card {
    background: var(--base-card-bg) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--base-border) !important;
    box-shadow: var(--shadow-md) !important;
    padding: var(--spacing-xl) !important;
}

.product-gallery {
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
    border: 1px solid var(--base-border) !important;
    background: var(--base-bg) !important;
}

/* Cart & Checkout */
.cart-table {
    border-collapse: separate !important;
    border-spacing: 0 var(--spacing-sm) !important;
}

.cart-table th {
    background: transparent !important;
    color: var(--base-muted) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    padding-bottom: var(--spacing-md) !important;
}

.cart-table td {
    background: var(--base-card-bg) !important;
    border-top: 1px solid var(--base-border) !important;
    border-bottom: 1px solid var(--base-border) !important;
    padding: var(--spacing-md) !important;
    vertical-align: middle !important;
}

.cart-table td:first-child {
    border-left: 1px solid var(--base-border) !important;
    border-top-left-radius: var(--radius-md) !important;
    border-bottom-left-radius: var(--radius-md) !important;
}

.cart-table td:last-child {
    border-right: 1px solid var(--base-border) !important;
    border-top-right-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.checkout-card,
.order-summary-card {
    background: var(--base-card-bg) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--base-border) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: var(--spacing-lg) !important;
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* User Feedback (Toast) */
.toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 1050;
}

.toast {
    background: var(--base-card-bg) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--base-border) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden !important;
}

.toast-header {
    background: var(--base-bg) !important;
    border-bottom: 1px solid var(--base-border) !important;
    color: var(--secondary-color) !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Responsive & Accessibility
   ========================================================================== */
@media (max-width: 768px) {
    .site-main {
        padding: var(--spacing-lg) 0 !important;
    }

    .btn,
    .home-cta-btn,
    .product-card-v2__cta {
        width: 100% !important;
        /* Full width buttons on mobile */
    }

    .product-card,
    .product-card-v2 {
        min-height: auto !important;
    }

    .section-heading {
        font-size: 1.75rem !important;
    }

    .hero-banner {
        min-height: 300px !important;
    }

    .hero-banner h1 {
        font-size: 2rem !important;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}

/* Checkout delivery fields — icon column + text (overrides global input padding) */
.checkout-input-wrap {
    display: flex !important;
    align-items: stretch !important;
    border: 1px solid var(--base-border) !important;
    border-radius: var(--radius-md) !important;
    background: #fff !important;
    overflow: hidden;
    box-shadow: none !important;
}

.checkout-input-wrap:focus-within {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12) !important;
}

.checkout-input-wrap--textarea {
    align-items: flex-start !important;
}

.checkout-input-wrap .checkout-input-icon {
    position: static !important;
    transform: none !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none;
}

.checkout-input-wrap .checkout-input-icon--top {
    align-self: flex-start !important;
    padding-top: 14px !important;
    min-height: 0 !important;
}

.checkout-input-wrap .checkout-input,
.checkout-input-wrap textarea.checkout-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 16px 12px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--base-text) !important;
}

.checkout-input-wrap textarea.checkout-input--textarea {
    min-height: 96px !important;
    padding-top: 12px !important;
    resize: vertical;
}

.checkout-input-wrap .checkout-input:focus,
.checkout-input-wrap textarea.checkout-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Cart panel quantity — override global 48px number inputs */
.shop-panel-item__qty-form input.shop-panel-qty__input[type="number"],
input.shop-panel-qty__input[type="number"] {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 32px !important;
    text-align: center !important;
    border-radius: 8px !important;
    border: 1px solid var(--base-border) !important;
    background: #fff !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.shop-panel-item__qty-form input.shop-panel-qty__input[type="number"]::-webkit-outer-spin-button,
.shop-panel-item__qty-form input.shop-panel-qty__input[type="number"]::-webkit-inner-spin-button,
input.shop-panel-qty__input[type="number"]::-webkit-outer-spin-button,
input.shop-panel-qty__input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.shop-panel-item__qty-form input.shop-panel-qty__input[type="number"]:focus,
input.shop-panel-qty__input[type="number"]:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.12) !important;
    outline: none !important;
}

/* ==========================================================================
   Storefront Responsive Polish & Overflow Guards
   Goal: zero horizontal scrolling and a usable layout from 320px → 4K.
   ========================================================================== */

/* --- 0. Global overflow guards & shrink-fixes ----------------------------- */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

img,
video,
iframe,
canvas,
picture,
object {
    max-width: 100% !important;
}

img,
video {
    height: auto;
}

table {
    max-width: 100% !important;
}

/* Allow flex/grid children to shrink below their intrinsic content width.
   Without this, long product titles, prices, or images blow out the layout. */
.row > [class*="col-"],
.shop-list-card .col,
.shop-list-card .col-auto,
.checkout-line-item__main,
.checkout-line-item__info,
.contact-line-item > div,
.shop-panel-item,
.product-card__body,
.product-card-v2__body {
    min-width: 0 !important;
}

/* Container: match the header's 1280px content column so the hero,
   trust strip, product grid, and all sections line up perfectly with
   the header on every viewport. */
.site-main > .container,
.site-main > .container-fluid,
.site-footer .site-footer__container {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* Tablet: tighten the side gutters slightly. */
@media (max-width: 991.98px) {
    .site-main > .container,
    .site-main > .container-fluid,
    .site-footer .site-footer__container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Tame the negative-margin row override so it can't overhang the container. */
@media (max-width: 575.98px) {
    .row {
        margin-left: calc(var(--spacing-sm) * -1) !important;
        margin-right: calc(var(--spacing-sm) * -1) !important;
    }

    .row > [class*="col-"] {
        padding-left: var(--spacing-sm) !important;
        padding-right: var(--spacing-sm) !important;
        margin-bottom: var(--spacing-md) !important;
    }
}

/* --- 1. Header / navigation ---------------------------------------------- */
@media (max-width: 991.98px) {
    .site-header__nav {
        min-height: 64px !important;
        padding-top: 8px;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }

    .site-header__brand,
    .navbar-brand.site-header__brand {
        font-size: 1.1rem !important;
        gap: 10px !important;
    }

    .brand-logo-wrap {
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
    }

    .site-header__collapse {
        background: rgba(11, 11, 26, 0.96);
        border-radius: 14px;
        margin-top: 10px;
        padding: 10px 12px 14px;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    }

    .site-nav-menu {
        width: 100%;
    }

    .site-header__links {
        flex-direction: column;
        align-items: stretch !important;
        gap: 2px;
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 10px 14px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
    }

    .header-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        justify-content: flex-end;
    }

    .header-icon-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }

    .header-icon-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .site-header__brand,
    .navbar-brand.site-header__brand {
        font-size: 1rem !important;
        gap: 8px !important;
    }

    .brand-logo-wrap {
        width: 38px !important;
        height: 38px !important;
    }

    .header-icon-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .header-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .header-badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: -4px;
        right: -4px;
        border-width: 2px;
    }
}

/* --- 2. Main / container spacing on small screens ------------------------- */
@media (max-width: 767.98px) {
    .site-main {
        padding: var(--spacing-lg) 0 var(--spacing-xl) !important;
    }

    .site-main > .container,
    .site-main > .container-fluid,
    .site-footer .site-footer__container,
    .site-header__container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 480px) {
    .site-main > .container,
    .site-main > .container-fluid,
    .site-footer .site-footer__container,
    .site-header__container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* --- 3. Hero banner ------------------------------------------------------ */
@media (max-width: 991.98px) {
    .hero-banner {
        min-height: 360px !important;
    }

    .hero-banner__content {
        padding: 40px 28px !important;
    }
}

@media (max-width: 575.98px) {
    .hero-banner {
        min-height: 280px !important;
        border-radius: 20px !important;
        margin-bottom: 1.25rem;
    }

    .hero-banner__content {
        padding: 28px 20px !important;
    }

    .hero-banner h1 {
        font-size: clamp(1.6rem, 7vw, 2.05rem) !important;
        margin-bottom: 10px;
    }

    .hero-banner .lead {
        font-size: 0.98rem !important;
        margin-bottom: 18px;
    }

    .hero-banner__btn {
        padding: 12px 22px !important;
        font-size: 1rem !important;
        height: 48px !important;
    }

    .hero-banner__eyebrow {
        font-size: 0.7rem;
        padding: 5px 11px;
    }
}

/* --- 4. Home trust strip (was always 4 columns) -------------------------- */
@media (max-width: 991.98px) {
    .home-trust-strip__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .home-trust-strip__grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .home-trust-card {
        flex-direction: row !important;
        align-items: center !important;
        padding: 14px !important;
        gap: 14px !important;
    }

    .home-trust-card__icon-wrap {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
    }

    .home-trust-card__icon-wrap svg {
        width: 22px;
        height: 22px;
    }
}

/* --- 5. Section headings & home sections --------------------------------- */
@media (max-width: 575.98px) {
    .section-heading {
        font-size: 1.45rem !important;
    }

    .section-lead,
    .page-header__lead {
        font-size: 0.95rem;
    }

    .home-section {
        margin-bottom: var(--spacing-xl) !important;
    }

    .home-section__header--split {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .home-section__header--split .home-offers-cta {
        align-self: stretch;
        text-align: center;
    }

    .page-header__title {
        font-size: 1.6rem;
    }
}

/* --- 6. Products page toolbar + grid + pagination ------------------------ */
@media (max-width: 575.98px) {
    .products-page-head {
        gap: 14px;
    }

    .products-page-footer {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .products-results-meta {
        text-align: center;
    }

    .shop-pagination,
    .shop-pagination__list {
        justify-content: center !important;
    }

    .shop-pagination__link {
        min-width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
        padding: 0 8px !important;
    }
}

/* --- 7. Product detail page ---------------------------------------------- */
@media (max-width: 991.98px) {
    .product-detail-card {
        padding: 22px !important;
    }
}

@media (max-width: 575.98px) {
    .product-page {
        padding-bottom: var(--spacing-xl);
    }

    .product-breadcrumb {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 18px;
    }

    .product-breadcrumb__current {
        max-width: 100%;
        white-space: normal;
    }

    .product-detail-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .product-title {
        font-size: 1.3rem !important;
    }

    .product-price {
        font-size: 1.4rem !important;
    }

    .product-meta-table th {
        width: 45%;
        font-size: 13px !important;
    }

    .product-meta-table td {
        font-size: 13px !important;
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions .btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .product-qty-row {
        gap: 12px;
    }

    .product-qty-control,
    .checkout-qty-control {
        width: 100%;
        justify-content: space-between;
    }

    .product-qty-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}

/* --- 8. Cart / wishlist list cards --------------------------------------- */
@media (max-width: 575.98px) {
    .shop-list-card {
        padding: 14px !important;
        border-radius: 14px;
    }

    .shop-list-card .row {
        flex-wrap: wrap !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .shop-list-card .col,
    .shop-list-card .col-auto {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .shop-list-card__img {
        width: 64px !important;
        height: 64px !important;
        border-radius: 10px;
    }

    .shop-list-card .col-auto:first-child {
        margin-right: 12px;
    }

    .shop-list-card .col {
        flex: 1 1 0;
    }

    .shop-list-card .col-auto.text-right,
    .shop-list-card .col-auto:last-child {
        flex-basis: 100% !important;
        width: 100% !important;
        text-align: left !important;
        margin-top: 12px;
    }

    .shop-list-card .form-inline {
        flex-wrap: wrap;
        gap: 6px;
    }

    .shop-list-card .form-inline .shop-panel-qty__input {
        margin-right: 0 !important;
    }
}

/* --- 9. Checkout & cart-checkout ----------------------------------------- */
@media (max-width: 991.98px) {
    .checkout-card {
        padding: 20px !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 575.98px) {
    .checkout-card {
        padding: 16px !important;
    }

    .checkout-card__head {
        gap: 10px;
        margin-bottom: 16px;
    }

    .checkout-card__title {
        font-size: 1.1rem !important;
    }

    .checkout-card__icon {
        width: 40px !important;
        height: 40px !important;
    }

    .checkout-card__icon svg {
        width: 22px;
        height: 22px;
    }

    .checkout-line-item {
        gap: 12px;
    }

    .checkout-line-item__thumb {
        width: 60px !important;
        height: 60px !important;
    }

    .checkout-grand {
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px 0 16px;
    }

    .checkout-grand__amount {
        font-size: 1.2rem !important;
    }

    .checkout-submit-btn {
        padding: 13px 16px !important;
        font-size: 15px !important;
    }

    .checkout-input-wrap .checkout-input,
    .checkout-input-wrap textarea.checkout-input {
        font-size: 15px !important;
    }
}

/* --- 10. About page ------------------------------------------------------ */
@media (max-width: 991.98px) {
    .about-image-main {
        height: 260px !important;
    }

    .gallery-main {
        height: 240px !important;
    }

    .gallery-side {
        height: 120px !important;
    }
}

@media (max-width: 575.98px) {
    .about-image-main {
        height: 200px !important;
    }

    .gallery-main {
        height: 200px !important;
    }

    .gallery-side {
        height: 110px !important;
    }

    .why-card {
        padding: 18px 16px !important;
    }

    .about-cta {
        padding: 24px 18px !important;
        border-radius: 16px;
    }

    .about-cta h3 {
        font-size: 1.35rem !important;
    }

    .about-cta p {
        font-size: 0.95rem !important;
    }

    .about-cta .btn {
        display: inline-flex;
        width: auto !important;
        margin: 4px 4px 0;
    }
}

/* --- 11. Contact page ---------------------------------------------------- */
@media (max-width: 575.98px) {
    .contact-info-card {
        padding: 22px 18px !important;
    }

    .contact-form-card {
        padding: 20px 18px !important;
    }

    .contact-info-card h3,
    .contact-form-card h3 {
        font-size: 1.3rem !important;
    }

    .contact-form-card .form-row {
        margin-left: 0;
        margin-right: 0;
    }

    .contact-form-card .form-row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Constrain Bootstrap modals on tiny screens */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 12px !important;
        max-width: calc(100vw - 24px) !important;
    }
}

/* --- 12. Offers page ----------------------------------------------------- */
@media (max-width: 575.98px) {
    .offers-page__empty {
        padding: 32px 18px !important;
    }
}

/* --- 13. Footer ---------------------------------------------------------- */
@media (max-width: 991.98px) {
    .site-footer__top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 18px;
    }

    .site-footer__social-wrap {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .site-footer__container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .site-footer__bottom {
        flex-direction: column !important;
        gap: 10px;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 10px;
    }

    .social-icons {
        flex-wrap: wrap;
    }
}

/* --- 14. Slide-in shop panels (cart / wishlist) -------------------------- */
@media (max-width: 480px) {
    .shop-panel {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .shop-panel__header {
        padding: 14px 16px;
    }

    .shop-panel__body {
        padding: 12px 14px 18px;
    }

    .shop-panel-item {
        grid-template-columns: 56px 1fr !important;
        gap: 10px !important;
    }

    .shop-panel-item__img {
        width: 56px !important;
        height: 56px !important;
    }

    .shop-panel-item__actions {
        grid-column: 1 / -1 !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
    }
}

/* --- 15. Floating action buttons ----------------------------------------- */
@media (max-width: 480px) {
    .floating-actions {
        bottom: 14px !important;
        right: 14px !important;
        gap: 10px !important;
    }

    .floating-action {
        width: 50px !important;
        height: 50px !important;
    }

    .floating-action svg {
        width: 22px;
        height: 22px;
    }
}

/* --- 16. Toast positioning on mobile ------------------------------------- */
@media (max-width: 480px) {
    .toast-container {
        left: var(--spacing-sm) !important;
        right: var(--spacing-sm) !important;
        bottom: var(--spacing-sm) !important;
    }

    .shop-toast {
        left: 50% !important;
        right: auto !important;
        max-width: calc(100vw - 24px) !important;
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
}

/* --- 17. Tracking page — extra small width fix --------------------------- */
@media (max-width: 575.98px) {
    .track-tabs {
        flex-wrap: wrap;
    }

    .track-tab {
        flex: 1 1 50%;
        font-size: 0.85rem !important;
        padding: 12px 8px !important;
    }

    .track-input-group {
        flex-wrap: wrap;
    }

    .track-input-group input {
        flex: 1 1 100%;
        order: 2;
        width: 100%;
        border-top: 1px solid #e8edf3;
    }

    .track-input-icon {
        border-right: none !important;
        order: 1;
    }

    .btn-track {
        flex: 1 1 100%;
        width: 100%;
        order: 3;
        min-height: 46px;
        border-top: 1px solid rgba(255, 255, 255, .25);
    }
}

/* --- 18. Long word / URL handling in user-generated content -------------- */
.product-description__body,
.product-description-card p,
.contact-line-text,
.checkout-line-item__name,
.shop-panel-item__title,
.product-card__title,
.product-card-v2__title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ==========================================================================
   Image / element size overrides (per user spec)
   Hero banner: 300px desktop → 220px mobile
   Trust strip icons: 40×40 at every viewport
   Product cards: kept at current 4:3 ratio (untouched)
   ========================================================================== */

/* Hero banner — shorter & with proportional padding so content still fits */
.hero-banner {
    min-height: 300px !important;
}

.hero-banner__content {
    padding: 36px 40px !important;
}

@media (max-width: 991.98px) {
    .hero-banner {
        min-height: 280px !important;
    }

    .hero-banner__content {
        padding: 32px 28px !important;
    }
}

@media (max-width: 767.98px) {
    .hero-banner {
        min-height: 240px !important;
    }

    .hero-banner__content {
        padding: 26px 22px !important;
    }
}

@media (max-width: 575.98px) {
    .hero-banner {
        min-height: 220px !important;
    }

    .hero-banner__content {
        padding: 22px 20px !important;
    }
}

/* Trust strip icons — uniform 40×40 across all viewports */
.home-trust-card__icon-wrap,
.home-trust-card__icon-wrap--delivery,
.home-trust-card__icon-wrap--secure,
.home-trust-card__icon-wrap--quality,
.home-trust-card__icon-wrap--support {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
}

.home-trust-card__icon-wrap svg {
    width: 22px !important;
    height: 22px !important;
}

/* Offers grids: 4 cards per row from tablet size up. */
@media (min-width: 768px) {
    .home-offers-grid > [class*="col-"],
    .offers-page__grid > [class*="col-"] {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}