/*
Theme Name: 39Ricambi B2B Theme
Theme URI: https://39ricambi.it
Description: A modern, premium B2B WooCommerce theme tailored for mobile parts wholesale. Restricts prices/checkout to approved business accounts.
Version: 1.0.2
Author: Antigravity AI
Author URI: https://github.com/google-deepmind
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 39ricambi-theme
Tags: e-commerce, custom-menu, translation-ready, two-columns
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   1. Design System & Custom Properties
   ========================================================================== */
:root {
    --font-primary: 'Outfit', sans-serif;
    
    /* Core Colors */
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-primary-light: #faf5ff;
    --color-primary-border: #f3e8ff;
    
    --color-dark: #0f172a;
    --color-dark-muted: #1e293b;
    --color-dark-light: #334155;
    
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-border: #e2e8f0;
    
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-text-white: #ffffff;
    
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 40px rgba(124, 58, 237, 0.08);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   2. Globals & Resets
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--color-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.w39-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
.w39-site-header {
    background-color: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.w39-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.w39-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.w39-logo span {
    color: var(--color-primary);
}

.w39-header-search {
    flex: 0 1 450px;
    margin: 0 20px;
}

.w39-header-search form {
    display: flex;
    position: relative;
}

.w39-header-search input[type="search"] {
    width: 100%;
    padding: 10px 16px;
    padding-right: 46px;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
    background-color: var(--color-bg);
}

.w39-header-search input[type="search"]:focus {
    border-color: var(--color-primary);
    background-color: var(--color-card);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.w39-header-search button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: var(--color-text-white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-header-search button:hover {
    background: var(--color-primary-hover);
}

.w39-main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.w39-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.w39-nav-menu a {
    color: var(--color-dark-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.w39-nav-menu a:hover,
.w39-nav-menu .current-menu-item a {
    color: var(--color-primary);
}

.w39-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.w39-btn-b2b {
    background-color: var(--color-primary);
    color: var(--color-text-white) !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.w39-btn-b2b:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

.w39-btn-b2b-outline {
    border: 1px solid var(--color-border);
    color: var(--color-dark-light) !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.w39-btn-b2b-outline:hover {
    background-color: var(--color-bg);
    border-color: var(--color-dark-light);
}

/* ==========================================================================
   4. Homepage / Hero Banner (Image Background)
   ========================================================================== */
.w39-hero-banner {
    position: relative;
    background: url('images/hero-bg.png') center center / cover no-repeat;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
}

.w39-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

.w39-hero-inner {
    position: relative;
    z-index: 2;
    padding: 80px 20px;
}

.w39-hero-headline {
    color: #ffffff;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 35px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.w39-hero-search-bar {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.w39-hero-search-bar form {
    display: flex;
    align-items: center;
}

.w39-hero-search-bar input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 20px;
    color: var(--color-dark);
    font-size: 1rem;
    font-family: inherit;
}

.w39-hero-search-bar input[type="text"]::placeholder {
    color: #94a3b8;
}

.w39-hero-search-bar button {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    font-family: inherit;
}

.w39-hero-search-bar button:hover {
    background: var(--color-primary-hover);
    transform: scale(1.02);
}

/* Legacy hero styles (keep for backwards compat) */
.w39-badge {
    background: rgba(124, 58, 237, 0.25);
    color: #c084fc;
    border: 1px solid rgba(124, 58, 237, 0.4);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 25px;
}

/* Brand Section & Grid */
.w39-brand-section {
    padding: 50px 0 60px 0;
}

.w39-section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
}

.w39-section-title span {
    color: var(--color-primary);
}

.w39-brand-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.w39-brand-card {
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 30px 20px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.w39-brand-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.w39-brand-icon {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-dark-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.w39-brand-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-fast);
}

.w39-brand-card:hover .w39-brand-icon img {
    transform: scale(1.08);
}

.w39-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.w39-brand-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.w39-brand-cta {
    display: inline-block;
    padding: 8px 22px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-dark-light);
    transition: var(--transition-fast);
    margin-top: auto;
}

/* Individual Brand card hover coloring */
.card-apple:hover { border-color: #000; }
.card-apple:hover .w39-brand-icon { color: #000; transform: scale(1.1); }
.card-apple:hover .w39-brand-cta { background: #000; color: #fff; border-color: #000; }

.card-samsung:hover { border-color: #1a73e8; }
.card-samsung:hover .w39-brand-icon { color: #1a73e8; transform: scale(1.1); }
.card-samsung:hover .w39-brand-cta { background: #1a73e8; color: #fff; border-color: #1a73e8; }

.card-xiaomi:hover { border-color: #ff6700; }
.card-xiaomi:hover .w39-brand-icon { color: #ff6700; transform: scale(1.1); }
.card-xiaomi:hover .w39-brand-cta { background: #ff6700; color: #fff; border-color: #ff6700; }

.card-huawei:hover { border-color: #ea040d; }
.card-huawei:hover .w39-brand-icon { color: #ea040d; transform: scale(1.1); }
.card-huawei:hover .w39-brand-cta { background: #ea040d; color: #fff; border-color: #ea040d; }

.card-google:hover { border-color: #34a853; }
.card-google:hover .w39-brand-icon { color: #34a853; transform: scale(1.1); }
.card-google:hover .w39-brand-cta { background: #34a853; color: #fff; border-color: #34a853; }

/* Featured Models Grid */
.w39-model-grid-section {
    padding: 60px 0;
    background-color: var(--color-card);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.w39-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.w39-model-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.w39-model-card:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-border);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.w39-model-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: var(--color-dark);
}

.w39-model-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   5. B2B Registration Page (Split Columns)
   ========================================================================== */
.w39-b2b-reg-container {
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.w39-b2b-row {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.w39-col-info {
    flex: 1;
}

.w39-badge-light {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-border);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.w39-b2b-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.25;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.w39-b2b-desc {
    font-size: 1.1rem;
    color: var(--color-dark-light);
    line-height: 1.6;
    margin-bottom: 40px;
}

.w39-benefit-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.w39-benefit-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.w39-benefit-icon {
    font-size: 1.8rem;
    background: var(--color-primary-light);
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-primary-border);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.05);
    flex-shrink: 0;
}

.w39-benefit-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-dark);
}

.w39-benefit-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.w39-col-form {
    flex: 1;
    display: flex;
    justify-content: center;
}

.w39-form-card {
    background: var(--color-card);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 550px;
    border-top: 6px solid var(--color-primary);
}

.w39-form-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-dark);
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.w39-form-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0 0 25px 0;
}

/* Custom WooCommerce Form Styling */
.w39-form-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.w39-form-row-split {
    display: flex;
    gap: 15px;
}

.w39-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.w39-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark-light);
    margin-bottom: 6px;
}

.w39-form-group input,
.w39-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-dark);
    background-color: var(--color-card);
    box-sizing: border-box;
    transition: var(--transition-fast);
    outline: none;
}

.w39-form-group input:focus,
.w39-form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.w39-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
}

.w39-checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.w39-checkbox-group label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    cursor: pointer;
}

/* ==========================================================================
   6. WooCommerce Styling & Integrations
   ========================================================================== */

/* Catalog restriction notice block */
.w39-login-to-see-price {
    display: inline-block;
    background: var(--color-primary-light);
    border: 1px dashed var(--color-primary-border);
    color: var(--color-primary) !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem !important;
    font-weight: 600;
    text-align: center;
    margin: 8px 0;
}

/* WooCommerce loop product item styling */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 25px !important;
    padding: 0 !important;
    margin: 30px 0 !important;
    list-style: none !important;
}

ul.products li.product {
    background-color: var(--color-card) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition-normal) !important;
}

ul.products li.product:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--color-primary-border) !important;
}

ul.products li.product img {
    margin: 0 auto 15px auto !important;
    border-radius: 10px !important;
    height: 180px !important;
    object-fit: contain !important;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--color-dark) !important;
    margin-bottom: 10px !important;
    height: 48px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

ul.products li.product .price {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: var(--color-primary) !important;
    margin-bottom: 15px !important;
}

/* SKU styling for loop products */
ul.products li.product .w39-sku-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

/* CTA "Request Access" buttons for guests */
.w39-b2b-cta-btn {
    text-align: center;
    background-color: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    margin-top: auto !important;
    transition: var(--transition-fast) !important;
    border: none !important;
}

.w39-b2b-cta-btn:hover {
    background-color: var(--color-primary-hover) !important;
    transform: scale(1.02) !important;
}

/* Standard Add to Cart Loop Button override */
ul.products li.product .add_to_cart_button,
ul.products li.product .button {
    background-color: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    margin-top: auto !important;
    border: none !important;
    transition: var(--transition-fast) !important;
}

ul.products li.product .add_to_cart_button:hover,
ul.products li.product .button:hover {
    background-color: var(--color-primary-hover) !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   Single Product Page — Premium 3-Column Layout
   ────────────────────────────────────────────────────────────────────────── */

/* ── Main 3-Column Grid ────────────────────────────────────────────────── */
.w39-sp-grid {
    display: grid;
    grid-template-columns: 420px 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* ── LEFT: Image Gallery ───────────────────────────────────────────────── */
.w39-sp-gallery {
    position: sticky;
    top: 100px;
}

.w39-sp-gallery-main {
    position: relative;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.w39-sp-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.w39-sp-gallery-main:hover .w39-sp-main-image {
    transform: scale(1.02);
}

.w39-sp-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    z-index: 2;
}

.w39-sp-zoom-btn:hover {
    background: var(--color-card);
    color: var(--color-primary);
    border-color: var(--color-primary-border);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.w39-sp-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Thumbnail Strip */
.w39-sp-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.w39-sp-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 2px solid var(--color-border);
    background: var(--color-card);
    padding: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.w39-sp-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.w39-sp-thumb:hover {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.w39-sp-thumb.is-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}


/* ── CENTER: Product Details ───────────────────────────────────────────── */
.w39-sp-details {
    padding-top: 4px;
}

/* Category badge */
.w39-sp-category-badge {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary) !important;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    border: 1px solid var(--color-primary-border);
    transition: var(--transition-fast);
}

.w39-sp-category-badge:hover {
    background: var(--color-primary);
    color: var(--color-text-white) !important;
}

/* Product Title */
.w39-sp-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

/* Short description */
.w39-sp-short-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.w39-sp-short-desc p:last-child {
    margin-bottom: 0;
}

/* Specifications Table */
.w39-sp-specs {
    margin-bottom: 24px;
}

.w39-sp-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}

.w39-sp-specs-table tr:nth-child(even) {
    background-color: var(--color-bg);
}

.w39-sp-specs-table tr:nth-child(odd) {
    background-color: var(--color-card);
}

.w39-sp-specs-table th,
.w39-sp-specs-table td {
    padding: 12px 18px;
    font-size: 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.w39-sp-specs-table tr:last-child th,
.w39-sp-specs-table tr:last-child td {
    border-bottom: none;
}

.w39-sp-specs-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    width: 38%;
    white-space: nowrap;
}

.w39-sp-specs-table td {
    font-weight: 500;
    color: var(--color-dark);
}

.w39-sp-specs-table td a {
    color: var(--color-primary);
    font-weight: 600;
}

.w39-sp-specs-table td a:hover {
    text-decoration: underline;
}

/* Meta (Category, Tags) */
.w39-sp-meta {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.w39-sp-meta-label {
    font-weight: 600;
    color: var(--color-dark-light);
    margin-right: 4px;
}

.w39-sp-meta a {
    color: var(--color-primary);
    font-weight: 500;
}

.w39-sp-meta a:hover {
    text-decoration: underline;
}


/* ── RIGHT: Price & Actions Sidebar ────────────────────────────────────── */
.w39-sp-sidebar {
    position: sticky;
    top: 100px;
}

.w39-sp-price-card {
    background: var(--color-card);
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent on top of price card */
.w39-sp-price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #a78bfa, var(--color-primary));
    background-size: 200% 100%;
    animation: w39-gradient-shift 4s ease infinite;
}

@keyframes w39-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Price */
.w39-sp-price {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}

.w39-sp-price .price,
.w39-sp-price .woocommerce-Price-amount {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: var(--color-dark) !important;
    letter-spacing: -0.5px;
}

.w39-sp-price del .woocommerce-Price-amount {
    font-size: 1.1rem !important;
    color: var(--color-text-muted) !important;
    font-weight: 500 !important;
}

.w39-sp-price ins {
    text-decoration: none;
}

.w39-sp-price .w39-login-to-see-price {
    font-size: 0.92rem !important;
    display: block;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
}

/* Stock badge */
.w39-sp-stock-row {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.w39-sp-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.w39-sp-stock--in {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px dashed rgba(16, 185, 129, 0.35);
}

.w39-sp-stock--out {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px dashed rgba(239, 68, 68, 0.3);
}

.w39-sp-stock--backorder {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px dashed rgba(245, 158, 11, 0.35);
}

.w39-sp-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.w39-sp-stock--in .w39-sp-stock-dot {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: w39-pulse-green 2s infinite;
}

.w39-sp-stock--out .w39-sp-stock-dot {
    background: #ef4444;
}

.w39-sp-stock--backorder .w39-sp-stock-dot {
    background: #f59e0b;
    animation: w39-pulse-amber 2s infinite;
}

@keyframes w39-pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

@keyframes w39-pulse-amber {
    0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.08); }
}

/* Shipping info */
.w39-sp-shipping-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
    margin-bottom: 22px;
    color: var(--color-text-muted);
}

.w39-sp-shipping-info svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary);
}

.w39-sp-shipping-text {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    line-height: 1.5;
}

.w39-sp-shipping-text strong {
    color: var(--color-dark);
    font-weight: 700;
}

/* Quantity row */
.w39-sp-qty-row {
    margin-bottom: 16px;
}

.w39-sp-qty-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.w39-sp-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-bg);
    width: fit-content;
}

.w39-sp-qty-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-dark);
    transition: var(--transition-fast);
}

