/*
Theme Name: MobilePartsWala
Theme URI: https://mobilepartswala.in
Author: MobilePartsWala
Description: Custom theme for MobilePartsWala mobile parts store
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mobilepartswala
*/

/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800;900&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ─── VARIABLES ─── */
:root {
    --blue: #1a73e8;
    --blue-dark: #0d47a1;
    --navy: #0a1628;
    --navy-mid: #0d2137;
    --orange: #ff5722;
    --white: #ffffff;
    --light-bg: #f0f4f8;
    --light-blue: #e3f2fd;
    --border: #e8f0fe;
    --text: #333333;
    --text-light: #666666;
    --green: #2e7d32;
}

/* ─── RESET ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--light-bg); color: var(--text); }
a { text-decoration: none; color: var(--blue); }
img { max-width: 100%; height: auto; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ─── REWARD BANNER ─── */
.reward-banner {
    background: linear-gradient(90deg, var(--blue-dark), var(--blue), var(--blue-dark));
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ─── FLASH BANNER ─── */
.flash-banner {
    background: linear-gradient(135deg, var(--orange), #e64a19);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.flash-banner h3 {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 900;
}
.flash-banner a {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
}
.flash-banner a:hover { background: rgba(255,255,255,0.35); }

/* ─── NAVBAR ─── */
#navbar {
    background: white;
    box-shadow: 0 1px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 200;
}
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 66px;
    padding: 0 20px;
    gap: 16px;
}
.site-logo {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--blue);
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo:hover { color: var(--blue-dark); }

/* Navigation menu */
#primary-menu {
    flex: 1;
    display: flex;
    gap: 24px;
    justify-content: center;
    list-style: none;
}
#primary-menu li a {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: color 0.2s;
    text-decoration: none;
}
#primary-menu li a:hover { color: var(--blue); }