.w39-sp-qty-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.w39-sp-qty-btn.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.w39-sp-qty-control .qty,
.w39-sp-qty-control input[type="number"] {
    width: 56px !important;
    height: 42px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid var(--color-border) !important;
    border-right: 1px solid var(--color-border) !important;
    border-radius: 0 !important;
    background: var(--color-card) !important;
    font-family: var(--font-primary) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--color-dark) !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.w39-sp-qty-control input::-webkit-outer-spin-button,
.w39-sp-qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart button */
.w39-sp-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: var(--color-text-white);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.w39-sp-add-to-cart::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.w39-sp-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35);
}

.w39-sp-add-to-cart:hover::after {
    opacity: 1;
}

.w39-sp-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* Guest login CTA */
.w39-sp-guest-cta {
    margin-top: 4px;
}

.w39-sp-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    border-radius: 12px;
    background: var(--color-primary-light);
    border: 2px dashed var(--color-primary-border);
    color: var(--color-primary) !important;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition-normal);
    text-decoration: none !important;
}

.w39-sp-login-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-white) !important;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}


/* ── Description Tabs ──────────────────────────────────────────────────── */
.w39-sp-tabs-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.w39-sp-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 28px;
}

.w39-sp-tab-btn {
    padding: 12px 28px;
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.w39-sp-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.w39-sp-tab-btn:hover {
    color: var(--color-dark);
}

.w39-sp-tab-btn.is-active {
    color: var(--color-dark);
    font-weight: 700;
}

.w39-sp-tab-btn.is-active::after {
    transform: scaleX(1);
}

.w39-sp-tab-content {
    transition: opacity 0.3s ease;
}

.w39-sp-description-content {
    max-width: 800px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-dark-light);
}

.w39-sp-description-content h2,
.w39-sp-description-content h3 {
    color: var(--color-dark);
    margin-top: 24px;
}

.w39-sp-description-content p {
    margin-bottom: 16px;
}

.w39-sp-description-content strong {
    color: var(--color-dark);
    font-weight: 700;
}


/* ── Related Products ──────────────────────────────────────────────────── */
.w39-sp-related {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.w39-sp-related-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 24px;
}

.w39-sp-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.w39-sp-related-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    text-decoration: none !important;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.w39-sp-related-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-border);
}

.w39-sp-related-sku {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
    border: 1px solid var(--color-border);
}

.w39-sp-related-img {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.w39-sp-related-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.w39-sp-related-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.w39-sp-related-price {
    margin-top: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

.w39-sp-related-price .w39-login-to-see-price {
    font-size: 0.78rem !important;
    padding: 4px 8px;
}


/* ── Lightbox / Zoom Overlay ───────────────────────────────────────────── */
.w39-sp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.w39-sp-lightbox.is-visible {
    opacity: 1;
}

.w39-sp-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.w39-sp-lightbox-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
}

.w39-sp-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.w39-sp-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark);
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
}

.w39-sp-lightbox-close:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}


/* ── Single Product Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .w39-sp-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .w39-sp-sidebar {
        grid-column: 1 / -1;
        position: static;
    }

    .w39-sp-price-card {
        max-width: 480px;
    }

    .w39-sp-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .w39-sp-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .w39-sp-gallery-main {
        aspect-ratio: 4 / 3;
    }

    .w39-sp-title {
        font-size: 1.5rem;
    }

    .w39-sp-price-card {
        max-width: 100%;
    }

    .w39-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .w39-sp-tabs-section {
        margin-top: 32px;
        padding-top: 28px;
    }

    .w39-sp-related {
        margin-top: 32px;
        padding-top: 28px;
    }
}

@media (max-width: 480px) {
    .w39-sp-gallery-main {
        padding: 16px;
        border-radius: 12px;
    }

    .w39-sp-thumb {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
    }

    .w39-sp-price-card {
        padding: 22px 18px;
    }

    .w39-sp-related-grid {
        grid-template-columns: 1fr;
    }

    .w39-sp-title {
        font-size: 1.3rem;
    }

    .w39-sp-specs-table th,
    .w39-sp-specs-table td {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}


/* ==========================================================================
   7. Footer
   ========================================================================== */
.w39-site-footer {
    background-color: var(--color-dark);
    color: #94a3b8;
    padding: 60px 0 30px 0;
    border-top: 1px solid var(--color-dark-muted);
}

.w39-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.w39-footer-widget h4 {
    color: var(--color-text-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.w39-footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.w39-footer-widget ul li {
    margin-bottom: 12px;
}

.w39-footer-widget ul li a {
    color: #cbd5e1;
    transition: var(--transition-fast);
}

.w39-footer-widget ul li a:hover {
    color: var(--color-primary);
    padding-left: 4px;
}

.w39-footer-info p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.w39-footer-bottom {
    border-top: 1px solid var(--color-dark-muted);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.w39-footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.w39-vat-declaration {
    font-size: 0.8rem;
    color: #64748b;
}

/* ==========================================================================
   8. Responsive Layouts
   ========================================================================== */
@media (max-width: 1024px) {
    .w39-brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .w39-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .w39-header-inner {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
        gap: 15px;
    }
    
    .w39-header-search {
        width: 100%;
        margin: 0;
    }
    
    .w39-main-nav {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .w39-nav-menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
    }
    
    .w39-hero-headline {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .w39-hero-search-bar {
        max-width: 100%;
    }
    
    .w39-brand-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    
    .w39-b2b-row {
        flex-direction: column;
        gap: 40px;
    }
    
    .w39-footer-grid {
        grid-template-columns: 1fr;
    }
    
    .w39-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .w39-brand-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   9. Dedicated B2B Registration Page
   ========================================================================== */

/* Hero Banner */
.w39-reg-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    padding: 60px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.w39-reg-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.w39-reg-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.w39-reg-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.w39-reg-hero-title {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px 0;
    letter-spacing: -1px;
}

.w39-reg-hero-title span {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.w39-reg-hero-subtitle {
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0;
}

/* Main Layout */
.w39-reg-layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    padding: 50px 0 80px;
}

.w39-reg-info {
    flex: 1;
    position: sticky;
    top: 120px;
}

.w39-reg-form-col {
    flex: 1.15;
    display: flex;
    justify-content: center;
}

/* Steps Section */
.w39-reg-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-dark);
    margin: 0 0 20px 0;
}

.w39-step-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.w39-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.w39-step-number {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.w39-step-content h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
}

.w39-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Login CTA */
.w39-reg-login-cta {
    margin-top: 30px;
    padding: 20px 24px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary-border);
    border-radius: 12px;
}

.w39-reg-login-cta p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-dark-light);
}

.w39-reg-login-cta a {
    color: var(--color-primary);
}

/* Required asterisk */
.w39-required {
    color: #ef4444;
    font-weight: 700;
}

/* Custom Form on Registration Page */
.w39-custom-reg-form .w39-form-group {
    margin-bottom: 16px;
}

.w39-custom-reg-form .w39-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark-light);
    margin-bottom: 6px;
    display: block;
}

.w39-custom-reg-form .w39-form-group input,
.w39-custom-reg-form .w39-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-dark);
    background-color: var(--color-card);
    box-sizing: border-box;
    transition: var(--transition-fast);
    outline: none;
}

.w39-custom-reg-form .w39-form-group input:focus,
.w39-custom-reg-form .w39-form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.w39-custom-reg-form .w39-form-row-split {
    display: flex;
    gap: 15px;
}

.w39-custom-reg-form .w39-checkbox-group {
    margin: 16px 0 0;
}

/* File Upload Area */
.w39-file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--color-bg);
}

.w39-file-upload-area:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.w39-file-upload-area.w39-file-attached {
    border-color: var(--color-success);
    border-style: solid;
    background: #f0fdf4;
}

.w39-file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.w39-file-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.w39-upload-icon {
    font-size: 2rem;
}

.w39-upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark-light);
}

.w39-upload-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.w39-file-upload-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

.w39-file-icon {
    font-size: 1.3rem;
}

.w39-file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-success);
}

/* Submit Button */
.w39-submit-btn {
    width: 100%;
    padding: 16px 30px !important;
    background: var(--color-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-normal) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.2) !important;
}

.w39-submit-btn:hover {
    background: var(--color-primary-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3) !important;
}

/* Registration Page Responsive */
@media (max-width: 1024px) {
    .w39-reg-layout {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .w39-reg-hero-title {
        font-size: 2rem;
    }

    .w39-reg-layout {
        flex-direction: column;
        gap: 40px;
        padding: 30px 0 50px;
    }

    .w39-reg-info {
        position: static;
    }

    .w39-reg-form-col {
        width: 100%;
    }

    .w39-custom-reg-form .w39-form-row-split {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================================================
   10. Custom Shop Banner & Brand Categories
   ========================================================================== */
.w39-shop-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    padding: 50px 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.w39-shop-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
    top: -100px;
    right: -50px;
    pointer-events: none;
}

.w39-shop-search {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 6px;
    transition: var(--transition-normal);
}

.w39-shop-search:focus-within {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.w39-shop-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.w39-cat-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-weight: 600;
    color: var(--color-dark-light);
    transition: var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.w39-cat-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.w39-cat-btn.active {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}

/* Homepage Product Grid (Catalog Preview) Styling */
.w39-products-preview {
    padding: 60px 0;
}

.w39-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.w39-product-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.w39-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-border);
}

.w39-product-card .w39-sku-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    letter-spacing: 0.3px;
    z-index: 2;
}

.w39-product-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
    overflow: hidden;
}

.w39-product-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.w39-product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.w39-product-title a {
    color: var(--color-dark);
    transition: var(--transition-fast);
}

.w39-product-title a:hover {
    color: var(--color-primary);
}

.w39-product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.w39-product-price-hidden {
    display: inline-block;
    background: var(--color-primary-light);
    border: 1px dashed var(--color-primary-border);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.w39-add-to-cart-btn {
    text-align: center;
    background-color: var(--color-primary);
    color: var(--color-text-white) !important;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    display: block;
}

.w39-add-to-cart-btn:hover {
    background-color: var(--color-primary-hover);
    color: #fff !important;
}

/* Section Divider */
.w39-section-divider {
    text-align: center;
    padding: 30px 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.w39-section-divider::before,
.w39-section-divider::after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 1px;
    background: var(--color-border);
    vertical-align: middle;
    margin: 0 15px;
}

/* ==========================================================================
   11. My Account / Login / Dashboard
   ========================================================================== */

/* --- Login & Register Page Layout --- */
.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: 1000px;
    margin: 0 auto;
}

.woocommerce-account:not(.logged-in) #customer_login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.woocommerce-account:not(.logged-in) #customer_login > div {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--shadow-sm);
}

.woocommerce-account:not(.logged-in) #customer_login h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
}

/* --- Form Inputs (login & registration) --- */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-form-row label,
.woocommerce-account .woocommerce-MyAccount-content .form-row label,
.woocommerce-account #customer_login .woocommerce-form-row label,
.woocommerce-account #customer_login .form-row label {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 6px;
    display: block;
    font-size: 0.9rem;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Input,
.woocommerce-account .woocommerce-MyAccount-content .input-text,
.woocommerce-account .woocommerce-MyAccount-content select,
.woocommerce-account #customer_login .woocommerce-Input,
.woocommerce-account #customer_login .input-text,
.woocommerce-account #customer_login select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    background: var(--color-bg) !important;
    color: var(--color-dark) !important;
    transition: var(--transition-fast) !important;
    outline: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Input:focus,
.woocommerce-account .woocommerce-MyAccount-content .input-text:focus,
.woocommerce-account #customer_login .woocommerce-Input:focus,
.woocommerce-account #customer_login .input-text:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

/* --- Submit/Login Buttons --- */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-button,
.woocommerce-account #customer_login .woocommerce-form-login__submit,
.woocommerce-account #customer_login .woocommerce-form-register__submit,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"],
.woocommerce-account #customer_login button[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"],
.woocommerce-account #customer_login input[type="submit"] {
    background: var(--color-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 30px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: var(--transition-fast) !important;
    width: 100%;
    margin-top: 10px;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-button:hover,
.woocommerce-account #customer_login .woocommerce-form-login__submit:hover,
.woocommerce-account #customer_login .woocommerce-form-register__submit:hover,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-account #customer_login button[type="submit"]:hover {
    background: var(--color-primary-hover) !important;
    transform: translateY(-1px);
}

/* Lost password link */
.woocommerce-account .woocommerce-LostPassword a {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Logged-In My Account Layout --- */
.woocommerce-account.logged-in .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    display: inline-block;
    vertical-align: top;
}

/* Sidebar Navigation */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 260px;
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 25px 0;
    margin-right: 30px;
    box-shadow: var(--shadow-premium);
    position: sticky;
    top: 100px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 14px 25px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-left-color: rgba(124, 58, 237, 0.5);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: rgba(124, 58, 237, 0.15);
    color: #fff;
    border-left-color: var(--color-primary);
}

/* Main Content Area */
.woocommerce-account .woocommerce-MyAccount-content {
    width: calc(100% - 310px);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
}

.woocommerce-account .woocommerce-MyAccount-content > h2,
.woocommerce-account .woocommerce-MyAccount-content > h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
}

.woocommerce-account .woocommerce-MyAccount-content > p {
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.woocommerce-account .woocommerce-MyAccount-content > p a {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Orders Table --- */
.woocommerce-account .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-account .woocommerce-orders-table th {
    background: var(--color-bg);
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
    text-align: left;
}

.woocommerce-account .woocommerce-orders-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-dark);
}

.woocommerce-account .woocommerce-orders-table tr:hover td {
    background: rgba(124, 58, 237, 0.03);
}

.woocommerce-account .woocommerce-orders-table .woocommerce-button {
    width: auto;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

/* --- Address Cards --- */
.woocommerce-account .woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.woocommerce-account .woocommerce-Address {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 25px;
}

.woocommerce-account .woocommerce-Address-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.woocommerce-account .woocommerce-Address-title a {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- WooCommerce Notices --- */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--color-dark);
    font-weight: 500;
    margin-bottom: 25px;
}

.woocommerce-account .woocommerce-message::before,
.woocommerce-account .woocommerce-info::before {
    color: var(--color-primary);
}

.woocommerce-account .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px 20px;
    color: #991b1b;
    font-weight: 500;
    margin-bottom: 25px;
    list-style: none;
}