/* Navbar right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.points-badge {
    background: var(--light-blue);
    color: var(--blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.btn-cart {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: inline-block;
}
.btn-cart:hover { color: white; opacity: 0.9; }

/* ─── HERO ─── */
.hero-section {
    background: linear-gradient(135deg, #050e1f 0%, var(--navy) 55%, var(--navy-mid) 100%);
    padding: 90px 20px 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -100px; right: -60px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(26,115,232,0.12) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}
.hero-badge {
    background: rgba(26,115,232,0.15);
    border: 1px solid rgba(26,115,232,0.35);
    color: #64b5f6;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 24px;
}
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: 52px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    color: white;
    margin-bottom: 6px;
}
.hero-title span { color: var(--blue); display: block; }
.hero-subtitle {
    color: #90caf9;
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 460px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 8px 24px rgba(26,115,232,0.35);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.btn-primary:hover { color: white; transform: translateY(-2px); }
.btn-secondary {
    background: rgba(255,255,255,0.07);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.btn-secondary:hover { color: white; background: rgba(255,255,255,0.12); }
.hero-free-ship { color: #4caf50; margin-top: 18px; font-size: 14px; font-weight: 600; }

/* Hero visual */
.hero-phone {
    display: flex;
    justify-content: center;
    align-items: center;
}
.phone-mock {
    position: relative;
    width: 260px;
}
.phone-body {
    width: 190px;
    height: 340px;
    background: linear-gradient(160deg, #162035, #1e3a5f);
    border-radius: 32px;
    border: 2px solid rgba(26,115,232,0.4);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(26,115,232,0.25);
}
.phone-icon { font-size: 44px; }
.phone-line { width: 60px; height: 4px; background: linear-gradient(90deg, var(--blue), #64b5f6); border-radius: 2px; }
.phone-label { font-size: 10px; color: #64b5f6; font-weight: 800; letter-spacing: 3px; font-family: 'Syne', sans-serif; }
.price-badge {
    position: absolute;
    top: 12px; right: -6px;
    background: var(--orange);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255,87,34,0.4);
}
.pts-badge {
    position: absolute;
    bottom: 58px; left: -14px;
    background: var(--blue);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(26,115,232,0.4);
}

/* ─── FEATURE STRIP ─── */
.feature-strip {
    background: white;
    border-bottom: 1px solid var(--border);
}
.feature-strip-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 20px;
}
.feature-item {
    padding: 24px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid var(--border);
}
.feature-item:last-child { border-right: none; }
.feature-icon { font-size: 28px; }
.feature-text { font-weight: 700; color: var(--navy); font-size: 14px; }

/* ─── SECTIONS ─── */
.section { max-width: 1100px; margin: 0 auto; padding: 56px 20px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
}
.btn-outline {
    background: none;
    border: 2px solid var(--blue);
    color: var(--blue);
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--blue); color: white; }

/* ─── CATEGORIES ─── */
.categories-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.category-card {
    background: white;
    border-radius: 18px;
    padding: 26px 30px;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--border);
    min-width: 130px;
    flex-shrink: 0;
    transition: all 0.25s;
    text-decoration: none;
    display: block;
}
.category-card:hover {
    border-color: var(--blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(26,115,232,0.14);
}
.category-icon { font-size: 38px; margin-bottom: 8px; }
.category-name { font-weight: 700; color: var(--navy); font-size: 13px; }

/* Highlighted "Repair My Phone" tile — orange gradient + pulsing glow */
.category-card.category-card-highlight {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #ff6a00;
    box-shadow: 0 8px 22px rgba(255, 106, 0, 0.18);
    position: relative;
}
.category-card.category-card-highlight::after {
    content: 'NEW';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6a00;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}
.category-card.category-card-highlight .category-name {
    color: #ff6a00;
}
.category-card.category-card-highlight:hover {
    border-color: #ff6a00;
    box-shadow: 0 12px 30px rgba(255, 106, 0, 0.28);
}

/* "Repair My Phone" highlight — orange gradient + NEW badge */
.category-card-highlight {
    background: linear-gradient(135deg, #ff6a00 0%, #ff9248 100%);
    border-color: #ff6a00 !important;
    color: #fff;
    position: relative;
}
.category-card-highlight .category-name {
    color: #fff;
}
.category-card-highlight:hover {
    border-color: #fff !important;
    box-shadow: 0 12px 30px rgba(255, 106, 0, 0.32);
}
.category-card-highlight::after {
    content: 'NEW';
    position: absolute;
    top: 6px;
    right: 6px;
    background: #fff;
    color: #ff6a00;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

/* ─── PRODUCT GRID ─── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* ─── PRODUCT CARD ─── */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(26,115,232,0.13);
    color: var(--text);
}
.product-img {
    background: linear-gradient(135deg, var(--light-blue), #bbdefb);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Placeholder SVGs need contain (not cover) so the part-name label
   is fully visible. Fill the card edge-to-edge — no padding — so they
   look the same size as real product photos. */
.product-img img.mpw-fallback-image {
    object-fit: contain;
    padding: 0;
    background: transparent;
}
.badge-flash {
    position: absolute;
    top: 9px; left: 9px;
    background: var(--orange);
    color: white;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}
.badge-discount {
    position: absolute;
    top: 9px; right: 9px;
    background: var(--orange);
    color: white;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}
.badge-outofstock {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 13px;
}
.product-info { padding: 14px; }
.product-brand { font-size: 11px; color: var(--blue); font-weight: 700; margin-bottom: 4px; }
.product-name { font-weight: 700; color: var(--navy); font-size: 13px; margin-bottom: 6px; line-height: 1.35; height: 35px; overflow: hidden; }
.product-stars { color: #f59e0b; font-size: 13px; }
.product-price { display: flex; align-items: baseline; gap: 8px; margin: 8px 0; }
.price-current { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 900; color: var(--blue); }
.price-original { color: #ccc; text-decoration: line-through; font-size: 12px; }
.product-meta { font-size: 11px; color: #aaa; margin-bottom: 10px; }
.btn-add-cart {
    width: 100%;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    text-align: center;
    display: block;
    text-decoration: none;
}
.btn-add-cart:hover { color: white; opacity: 0.9; }
.btn-notify {
    width: 100%;
    background: var(--orange);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
}

/* ─── REVIEWS ─── */
.reviews-section {
    background: linear-gradient(135deg, #f8faff, var(--light-blue));
    padding: 56px 20px;
}
.reviews-inner { max-width: 1100px; margin: 0 auto; }
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}
.review-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}
.review-stars { color: #f59e0b; font-size: 14px; }
.review-text { color: #444; font-size: 13px; margin: 10px 0; line-height: 1.6; }
.review-author { font-weight: 700; color: var(--navy); font-size: 13px; }
.review-date { color: #bbb; font-size: 12px; }

/* ─── BRANDS ─── */
.brands-section { background: white; padding: 40px 20px; }
.brands-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.brands-label { color: #bbb; font-size: 12px; font-weight: 700; letter-spacing: 2px; margin-bottom: 18px; }
.brands-list { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.brand-pill {
    background: var(--light-bg);
    padding: 9px 22px;
    border-radius: 30px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.brand-pill:hover { background: var(--blue); color: white; }

/* ─── FOOTER ─── */
#footer {
    background: var(--navy);
    color: #90caf9;
    padding: 48px 20px 24px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}
.footer-logo { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 900; color: white; margin-bottom: 12px; }
.footer-desc { font-size: 14px; line-height: 1.8; color: #64b5f6; max-width: 260px; }
.footer-heading { font-weight: 800; color: white; margin-bottom: 14px; font-size: 13px; letter-spacing: 1px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: #90caf9; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-contact p { font-size: 14px; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; text-align: center; font-size: 13px; color: #546e7a; }

/* ─── CHATBOT ─── */
.chatbot-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(26,115,232,0.45);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(26,115,232,0.45); }
    50% { box-shadow: 0 6px 32px rgba(26,115,232,0.75); }
}

/* ─── WOOCOMMERCE OVERRIDES ─── */
.woocommerce-page .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.woocommerce ul.products li.product {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    transition: all 0.25s;
    padding: 0;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(26,115,232,0.13);
}
.woocommerce ul.products li.product a img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-weight: 700;
    color: var(--navy);
    font-size: 14px;
    padding: 14px 14px 0;
}
.woocommerce ul.products li.product .price {
    color: var(--blue);
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    font-size: 18px;
    padding: 4px 14px;
}
.woocommerce ul.products li.product .button {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    border-radius: 10px;
    margin: 10px 14px 14px;
    width: calc(100% - 28px);
    text-align: center;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
}
.woocommerce ul.products li.product .button:hover { opacity: 0.9; color: white; }
.woocommerce .woocommerce-ordering select,
.woocommerce .woocommerce-result-count {
    font-family: 'DM Sans', sans-serif;
}
.woocommerce div.product .product_title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
}
.woocommerce div.product p.price {
    color: var(--blue);
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 900;
}
.woocommerce .single_add_to_cart_button {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark)) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    padding: 14px 32px !important;
}
.woocommerce .single_add_to_cart_button:hover { opacity: 0.9; }
.woocommerce-cart table.cart td.actions .coupon .input-text,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    padding: 10px 14px;
}
.woocommerce #place_order {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark)) !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}

/* ─── SINGLE PRODUCT PAGE ─── */
.woocommerce div.product div.images {
    border-radius: 20px;
    overflow: hidden;
}
.woocommerce div.product div.summary {
    padding-left: 20px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-phone { display: none; }
    .hero-title { font-size: 32px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: 1fr; }
    .feature-strip-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}


/* ─── EN / HI language toggle in header ─── */
.mpw-header-lang-toggle {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    overflow: hidden;
    margin: 0 8px;
    background: #fff;
}
.mpw-header-lang-toggle .mpw-lang-btn {
    border: 0;
    background: transparent;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #1a73e8;
    line-height: 1;
}
.mpw-header-lang-toggle .mpw-lang-btn.is-active,
.mpw-header-lang-toggle .mpw-lang-btn[aria-pressed="true"] {
    background: #1a73e8;
    color: #fff;
}


/* ════════════════════════════════════════════════════════════════
   MOBILE-FIRST INTERFACE  (hamburger + drawer + responsive header)
   ════════════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop, shown on mobile */
.mpw-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.mpw-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--blue, #1a73e8);
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.mpw-hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mpw-hamburger.is-open span:nth-child(2) { opacity: 0; }
.mpw-hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Slide-in drawer */
.mpw-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 82%;
    max-width: 320px;
    background: #fff;
    box-shadow: 2px 0 24px rgba(0,0,0,0.25);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mpw-mobile-drawer.is-open { transform: translateX(0); }

.mpw-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.mpw-drawer-overlay.is-open { opacity: 1; }

.mpw-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #eef2f7;
}
.mpw-drawer-title {
    font-family: 'Syne', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: var(--blue, #1a73e8);
}
.mpw-drawer-close {
    border: none;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 0 6px;
}
.mpw-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    flex: 1;
}
.mpw-drawer-nav a {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f4f7fb;
}
.mpw-drawer-nav a:active { background: #f0f4f8; }
.mpw-drawer-foot {
    padding: 16px 20px 24px;
    border-top: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

/* lock body scroll when the drawer is open */
body.mpw-drawer-locked { overflow: hidden; }

/* ─── Responsive breakpoint ─── */
@media (max-width: 900px) {
    /* Hamburger appears, desktop nav + extras hide */
    .mpw-hamburger { display: flex; }
    #primary-menu { display: none; }
    .mpw-desktop-only { display: none !important; }

    .navbar-inner {
        height: 58px;
        padding: 0 12px;
        gap: 10px;
    }
    .site-logo { font-size: 17px; flex: 1; }

    /* Cart compact */
    .btn-cart {
        padding: 7px 12px;
        font-size: 14px;
    }

    /* Header search shrinks to an icon-sized box that expands */
    .mpw-header-search { flex-shrink: 1; min-width: 0; }
    .mpw-header-search .dgwt-wcas-search-wrapp,
    .mpw-header-search form { max-width: 160px; }
    .mpw-header-search input[type="search"],
    .mpw-header-search .dgwt-wcas-search-input {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    /* Banners smaller text */
    .reward-banner { font-size: 11px; padding: 8px 12px; line-height: 1.3; }
    .flash-banner { padding: 9px 12px; gap: 8px; }
    .flash-banner h3 { font-size: 14px; }
    .flash-banner__text { font-size: 12px !important; }
}

@media (max-width: 600px) {
    .products-grid,
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 14px; }
    .hero-buttons { flex-wrap: wrap; gap: 10px; }
    .hero-buttons a { flex: 1; text-align: center; min-width: 130px; }
    .feature-strip-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .section { padding-left: 12px; padding-right: 12px; }
    .section-title { font-size: 22px; }

    /* Flash banner: hide the long descriptive text, keep label + CTA */
    .flash-banner__text { display: none; }

    /* Make tap targets comfortable */
    .btn-add-cart, .btn-notify {
        padding: 10px;
        font-size: 14px;
    }

    /* Hide the long search placeholder area, keep it usable */
    .mpw-header-search .dgwt-wcas-search-wrapp,
    .mpw-header-search form { max-width: 130px; }
}

@media (max-width: 380px) {
    .products-grid,
    .woocommerce ul.products { grid-template-columns: 1fr !important; }
    .mpw-header-search .dgwt-wcas-search-wrapp,
    .mpw-header-search form { max-width: 110px; }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE LAYOUT FIXES v2 — no horizontal scroll, clean grids
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Stop the whole page from scrolling sideways */
    html, body { overflow-x: hidden; max-width: 100%; }

    /* CATEGORIES: was a side-scrolling flex row -> 3-column grid */
    .categories-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        overflow-x: visible !important;
        padding: 0 12px;
    }
    .category-card {
        min-width: 0 !important;
        padding: 16px 8px !important;
        border-radius: 14px;
    }
    .category-icon { font-size: 26px; }
    .category-name { font-size: 12px; line-height: 1.2; }

    /* PRODUCTS: 4-up grid forced to 2-up on phone */
    .products-grid,
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .product-card { border-radius: 14px; }
    .product-name { font-size: 13px; line-height: 1.3; }
    .product-price .price-current { font-size: 15px; }

    /* FEATURE STRIP: 4-col -> 2x2 grid, drop the dividers */
    .feature-strip-inner {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 12px;
    }
    .feature-item {
        padding: 14px 10px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        gap: 8px;
        font-size: 13px;
    }

    /* BRANDS: allow wrap instead of a long row */
    .brands-list { flex-wrap: wrap; justify-content: center; gap: 8px; }

    /* SECTION padding tighter */
    .section { padding-left: 12px !important; padding-right: 12px !important; }
    .section-header { padding: 0 12px; }
}

@media (max-width: 600px) {
    /* Two products per row already; keep names readable */
    .products-grid,
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    /* Categories stay 3 across — small but tappable */
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Chatbot button: keep it inside the screen, aligned bottom-right ── */
.mpw-chatbot { right: 14px !important; bottom: 14px !important; }
.mpw-chatbot__toggle { width: 52px !important; height: 52px !important; }

/* On phones drop the chatbot slightly so it doesn't cover the lang toggle */
@media (max-width: 768px) {
    .mpw-chatbot { right: 12px !important; bottom: 12px !important; }
    .mpw-chatbot__panel { width: calc(100vw - 24px) !important; max-width: 360px; }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE: stack Add-to-Cart / Buy-Now so text is never clipped
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* In the 2-up product grid each card is narrow, so two buttons
       side-by-side clip "Add to Cart". Stack them vertically and let
       the label show fully. */
    .woocommerce ul.products li.product .mpw-loop-buttons {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        margin: 8px 10px 12px !important;
    }
    .woocommerce ul.products li.product .mpw-loop-buttons .button,
    .woocommerce ul.products li.product .mpw-loop-buttons .add_to_cart_button,
    .woocommerce ul.products li.product .mpw-loop-buttons .mpw-buy-now-btn {
        white-space: normal !important;   /* allow wrap, no clipping */
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 13px !important;
        padding: 10px 8px !important;
        line-height: 1.2 !important;
        min-height: 40px;
    }

    /* Home-page custom cards use .btn-add-cart / .btn-notify */
    .btn-add-cart, .btn-notify {
        white-space: normal !important;
        font-size: 13px !important;
        padding: 10px 8px !important;
        line-height: 1.2 !important;
    }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE v3 — drawer footer, reviews, footer logo alignment
   ════════════════════════════════════════════════════════════════ */

/* Drawer footer: lay Earn Points + language toggle in a tidy row,
   each full-width and centered, so nothing sticks out to the side. */
.mpw-drawer-foot {
    align-items: stretch;
}
.mpw-drawer-foot .points-badge {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    font-size: 14px;
    padding: 10px 14px;
}
.mpw-drawer-foot .mpw-header-lang-toggle {
    width: 100%;
    margin: 0;
    justify-content: center;
}
.mpw-drawer-foot .mpw-header-lang-toggle .mpw-lang-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
}

@media (max-width: 768px) {
    /* REVIEWS: 4-col grid squeezed on phone -> single column stack,
       full width, easy to read one after another. */
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .reviews-section { padding: 36px 14px !important; }
    .review-card { padding: 16px 18px !important; }
    .review-text { font-size: 14px; line-height: 1.5; }

    /* FOOTER: single column, everything centered, logo (📱) on top. */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        text-align: center;
    }
    .footer-logo {
        font-size: 20px;
        margin-bottom: 8px;
    }
    .footer-desc {
        max-width: 100% !important;
        margin: 0 auto;
        font-size: 13px;
        line-height: 1.6;
    }
    .footer-links { padding: 0; }
    .footer-contact { justify-content: center; }
    .footer-bottom { font-size: 12px; padding: 0 12px; line-height: 1.5; }
}


/* ════════════════════════════════════════════════════════════════
   PRODUCT NAME / PRICE OVERLAP FIX
   The earlier text fix set .product-name { overflow:visible } which let
   long titles spill over the price. Clamp the title to 2 lines instead so
   the price + button always sit cleanly below it.
   ════════════════════════════════════════════════════════════════ */
.product-name {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: 36px;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
    word-break: break-word;
}
.product-info { display: flex; flex-direction: column; }
.product-price { margin: 6px 0 !important; }

@media (max-width: 768px) {
    .product-name {
        font-size: 12.5px !important;
        min-height: 34px;
    }
    .product-info { padding: 12px 10px !important; }
    .price-current { font-size: 16px !important; }
}


/* ════════════════════════════════════════════════════════════════
   PRODUCT CARD FIX — long names must NOT overlap price
   (overrides the earlier overflow:visible that broke the name clamp)
   ════════════════════════════════════════════════════════════════ */
.product-card .product-name,
.products-grid .product-name,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* show max 2 lines, then ellipsis */
    -webkit-box-orient: vertical;
    overflow: hidden !important;     /* re-enable clipping */
    height: auto !important;
    min-height: 2.7em;               /* reserve 2 lines so price stays put */
    max-height: 2.7em;
    line-height: 1.35;
    margin-bottom: 8px;
    padding-bottom: 0 !important;
    word-break: break-word;
}

/* Price block always below the name, never overlapping */
.product-card .product-price,
.products-grid .product-price {
    margin: 4px 0 6px !important;
    clear: both;
}

/* WooCommerce shop loop: tidy spacing so price/buttons line up */
.woocommerce ul.products li.product .price {
    display: block;
    margin: 4px 10px 8px !important;
}

@media (max-width: 768px) {
    .product-card .product-name,
    .products-grid .product-name,
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 12.5px;
        min-height: 2.7em;
        max-height: 2.7em;
        margin: 0 0 6px;
    }
    .product-info { padding: 12px 10px !important; }
}


/* ════════════════════════════════════════════════════════════════
   TEXT RENDERING FIX (re-added) — descenders g/y/p never clipped
   Note: product-name keeps its 2-line clamp from PRODUCT CARD FIX;
   this only relaxes line-height on headings/labels, not the clamp.
   ════════════════════════════════════════════════════════════════ */
.section-title,
.hero-title,
.hero-subtitle,
.footer-heading,
.footer-logo,
.review-text,
.feature-text,
.mpw-drawer-nav a,
.category-name {
    line-height: 1.35;
    padding-bottom: 2px;
}
.section-title { line-height: 1.3; padding-bottom: 4px; }

/* containers must not crop heading descenders */
.section, .section-header, .reviews-inner, .categories-grid, .category-card {
    overflow: visible;
}

@media (max-width: 768px) {
    .section-title { font-size: 22px; line-height: 1.3; padding-bottom: 4px; }
    .category-name { font-size: 12px; line-height: 1.3; padding-bottom: 3px; }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE v4 — reward banner fully visible + product name consistent
   (mobile only; desktop untouched)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Reward banner: let the full message show across lines, centered */
    .reward-banner {
        font-size: 11.5px !important;
        line-height: 1.45 !important;
        padding: 8px 14px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-align: center;
        height: auto !important;
    }

    /* Front-page product cards: same title size/weight as the shop loop
       so names look consistent everywhere (14px, 2-line clamp). */
    .products-grid .product-name {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #0a1628 !important;
        line-height: 1.35 !important;
        min-height: 2.7em !important;
        max-height: 2.7em !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        margin: 0 0 6px !important;
    }
    /* price + meta consistent spacing on the home cards */
    .products-grid .product-price { margin: 4px 0 6px !important; }
    .products-grid .price-current { font-size: 16px !important; }
    .products-grid .product-meta { font-size: 11px !important; margin-bottom: 8px !important; }
}