/* --- Responsive Account --- */
@media (max-width: 768px) {
    .woocommerce-account:not(.logged-in) #customer_login {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        position: static;
        margin-right: 0;
        margin-bottom: 25px;
        border-radius: 12px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        padding: 10px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        padding: 10px 15px;
        border-left: none;
        border-radius: 8px;
        font-size: 0.85rem;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        width: 100%;
    }

    .woocommerce-account .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   12. Search Autocomplete Dropdown
   ========================================================================== */
.w39-search-wrapper {
    position: relative;
    width: 100%;
}

.w39-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    margin-top: 6px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.w39-search-heading {
    padding: 12px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.w39-search-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    color: var(--color-dark);
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.w39-search-item a:hover,
.w39-search-item.w39-search-active a {
    background: rgba(124, 58, 237, 0.06);
    color: var(--color-primary);
}

.w39-search-breadcrumb {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.w39-search-cat-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.w39-search-cat-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 12px;
}

.w39-search-all a {
    background: var(--color-bg);
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: none;
}

.w39-search-all a:hover {
    background: rgba(124, 58, 237, 0.1);
}

/* ==========================================================================
   13. Brand Navigation Bar & Mega Menu
   ========================================================================== */

/* --- Brand Sub-Header Bar --- */
.w39-brand-nav-bar {
    background: #0f172a; /* Deep, rich slate background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 99;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.w39-brand-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 54px; /* Slightly taller for more breathing room */
}

.w39-brand-nav-item {
    position: static;
    display: flex;
    align-items: center;
    height: 100%;
}

.w39-brand-nav-item > a {
    display: flex;
    align-items: center;
    padding: 6px 16px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.w39-brand-nav-item > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.w39-brand-nav-item.is-active > a {
    color: #ffffff;
    background: var(--color-primary, #2563eb);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* --- Mega Dropdown Panel --- */
.w39-brand-mega-panel {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100%;
    /* Premium Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--color-primary, #2563eb);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.1), 0 10px 25px rgba(15, 23, 42, 0.06);
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    /* Elegant entrance animation */
    transform: translateY(12px) scale(0.99);
    transform-origin: top center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s;
    
    z-index: 9999;
    padding: 40px 0 30px;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.w39-brand-mega-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Sleek Scrollbar */
.w39-brand-mega-panel::-webkit-scrollbar {
    width: 6px;
}
.w39-brand-mega-panel::-webkit-scrollbar-track {
    background: transparent;
}
.w39-brand-mega-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.w39-brand-mega-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

.w39-brand-mega-inner {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 40px;
    max-width: 1300px;
    margin: 0 auto;
}

/* --- Column group inside a brand panel --- */
.w39-brand-mega-column {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 240px;
    padding: 0 12px;
    margin-bottom: 20px;
}

.w39-brand-mega-column-heading {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.w39-brand-mega-column-heading a {
    color: #475569;
    transition: color 0.2s ease;
}

.w39-brand-mega-column-heading a:hover {
    color: var(--color-primary, #2563eb);
}

.w39-brand-mega-model-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.w39-brand-mega-model-list li {
    margin: 0 0 2px 0;
}

.w39-brand-mega-model-list li a {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

/* Micro-interaction on hover */
.w39-brand-mega-model-list li a:hover {
    background: #f1f5f9;
    color: var(--color-primary, #2563eb);
    transform: translateX(4px); /* Subtle slide right */
}

/* View All button at the bottom of brand panel */
.w39-brand-mega-viewall {
    width: 100%;
    padding: 24px 52px 0;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
    flex-basis: 100%;
}

.w39-mega-view-all-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary, #2563eb);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.06);
}

.w39-mega-view-all-btn:hover {
    background: rgba(37, 99, 235, 0.12);
    transform: translateX(3px);
}

/* --- Others Panel (multi-column grid) --- */
.w39-brand-mega-others {
    /* inherits full-width positioning from .w39-brand-mega-panel */
}

.w39-brand-mega-others-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px 16px;
}

.w39-others-column {
    min-width: 0;
    max-width: none;
    margin-bottom: 0;
}

.w39-others-view-all {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.w39-others-view-all:hover {
    color: var(--color-primary, #2563eb);
    background: #e2e8f0;
    transform: translateX(3px);
}

.w39-mega-empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.95rem;
    padding: 20px;
    text-align: center;
    width: 100%;
}

/* --- Mobile Brand Accordion --- */
.w39-mobile-brands {
    display: none;
}

.w39-mobile-brand-item {
    border-bottom: 1px solid var(--color-border);
}

.w39-mobile-brand-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    cursor: pointer;
}

.w39-mobile-brand-toggle svg {
    transition: transform 0.25s ease;
    color: var(--color-text-muted);
}

.w39-mobile-brand-toggle.is-open svg {
    transform: rotate(180deg);
}

.w39-mobile-brand-content {
    display: none;
    padding: 0 0 14px 8px;
}

.w39-mobile-brand-content.is-open {
    display: block;
    animation: w39SlideDown 0.3s ease;
}

@keyframes w39SlideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 2000px; }
}

.w39-mobile-group-label {
    font-weight: 700;
    font-size: 0.82rem;
    color: #1e3a5f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px;
    margin-top: 4px;
}

.w39-mobile-group-label a {
    color: #1e3a5f;
}

.w39-mobile-brand-content ul {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 0;
}

.w39-mobile-brand-content ul li a {
    display: block;
    padding: 5px 0;
    color: var(--color-dark-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.w39-mobile-brand-content ul li a:hover {
    color: #2563eb;
}

.w39-mobile-view-all {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    padding: 8px 0;
    margin-top: 4px;
}


/* ==========================================================================
   14. Header Cart Icon
   ========================================================================== */
.w39-header-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--color-dark);
    transition: var(--transition-fast);
    margin-right: 10px;
}

.w39-header-cart:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-primary);
}

.w39-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-fast);
}

.w39-cart-count.has-items {
    opacity: 1;
    transform: scale(1);
}

/* Cart Wrapper (for hover dropdown) */
.w39-header-cart-wrapper {
    position: relative;
    margin-right: 10px;
}

.w39-header-cart-wrapper:hover .w39-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mini Cart Dropdown */
.w39-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow: hidden;
}

.w39-mini-cart-heading {
    padding: 14px 18px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.w39-mini-cart-items {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.w39-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.w39-mini-cart-thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg);
}

.w39-mini-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.w39-mini-cart-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.w39-mini-cart-qty {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}

.w39-mini-cart-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.w39-mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.w39-mini-cart-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    border: 1px solid var(--color-border);
    color: var(--color-dark);
    margin-bottom: 8px;
}

.w39-mini-cart-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.w39-mini-cart-btn.w39-mini-cart-checkout {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    margin-bottom: 0;
}

.w39-mini-cart-btn.w39-mini-cart-checkout:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.w39-mini-cart-empty {
    padding: 30px 18px;
    text-align: center;
}

.w39-mini-cart-empty p {
    color: var(--color-text-muted);
    margin: 10px 0 15px;
    font-size: 0.9rem;
}

.w39-mini-cart-empty .w39-mini-cart-btn {
    display: inline-block;
}

/* ==========================================================================
   14b. Shop Search Bar (clean, no banner)
   ========================================================================== */
.w39-shop-searchbar {
    margin-bottom: 25px;
}

.w39-shop-searchbar form {
    display: flex;
    align-items: center;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
    max-width: 700px;
}

.w39-shop-searchbar form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.w39-shop-searchbar input[type="search"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-dark);
    background: transparent;
}

.w39-shop-searchbar button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    margin: 4px;
    border-radius: 10px;
}

.w39-shop-searchbar button:hover {
    background: var(--color-primary-hover);
}


/* ==========================================================================
   15. Shop Sidebar Layout
   ========================================================================== */
.w39-shop-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}

/* --- Left Sidebar --- */
.w39-shop-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.w39-sidebar-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.w39-sidebar-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 65vh;
    overflow-y: auto;
}

/* Scrollbar styling */
.w39-sidebar-cats::-webkit-scrollbar {
    width: 4px;
}
.w39-sidebar-cats::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

/* Brand item */
.w39-sidebar-brand {
    border-bottom: 1px solid var(--color-border);
}

.w39-sidebar-brand:last-child {
    border-bottom: none;
}

.w39-sidebar-brand-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.w39-sidebar-brand-link a {
    flex: 1;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition-fast);
}

.w39-sidebar-brand-link a:hover,
.w39-sidebar-brand-link a.active {
    color: var(--color-primary);
    background: rgba(124, 58, 237, 0.05);
}

.w39-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.w39-sidebar-toggle:hover {
    color: var(--color-primary);
}

.w39-sidebar-brand.is-expanded .w39-sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Sub-models list (collapsed by default) */
.w39-sidebar-models {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--color-bg);
}

.w39-sidebar-brand.is-expanded .w39-sidebar-models {
    max-height: 2000px; /* Large enough for any list */
}

.w39-sidebar-models li a {
    display: block;
    padding: 9px 20px 9px 35px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    border-left: 2px solid transparent;
}

.w39-sidebar-models li a:hover,
.w39-sidebar-models li a.active {
    color: var(--color-primary);
    background: rgba(124, 58, 237, 0.06);
    border-left-color: var(--color-primary);
}

/* --- Right Content Area --- */
.w39-shop-content {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   16. Sub-Category Cards Grid
   ========================================================================== */
.w39-subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

.w39-subcat-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 20px 15px;
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.w39-subcat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.2);
}

.w39-subcat-img {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 10px;
}

.w39-subcat-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-fast);
}

.w39-subcat-card:hover .w39-subcat-img img {
    transform: scale(1.06);
}

.w39-subcat-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: 10px;
    color: var(--color-text-muted);
}

.w39-subcat-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.w39-subcat-count {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   17. Shop Layout Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .w39-shop-layout {
        flex-direction: column;
    }

    .w39-shop-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .w39-sidebar-cats {
        max-height: 300px;
    }

    .w39-subcat-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .w39-subcat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .w39-subcat-card {
        padding: 14px 10px;
    }

    .w39-subcat-img {
        height: 90px;
    }
}

/* ==========================================================================
   18. Contact Us Page
   ========================================================================== */
.w39-contact-page {
    padding: 50px 0 80px;
}

.w39-contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.w39-contact-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.w39-contact-header p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.w39-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* WhatsApp Main Card */
.w39-contact-whatsapp {
    background: linear-gradient(135deg, #075e54 0%, #128C7E 50%, #25D366 100%);
    border: none !important;
    color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.w39-contact-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fff;
}

.w39-contact-whatsapp h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #fff;
}

.w39-contact-subtitle {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.w39-contact-number {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.w39-contact-note {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 340px;
}

.w39-contact-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #128C7E;
    padding: 14px 35px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.w39-contact-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    color: #075e54;
}

/* Info Cards Stack */
.w39-contact-info-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.w39-contact-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.w39-contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
}

.w39-contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.w39-contact-info-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 6px;
}

.w39-contact-info-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

.w39-contact-small {
    font-size: 0.8rem !important;
    opacity: 0.7;
    margin-top: 6px !important;
}

/* FAQ Section */
.w39-contact-faq {
    margin-top: 20px;
}

.w39-contact-faq h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 30px;
}

.w39-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.w39-faq-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.w39-faq-item:hover {
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-lg);
}

.w39-faq-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.w39-faq-item p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Contact Responsive */
@media (max-width: 768px) {
    .w39-contact-grid {
        grid-template-columns: 1fr;
    }
    .w39-faq-grid {
        grid-template-columns: 1fr;
    }
    .w39-contact-header h1 {
        font-size: 1.8rem;
    }
    .w39-contact-number {
        font-size: 1.4rem;
    }
}

/* ==========================================================================
   19. Back to Top Button
   ========================================================================== */
.w39-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.2s;
    z-index: 9990;
}

.w39-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.w39-back-to-top:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

/* ==========================================================================
   20. Return Policy & RMA Page
   ========================================================================== */
.w39-rma-page {
    padding: 50px 0 80px;
}

/* Header */
.w39-rma-header {
    text-align: center;
    margin-bottom: 55px;
}

.w39-rma-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.w39-rma-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 14px;
}

.w39-rma-header > p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto 25px;
    line-height: 1.7;
}

.w39-rma-trust {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.w39-rma-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
}

.w39-rma-trust-item svg {
    color: #16a34a;
}

/* Sections */
.w39-rma-section {
    margin-bottom: 50px;
}

.w39-rma-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.w39-rma-step-num {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.w39-rma-section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
}

.w39-rma-intro {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    max-width: 700px;
}

/* Steps Grid */
.w39-rma-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.w39-rma-step-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 28px 22px;
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.w39-rma-step-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.2);
}

.w39-rma-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.w39-rma-step-num-small {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.w39-rma-step-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.w39-rma-step-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.w39-rma-step-card a {
    color: var(--color-primary);
    font-weight: 600;
}

/* Portal CTA */
.w39-rma-portal-cta {
    text-align: center;
}

.w39-rma-portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e1b4b, #4c1d95);
    color: #fff;
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 20px rgba(30, 27, 75, 0.3);
}

.w39-rma-portal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(30, 27, 75, 0.4);
    color: #fff;
}

/* Features Grid (Pickup & Timing) */
.w39-rma-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.w39-rma-feature {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.w39-rma-feature:hover {
    box-shadow: var(--shadow-lg);
}

.w39-rma-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.w39-rma-feature h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.w39-rma-feature p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Alert Box */
.w39-rma-alert {
    display: flex;
    gap: 18px;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 50px;
}

.w39-rma-alert-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.w39-rma-alert-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 8px;
}

.w39-rma-alert-content > p {
    font-size: 0.9rem;
    color: #78350f;
    margin-bottom: 12px;
}

.w39-rma-alert-content ul {
    padding-left: 20px;
    margin: 0;
}

.w39-rma-alert-content li {
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.7;
    margin-bottom: 4px;
}

/* Policies Grid (B2B / B2C) */
.w39-rma-policies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.w39-rma-policy-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.w39-rma-policy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.w39-rma-b2b::before {
    background: linear-gradient(90deg, #1e1b4b, #7c3aed);
}

.w39-rma-b2c::before {
    background: linear-gradient(90deg, #059669, #34d399);
}

.w39-rma-policy-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.w39-rma-b2b .w39-rma-policy-label {
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-primary);
}

.w39-rma-b2c .w39-rma-policy-label {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.w39-rma-policy-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.w39-rma-policy-card > p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.w39-rma-policy-highlight {
    background: var(--color-bg);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--color-dark);
    line-height: 1.6;
    border-left: 3px solid var(--color-primary);
}

.w39-rma-b2c .w39-rma-policy-highlight {
    border-left-color: #059669;
}

/* Voucher Note */
.w39-rma-voucher-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    padding: 16px 22px;
}

.w39-rma-voucher-note svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.w39-rma-voucher-note p {
    font-size: 0.92rem;
    color: var(--color-dark);
    line-height: 1.5;
    margin: 0;
}

/* Guarantee Card */
.w39-rma-guarantee-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-radius: 16px;
    padding: 35px;
    color: #fff;
    box-shadow: var(--shadow-premium);
}

.w39-rma-guarantee-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #a78bfa;
}

.w39-rma-guarantee-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
}

/* Bottom CTA */
.w39-rma-bottom-cta {
    text-align: center;
    margin-top: 55px;
    padding: 45px;
    background: var(--color-bg);
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.w39-rma-bottom-cta h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.w39-rma-bottom-cta > p {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
}

.w39-rma-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.w39-rma-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.w39-rma-wa-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    color: #fff;
}

.w39-rma-portal-btn-alt {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    color: var(--color-dark);
    transition: var(--transition-fast);
}

.w39-rma-portal-btn-alt:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* RMA Responsive */
@media (max-width: 900px) {
    .w39-rma-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .w39-rma-features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .w39-rma-header h1 {
        font-size: 1.8rem;
    }
    .w39-rma-steps-grid {
        grid-template-columns: 1fr;
    }
    .w39-rma-policies-grid {
        grid-template-columns: 1fr;
    }
    .w39-rma-guarantee-card {
        flex-direction: column;
        text-align: center;
    }
    .w39-rma-trust {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .w39-rma-alert {
        flex-direction: column;
    }
}

/* ==========================================================================
   21. RMA Wizard (Returns Portal Form)
   ========================================================================== */

/* Tabs */
.w39-rma-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    background: var(--color-bg);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--color-border);
    max-width: 400px;
}

.w39-rma-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition-fast);
}

.w39-rma-tab.active {
    background: var(--color-card);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.w39-rma-tab-content {
    display: none;
}

.w39-rma-tab-content.active {
    display: block;
}

/* Progress Bar */
.w39-rma-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}

.w39-rma-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.w39-rma-progress-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.w39-rma-progress-step.active .w39-rma-progress-num {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.w39-rma-progress-step.completed .w39-rma-progress-num {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.w39-rma-progress-step span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.w39-rma-progress-step.active span {
    color: var(--color-primary);
}

.w39-rma-progress-line {
    height: 2px;
    width: 80px;
    background: var(--color-border);
    margin: 0 12px;
    margin-bottom: 24px;
}

/* Steps */
.w39-rma-step {
    display: none;
}

.w39-rma-step.active {
    display: block;
    animation: rmaFadeIn 0.3s ease;
}

@keyframes rmaFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.w39-rma-step h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 6px;
    text-align: center;
}

.w39-rma-step-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Type Cards (Step 1) */
.w39-rma-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.w39-rma-type-card {
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.w39-rma-type-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.w39-rma-type-card.selected {
    border-color: var(--color-primary);
    background: rgba(124, 58, 237, 0.04);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.w39-rma-type-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.w39-rma-type-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.w39-rma-type-card p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Navigation Buttons */
.w39-rma-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.w39-rma-btn-next,
.w39-rma-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    padding: 13px 30px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-rma-btn-next:hover,
.w39-rma-btn-submit:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.w39-rma-btn-next:disabled,
.w39-rma-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.w39-rma-btn-submit {
    background: #059669;
}

.w39-rma-btn-submit:hover {
    background: #047857;
}

.w39-rma-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-text-muted);
    padding: 13px 20px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-rma-btn-back:hover {
    border-color: var(--color-dark);
    color: var(--color-dark);
}

/* Field Groups (Step 2 & 3) */
.w39-rma-field-group {
    margin-bottom: 24px;
}

.w39-rma-field-group label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.w39-rma-field-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-card);
    transition: var(--transition-fast);
    outline: none;
    appearance: auto;
}

.w39-rma-field-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.w39-rma-field-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-card);
    transition: var(--transition-fast);
    outline: none;
    resize: vertical;
}

.w39-rma-field-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Order Items Grid (Step 2) */
.w39-rma-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.w39-rma-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-rma-item-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.w39-rma-item-card.selected {
    border-color: var(--color-primary);
    background: rgba(124, 58, 237, 0.04);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.w39-rma-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w39-rma-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.w39-rma-item-placeholder {
    font-size: 1.5rem;
}

.w39-rma-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.w39-rma-item-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Selected Product Summary (Step 3) */
.w39-rma-selected-product {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.w39-rma-summary-row {
    font-size: 0.95rem;
    color: var(--color-dark);
    line-height: 1.6;
}

/* Photo Upload */
.w39-rma-photo-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.w39-rma-photo-type {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 12px 16px;
}

.w39-rma-photo-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: #92400e;
}

.w39-rma-photo-hint {
    display: block;
    font-size: 0.8rem;
    color: #a16207;
    margin-top: 2px;
}

.w39-rma-dropzone {
    border: 2px dashed var(--color-border);
    border-radius: 14px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--color-bg);
}

.w39-rma-dropzone:hover,
.w39-rma-dropzone.dragover {
    border-color: var(--color-primary);
    background: rgba(124, 58, 237, 0.04);
}

.w39-rma-dropzone p {
    font-weight: 700;
    color: var(--color-dark);
    margin: 10px 0 4px;
}

.w39-rma-dropzone span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.w39-rma-photo-previews {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.w39-rma-photo-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.w39-rma-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.w39-rma-photo-preview.uploading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.w39-rma-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Loading Spinner */
.w39-rma-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.w39-rma-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: rmaSpinner 0.8s linear infinite;
}

@keyframes rmaSpinner {
    to { transform: rotate(360deg); }
}

/* Success State */
.w39-rma-success {
    text-align: center;
    padding: 50px 20px;
}

.w39-rma-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.w39-rma-success h2 {
    color: #059669;
}

.w39-rma-success p {
    color: var(--color-text-muted);
    max-width: 450px;
    margin: 0 auto 25px;
    line-height: 1.7;
}

.w39-rma-success-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.w39-rma-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 13px 25px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.w39-rma-btn-wa:hover {
    background: #128C7E;
    color: #fff;
}

/* My Returns Table */
.w39-rma-returns-table {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}

.w39-rma-returns-header {
    display: grid;
    grid-template-columns: 70px 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 14px 20px;
    background: var(--color-bg);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}

.w39-rma-returns-row {
    display: grid;
    grid-template-columns: 70px 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 16px 20px;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-dark);
}

.w39-rma-returns-row:last-child {
    border-bottom: none;
}

.w39-rma-returns-id {
    font-weight: 700;
    color: var(--color-primary);
}

.w39-rma-returns-product small {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.w39-rma-returns-voucher {
    grid-column: 1 / -1;
    background: #ecfdf5;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #065f46;
    margin-top: 4px;
}

.w39-rma-returns-voucher code {
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Status Badges */
.w39-rma-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.w39-rma-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.w39-rma-status-approved {
    background: #d1fae5;
    color: #065f46;
}

.w39-rma-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.w39-rma-status-completed {
    background: #ede9fe;
    color: #5b21b6;
}

/* Empty State */
.w39-rma-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
    text-align: center;
}

.w39-rma-empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 16px 0 6px;
}

.w39-rma-empty-state p {
    color: var(--color-text-muted);
}

/* Login Prompt */
.w39-rma-login-prompt {
    text-align: center;
    padding: 60px 20px;
}

.w39-rma-login-prompt h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin: 16px 0 8px;
}

.w39-rma-login-prompt p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.w39-rma-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition-fast);
}

.w39-rma-login-btn:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

/* RMA Wizard Responsive */
@media (max-width: 768px) {
    .w39-rma-type-grid {
        grid-template-columns: 1fr;
    }
    .w39-rma-progress-line {
        width: 40px;
    }
    .w39-rma-photo-types {
        grid-template-columns: 1fr;
    }
    .w39-rma-returns-header,
    .w39-rma-returns-row {
        grid-template-columns: 60px 1fr 1fr;
        font-size: 0.82rem;
    }
    .w39-rma-returns-header span:nth-child(3),
    .w39-rma-returns-row span:nth-child(3) {
        display: none;
    }
    .w39-rma-returns-header span:nth-child(5),
    .w39-rma-returns-row span:nth-child(5) {
        display: none;
    }
}

/* ==========================================================================
   22. Mobile Hamburger & Global Responsive
   ========================================================================== */

/* Hamburger button — hidden on desktop */
.w39-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 110;
    order: 3;
}

.w39-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.w39-mobile-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.w39-mobile-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.w39-mobile-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* On desktop, collapse wrapper is just a flex row */
.w39-header-collapse {
    display: contents;
}

/* ======== Tablet & Below (≤ 900px) ======== */
@media (max-width: 900px) {
    /* Show hamburger */
    .w39-mobile-toggle {
        display: flex;
    }

    /* Header layout: logo + hamburger only */
    .w39-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
        position: relative;
    }

    .w39-logo {
        flex: 1;
        font-size: 1.3rem;
    }

    /* Collapse wrapper */
    .w39-header-collapse {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 10;
        padding-top: 14px;
        border-top: 1px solid var(--color-border);
        margin-top: 14px;
        gap: 14px;
    }

    .w39-header-collapse.is-open {
        display: flex;
    }

    /* Search bar full width */
    .w39-header-search {
        flex: none;
        width: 100%;
        margin: 0;
    }

    /* Nav stacks vertically */
    .w39-main-nav {
        width: 100%;
    }

    .w39-nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .w39-nav-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    .w39-nav-menu li:last-child {
        border-bottom: none;
    }

    .w39-nav-menu a {
        display: block;
        padding: 12px 0;
        font-size: 1rem;
    }

    /* Actions row */
    .w39-header-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding-bottom: 4px;
    }

    .w39-btn-b2b,
    .w39-btn-b2b-outline {
        flex: 1;
        justify-content: center;
        min-width: 120px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Hide mini cart dropdown on mobile */
    .w39-mini-cart-dropdown {
        display: none !important;
    }

    /* Hide desktop brand nav bar on mobile */
    .w39-brand-nav-bar {
        display: none;
    }

    /* Show mobile brand accordion inside hamburger */
    .w39-header-collapse.is-open ~ .w39-mobile-brands,
    .w39-mobile-brands {
        display: none;
    }

    .w39-header-collapse.is-open + .w39-mobile-brands,
    .w39-mobile-brands.is-open {
        display: block;
        padding: 0 20px;
        background: var(--color-card);
        border-bottom: 1px solid var(--color-border);
    }

    /* Hero */
    .w39-hero-banner {
        min-height: 260px;
    }

    .w39-hero-inner {
        padding: 40px 16px;
    }

    .w39-hero-headline {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    /* Brand icons grid */
    .w39-brand-section {
        padding: 30px 0;
    }

    .w39-brand-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    /* Featured sections */
    .w39-featured-section,
    .w39-trust-section {
        padding: 30px 0;
    }

    /* Footer */
    .w39-footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Container padding */
    .w39-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Shop sidebar */
    .w39-shop-layout {
        grid-template-columns: 1fr;
    }

    .w39-shop-sidebar {
        position: static;
        width: 100%;
    }

    /* Product grid */
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* Account page */
    .woocommerce-MyAccount-navigation {
        width: 100%;
        float: none;
    }

    .woocommerce-MyAccount-content {
        width: 100%;
        float: none;
    }
}

/* ======== Phone (≤ 480px) ======== */
@media (max-width: 480px) {
    .w39-hero-headline {
        font-size: 1.5rem;
    }

    .w39-brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }

    .w39-rma-type-grid {
        grid-template-columns: 1fr;
    }

    .w39-contact-grid {
        grid-template-columns: 1fr;
    }

    .w39-rma-steps-grid {
        grid-template-columns: 1fr;
    }

    .w39-rma-progress-step span {
        font-size: 0.7rem;
    }

    .w39-rma-progress-line {
        width: 20px;
    }

    .w39-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}


/* ==========================================================================
   WooCommerce Login & Register Form Styling (Premium B2B Design)
   ========================================================================== */
.woocommerce-account .woocommerce {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 40px auto;
    max-width: 1000px;
    gap: 40px;
}

.woocommerce-account .u-columns.col2-set {
    display: flex;
    width: 100%;
    gap: 40px;
    flex-wrap: wrap;
}

.woocommerce-account .u-column1.col-1,
.woocommerce-account .u-column2.col-2 {
    flex: 1;
    min-width: 320px;
}

.woocommerce-form-login,
.woocommerce-form-register {
    background-color: var(--color-card, #ffffff);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-premium, 0 10px 25px rgba(0,0,0,0.05));
    border: 1px solid var(--color-border, #e2e8f0);
    margin-top: 0;
}

.woocommerce-form-login h2,
.woocommerce-form-register h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark, #0f172a);
    margin-bottom: 24px;
    text-align: center;
}

.woocommerce-form-row {
    margin-bottom: 20px;
}

.woocommerce-form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-main, #0f172a);
}

.woocommerce-form-row input.input-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    font-family: var(--font-primary, 'Outfit', sans-serif);
    font-size: 1rem;
    background-color: var(--color-bg, #f8fafc);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-form-row input.input-text:focus {
    outline: none;
    border-color: var(--color-primary, #7c3aed);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.woocommerce-form-login .button,
.woocommerce-form-register .button {
    width: 100%;
    padding: 14px;
    background-color: var(--color-primary, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.woocommerce-form-login .button:hover,
.woocommerce-form-register .button:hover {
    background-color: var(--color-primary-hover, #6d28d9);
}

.woocommerce-form-login .button:active,
.woocommerce-form-register .button:active {
    transform: scale(0.98);
}

.woocommerce-LostPassword {
    text-align: center;
    margin-top: 16px;
}

.woocommerce-LostPassword a {
    color: var(--color-text-muted, #64748b);
    font-size: 0.9rem;
    text-decoration: none;
}

.woocommerce-LostPassword a:hover {
    color: var(--color-primary, #7c3aed);
    text-decoration: underline;
}

/* Form checkbox styling */
.woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--color-text-muted, #64748b);
}

@media (max-width: 768px) {
    .woocommerce-account .u-columns.col2-set {
        flex-direction: column;
    }
}

/* ==========================================================================
   Premium Split-Screen Login
   ========================================================================== */
.w39-login-split-container {
    display: flex;
    min-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin: 40px auto;
    max-width: 1200px;
    background: var(--color-card);
}

.w39-login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--color-dark) 0%, #312e81 100%);
    color: var(--color-text-white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.w39-login-left::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGNpcmNsZSBjeD0iMSIgY3k9IjEiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4=') repeat;
    opacity: 0.5;
}

.w39-login-branding {
    position: relative;
    z-index: 2;
    max-width: 400px;
}

.w39-login-branding h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.w39-login-branding h1 span {
    color: var(--color-primary);
}

.w39-login-branding p {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.w39-login-right {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.w39-login-form-wrapper {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
}

.w39-login-form-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--color-dark);
}

.w39-login-form-wrapper form.login {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.w39-login-register-prompt {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.w39-login-register-prompt p {
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

.w39-btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.w39-btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

@media (max-width: 900px) {
    .w39-login-split-container {
        flex-direction: column;
    }
    .w39-login-left {
        padding: 40px;
        min-height: 300px;
    }
    .w39-login-right {
        padding: 40px 20px;
    }
}

/* ==========================================================================
   Login Page Brand Panel Enhancements
   ========================================================================== */

/* B2B Badge on login left panel */
.w39-login-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.25);
    color: #c084fc;
    border: 1px solid rgba(124, 58, 237, 0.4);
    padding: 5px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

/* Brands section on login */
.w39-login-brands-section {
    margin-top: 32px;
    margin-bottom: 28px;
}

.w39-login-brands-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
}

/* Brand chips grid — 5 per row on large, 2 per row on mobile */
.w39-login-brands-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.w39-login-brand-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    cursor: default;
}

.w39-login-brand-chip:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.w39-login-brand-chip img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    /* Invert dark logos to white for dark background */
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: var(--transition-fast);
}

.w39-login-brand-chip:hover img {
    opacity: 1;
    filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(220deg);
}

.w39-login-brand-chip span {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Trust row */
.w39-login-trust-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.w39-login-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.w39-login-trust-item svg {
    color: #a78bfa;
    flex-shrink: 0;
}

/* Responsive adjustments for login brand chips */
@media (max-width: 1100px) {
    .w39-login-brands-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .w39-login-brands-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    .w39-login-brand-chip {
        padding: 8px 5px;
    }
    .w39-login-brand-chip img {
        width: 22px;
        height: 22px;
    }
    .w39-login-brand-chip span {
        font-size: 0.6rem;
    }
    .w39-login-trust-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .w39-login-trust-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .w39-login-brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Custom Login Form Fields (standalone page-custom-login.php)
   ========================================================================== */

/* Alert Messages */
.w39-login-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: w39-shake 0.4s ease;
}

.w39-login-alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.w39-login-alert-error svg {
    flex-shrink: 0;
    color: #ef4444;
}

@keyframes w39-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Form Groups */
.w39-custom-login-form .w39-form-group {
    margin-bottom: 22px;
}

.w39-custom-login-form .w39-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-dark);
    margin-bottom: 8px;
}

/* Input Wrapper with Icon */
.w39-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.w39-input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 1;
}

.w39-input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-bg);
    transition: all 0.2s ease;
    outline: none;
}

.w39-input-wrapper input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    background: #fff;
}

.w39-input-wrapper input:focus ~ .w39-input-icon,
.w39-input-wrapper:focus-within .w39-input-icon {
    color: var(--color-primary);
}

.w39-input-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Password Toggle Button */
.w39-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1;
}

.w39-password-toggle:hover {
    color: var(--color-primary);
}

/* Form Row (Remember Me + Forgot Password) */
.w39-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Custom Checkbox */
.w39-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
    position: relative;
}

.w39-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-border);
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-bg);
    position: relative;
}

.w39-checkbox-label input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.w39-checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Forgot Password Link */
.w39-forgot-link {
    font-size: 0.88rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.w39-forgot-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Login Submit Button */
.w39-login-submit {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.w39-login-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.w39-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35);
}

.w39-login-submit:hover::before {
    left: 100%;
}

.w39-login-submit:active {
    transform: translateY(0);
}

.w39-login-submit.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.w39-btn-loader {
    display: inline-flex;
    align-items: center;
}

.w39-btn-loader svg {
    animation: w39-spin 1s linear infinite;
}

@keyframes w39-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* WooCommerce notices override inside custom login */
.w39-login-form-wrapper .woocommerce-notices-wrapper .woocommerce-message,
.w39-login-form-wrapper .woocommerce-notices-wrapper .woocommerce-error,
.w39-login-form-wrapper .woocommerce-notices-wrapper .woocommerce-info {
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   Add-to-Cart Popup Modal
   ========================================================================== */

/* Backdrop */
.w39-atc-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: w39-backdrop-in 0.3s ease;
}

.w39-atc-backdrop.is-visible {
    display: flex;
}

.w39-atc-backdrop.is-hiding {
    animation: w39-backdrop-out 0.3s ease forwards;
}

@keyframes w39-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes w39-backdrop-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Popup Card */
.w39-atc-popup-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 36px 32px 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: w39-popup-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.is-hiding .w39-atc-popup-card {
    animation: w39-popup-slide-out 0.25s ease forwards;
}

@keyframes w39-popup-slide-in {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes w39-popup-slide-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
}

/* Close Button */
.w39-atc-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w39-atc-close:hover {
    background: var(--color-bg);
    color: var(--color-dark);
}

/* Success Icon */
.w39-atc-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--color-success);
    animation: w39-checkmark-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes w39-checkmark-pop {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.w39-atc-success-icon svg {
    animation: w39-checkmark-draw 0.4s ease 0.3s both;
}

@keyframes w39-checkmark-draw {
    from {
        stroke-dasharray: 30;
        stroke-dashoffset: 30;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Title */
.w39-atc-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 12px;
}

/* Product Info */
.w39-atc-product-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.w39-atc-product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.w39-atc-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.3;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons */
.w39-atc-actions {
    display: flex;
    gap: 10px;
}

.w39-atc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 16px;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.w39-atc-btn-outline {
    background: #fff;
    color: var(--color-dark);
    border: 1.5px solid var(--color-border);
}

.w39-atc-btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(124, 58, 237, 0.04);
}

.w39-atc-btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: #fff;
    border: 1.5px solid transparent;
}

.w39-atc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
    color: #fff;
}

/* Progress Bar (auto-dismiss indicator) */
.w39-atc-progress-bar {
    margin-top: 20px;
    height: 3px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}

.w39-atc-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    border-radius: 3px;
    animation: w39-progress-shrink 8s linear forwards;
}

@keyframes w39-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==========================================================================
   Cart Count Bounce Animation
   ========================================================================== */
.w39-cart-bounce {
    animation: w39-bounce-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes w39-bounce-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Popup Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .w39-atc-popup-card {
        padding: 28px 20px 22px;
        max-width: 340px;
    }
    .w39-atc-actions {
        flex-direction: column;
    }
    .w39-atc-btn {
        width: 100%;
    }
    .w39-atc-success-icon {
        width: 52px;
        height: 52px;
    }
    .w39-atc-success-icon svg {
        width: 26px;
        height: 26px;
    }
}

/* ==========================================================================
   23. Cart Page — Premium Custom Layout
   ========================================================================== */
.w39-cart-container {
    max-width: 1200px;
    margin: 20px auto;
}

.w39-cart-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

/* Cart Table Layout */
.w39-cart-main {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.w39-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.w39-cart-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--color-border);
}

.w39-cart-table td {
    padding: 20px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

/* Trash Icon styling */
.w39-cart-remove {
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.w39-cart-remove:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
}

/* Product Info Block */
.w39-cart-prod-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.w39-cart-prod-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 4px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.w39-cart-prod-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.w39-cart-prod-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.w39-cart-prod-name {
    font-weight: 700;
    color: var(--color-dark);
    font-size: 0.95rem;
    line-height: 1.35;
}

.w39-cart-prod-name a {
    color: var(--color-dark);
}

.w39-cart-prod-name a:hover {
    color: var(--color-primary);
}

.w39-cart-prod-details dl.variation {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.w39-cart-prod-details dl.variation dt {
    font-weight: 600;
    float: none;
}

.w39-cart-prod-details dl.variation dd {
    margin: 0;
}

/* Internal Reference edit link & input */
.w39-cart-ref-field {
    margin-top: 6px;
    display: flex;
}

.w39-cart-ref-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    border: 1px dashed transparent;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.w39-cart-ref-label:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.w39-cart-ref-label svg {
    margin-top: -1px;
}

.w39-cart-ref-input {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-dark);
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    outline: none;
    max-width: 180px;
}

.w39-cart-ref-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-border);
}

/* Stock capsules */
.w39-cart-stock {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.w39-cart-stock--in {
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-success);
}

.w39-cart-stock--out {
    background: rgba(239, 68, 68, 0.08);
    color: var(--color-danger);
}

/* Quantity Controls in table */
.w39-cart-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg);
}

.w39-cart-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-dark);
    transition: var(--transition-fast);
}

.w39-cart-qty-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.w39-cart-qty-control .qty {
    width: 44px !important;
    height: 32px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid var(--color-border) !important;
    border-right: 1px solid var(--color-border) !important;
    border-radius: 0 !important;
    background: var(--color-card) !important;
    font-family: var(--font-primary) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--color-dark) !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.w39-cart-qty-control .qty::-webkit-outer-spin-button,
.w39-cart-qty-control .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price & subtotal formatting */
.w39-cart-table td.product-price,
.w39-cart-table td.product-subtotal {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-dark);
}

.w39-cart-table td.product-subtotal {
    color: var(--color-primary);
    font-weight: 800;
}

/* Cart action buttons below table */
.w39-cart-actions-row td {
    padding: 24px 16px 8px 16px;
    border-bottom: none;
}

.w39-cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.w39-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    background: #fff;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-btn-outline:hover {
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.02);
}

.w39-btn-outline svg {
    margin-top: -1px;
}

.w39-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%);
    color: var(--color-text-white);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}

.w39-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    color: #fff;
}

/* RIGHT: Order Summary Card */
.w39-cart-totals-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.w39-cart-totals-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #a78bfa, var(--color-primary));
}

.w39-cart-totals-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.w39-cart-totals-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.w39-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.w39-cart-total-row .w39-cart-row-value {
    font-weight: 700;
    color: var(--color-dark);
}

.w39-cart-total-row.tax-row {
    font-size: 0.85rem;
}

.w39-cart-total-row.w39-cart-grand-total {
    padding-top: 14px;
    border-top: 1px dashed var(--color-border);
    font-size: 1.05rem;
    color: var(--color-dark);
}

.w39-cart-total-row.w39-cart-grand-total .w39-cart-row-value,
.w39-cart-total-row.w39-cart-grand-total .woocommerce-Price-amount {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--color-primary) !important;
}

.w39-cart-checkout-action .w39-btn-checkout {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
}

.w39-cart-terms-note {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin-top: 14px;
    margin-bottom: 0;
    text-align: center;
}

.w39-cart-terms-note a {
    color: var(--color-primary);
    font-weight: 600;
}


/* ==========================================================================
   24. Checkout Page — Premium Custom Layout
   ========================================================================== */
.w39-checkout-container {
    max-width: 1200px;
    margin: 20px auto;
}

.w39-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Card layout blocks */
.w39-checkout-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.w39-checkout-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--color-border);
}

.w39-checkout-card-header.no-border {
    border-bottom: none;
    margin-bottom: 14px;
}

.w39-checkout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.w39-checkout-card-header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    color: var(--color-dark);
}

/* Grids for inputs */
.w39-details-fields-grid,
.w39-invoice-fields-grid,
.w39-shipping-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

/* Force full width fields */
.w39-styled.billing_email_field,
.w39-styled.billing_phone_field,
.w39-styled.billing_address_1_field,
.w39-styled.billing_address_2_field,
.w39-styled.billing_country_field,
.w39-styled.billing_company_field,
.w39-styled.billing_vat_field {
    grid-column: 1 / -1;
}

/* Input Fields styling overrides */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.woocommerce-billing-fields label,
.woocommerce-shipping-fields label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields select,
.woocommerce-shipping-fields input[type="text"],
.woocommerce-shipping-fields select {
    width: 100% !important;
    height: 44px !important;
    padding: 8px 16px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    font-family: var(--font-primary) !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: var(--color-dark) !important;
    background: var(--color-bg) !important;
    outline: none !important;
    transition: var(--transition-fast) !important;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-shipping-fields input:focus {
    border-color: var(--color-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px var(--color-primary-border) !important;
}

/* Invoice accordion container */
.w39-checkout-invoice-accordion {
    padding: 0;
    border-style: dashed;
    border-color: rgba(124, 58, 237, 0.35);
    background: var(--color-card);
}

.w39-checkout-accordion-trigger {
    width: 100%;
    padding: 22px 28px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
    text-align: left;
}

.w39-checkout-accordion-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.w39-accordion-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.w39-accordion-title-wrap strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-dark);
}

.w39-accordion-title-wrap span {
    font-size: 0.76rem;
    color: var(--color-text-muted);
}

.w39-checkout-accordion-chevron {
    color: var(--color-text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.w39-checkout-accordion-trigger.is-active .w39-checkout-accordion-chevron {
    transform: rotate(180deg);
}

.w39-checkout-accordion-content {
    border-top: 1px dashed var(--color-border);
    padding: 24px 28px;
    background: var(--color-bg);
}

/* RIGHT: Checkout Sidebar Order Summary */
.w39-checkout-totals-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.w39-checkout-totals-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #a78bfa, var(--color-primary));
}

/* Sidebar items list */
.w39-checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 20px;
    border-bottom: 1.5px solid var(--color-border);
    padding-bottom: 16px;
}

.w39-checkout-item-card {
    display: flex;
    gap: 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    position: relative;
}

.w39-checkout-item-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    padding: 2px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.w39-checkout-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.w39-checkout-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.w39-checkout-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.35;
    padding-right: 14px;
}

.w39-checkout-item-meta {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

.w39-checkout-item-meta p {
    margin: 0;
}

.w39-checkout-item-stock-wrap {
    margin-top: 2px;
}

.w39-checkout-stock-warning {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.w39-checkout-stock-good {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-success);
}

.w39-checkout-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

/* Mini incrementer */
.w39-checkout-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 2px;
}

.w39-checkout-qty-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.w39-checkout-qty-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.w39-checkout-qty-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-dark);
    min-width: 14px;
    text-align: center;
}

.w39-checkout-item-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-primary);
}

.w39-checkout-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.w39-checkout-item-remove:hover {
    color: var(--color-danger);
}

/* Sidebar Totals block */
.w39-checkout-totals {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.w39-checkout-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.w39-checkout-totals-val {
    font-weight: 700;
    color: var(--color-dark);
}

.w39-checkout-totals-row.grand-total {
    padding-top: 12px;
    border-top: 1px dashed var(--color-border);
    font-size: 1.05rem;
    color: var(--color-dark);
}

.w39-checkout-totals-row.grand-total .w39-checkout-totals-val,
.w39-checkout-totals-row.grand-total .woocommerce-Price-amount {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: var(--color-primary) !important;
}

/* Dynamic Free Shipping Bar */
.w39-checkout-free-shipping-progress {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
}

.w39-checkout-free-shipping-progress.completed {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.18);
}

.w39-progress-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 8px;
    line-height: 1.35;
}

.w39-checkout-free-shipping-progress.completed .w39-progress-text {
    color: var(--color-success-hover);
}

.w39-progress-bar {
    height: 6px;
    background: rgba(226, 232, 240, 0.8);
    border-radius: 6px;
    overflow: hidden;
}

.w39-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 6px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.w39-checkout-free-shipping-progress.completed .w39-progress-fill {
    background: linear-gradient(90deg, var(--color-success), #34d399);
}

/* Payment fields override to fit card */
#payment {
    background: var(--color-bg) !important;
    border-radius: 12px !important;
    border: 1px solid var(--color-border) !important;
    padding: 16px !important;
    margin-top: 16px;
}

#payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    border-bottom: 1.5px solid var(--color-border) !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
}

#payment ul.payment_methods li {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
}

#payment ul.payment_methods li:last-child {
    margin-bottom: 0 !important;
}

#payment ul.payment_methods label {
    font-weight: 700 !important;
    color: var(--color-dark) !important;
    cursor: pointer;
}

#payment div.payment_box {
    background: #fff !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    color: var(--color-text-muted) !important;
    margin: 8px 0 0 0 !important;
}

#payment div.payment_box::before {
    display: none !important;
}

/* Checkout CTA submit button */
#place_order {
    width: 100%;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6d28d9 100%) !important;
    color: var(--color-text-white) !important;
    font-family: var(--font-primary) !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25) !important;
}

#place_order:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35) !important;
}

#place_order:active {
    transform: translateY(0) !important;
}


/* ==========================================================================
   25. Cart and Checkout Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .w39-cart-grid,
    .w39-checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .w39-cart-sidebar,
    .w39-checkout-sidebar {
        position: static;
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .w39-cart-main,
    .w39-checkout-card {
        padding: 16px;
    }

    .w39-details-fields-grid,
    .w39-invoice-fields-grid,
    .w39-shipping-fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .w39-cart-table thead {
        display: none; /* Hide headings on mobile, rely on label attributes */
    }

    .w39-cart-table tr {
        display: block;
        border-bottom: 2px solid var(--color-border);
        position: relative;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .w39-cart-table tr:last-child {
        border-bottom: none;
    }

    .w39-cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0 !important;
        border-bottom: none;
    }

    .w39-cart-table td.product-remove {
        position: absolute;
        top: 8px;
        right: 0;
        padding: 0 !important;
    }

    .w39-cart-table td.product-info {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-right: 40px !important;
    }

    .w39-cart-prod-wrap {
        width: 100%;
    }

    .w39-cart-table td::before {
        content: attr(data-title);
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--color-text-muted);
        text-transform: uppercase;
    }

    .w39-cart-table td.product-info::before,
    .w39-cart-table td.product-remove::before {
        display: none;
    }

    .w39-cart-actions-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .w39-cart-actions-bar a,
    .w39-cart-actions-bar button {
        width: 100%;
        justify-content: center;
    }

    .w39-checkout-accordion-trigger {
        padding: 16px 20px;
    }

    .w39-checkout-accordion-content {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .w39-cart-prod-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .w39-cart-prod-thumb {
        width: 52px;
        height: 52px;
    }

    .w39-checkout-item-card {
        padding: 10px;
    }

    .w39-checkout-totals-card {
        padding: 16px;
    }
}

