/*
Theme Name: Maestro
Theme URI: https://maestro.dilmun.bh
Author: Maestro
Description: Bilingual (EN/AR) Jarir-inspired WooCommerce theme for Maestro specialty coffee, Bahrain.
Version: 1.0.1
Requires PHP: 8.0
Text Domain: maestro
*/

/* ──────────────────────────────────────────────
   Tokens
   ────────────────────────────────────────────── */
:root {
    --ink: #21242c;
    --ink-soft: #5a5f6b;
    --brand: #6f4e37;        /* coffee brown */
    --brand-dark: #5a3e2b;
    --gold: #c89b5e;
    --gold-dark: #b3854a;
    --price: #cf2a2a;        /* jarir-style price red */
    --save-bg: #e7f6e7;
    --save-ink: #1e7d32;
    --bg: #eef0f4;
    --card: #ffffff;
    --line: #e3e5ea;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(25, 28, 36, .07);
    --shadow-lift: 0 8px 22px rgba(25, 28, 36, .13);
    --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ──────────────────────────────────────────────
   Base
   ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
.m-container { max-width: 1280px; margin-inline: auto; padding-inline: 16px; }
.m-main { min-height: 60vh; }
.m-hide-sm { }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ──────────────────────────────────────────────
   Header — top bar
   ────────────────────────────────────────────── */
.m-header { background: #fff; border-block-end: 1px solid var(--line); position: sticky; top: 0; z-index: 900; }
.m-topbar { border-block-start: 3px solid var(--brand); border-block-end: 1px solid var(--line); font-size: 13px; }
.m-topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.m-topbar-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.m-topbar-links > a, .m-topbar-links > span {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 99px; color: var(--ink-soft); font-weight: 500;
}
.m-topbar-links > a:hover { background: var(--bg); color: var(--brand); }
.m-lang-switch { font-weight: 700 !important; color: var(--brand) !important; }
.m-pill {
    background: var(--gold); color: #fff; border-radius: 99px;
    font-size: 11px; font-weight: 700; min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center; padding-inline: 5px;
}

/* ──────────────────────────────────────────────
   Header — main bar
   ────────────────────────────────────────────── */
.m-mainbar-inner { display: flex; align-items: center; gap: 14px; padding-block: 12px; flex-wrap: wrap; }
.m-logo img { max-height: 40px; width: auto; }
.m-logo-text { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.m-deliver {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid transparent; border-radius: 99px;
    padding: 7px 16px; font-size: 13px; color: var(--ink);
}
.m-deliver:hover { border-color: var(--gold); }
.m-deliver-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: start; }
.m-deliver-label small { color: var(--ink-soft); font-size: 11px; }
.m-deliver-label strong { font-size: 13px; }

/* Search */
.m-search { position: relative; flex: 1 1 220px; min-width: 200px; }
.m-search form { position: relative; display: flex; }
.m-search input[type="search"] {
    width: 100%; border: 1.5px solid var(--line); border-radius: 99px;
    padding: 10px 42px; font-family: inherit; font-size: 14px; background: #fff;
    outline: none; transition: border-color .15s;
    padding-inline-start: 42px; padding-inline-end: 16px;
}
.m-search input[type="search"]:focus { border-color: var(--gold); }
.m-search-icon { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.m-search-drop {
    position: absolute; top: calc(100% + 8px); inset-inline: 0; min-width: min(560px, 90vw);
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lift);
    padding: 16px; z-index: 950; max-height: 70vh; overflow: auto;
}
.m-search-hint { color: var(--ink-soft); font-size: 13px; margin: 0 0 10px; }
.m-search-popular strong { display: block; margin-block-end: 8px; font-size: 14px; }
.m-search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.m-search-tags button {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm);
    padding: 6px 12px; font-size: 13px; color: var(--ink);
}
.m-search-tags button:hover { border-color: var(--gold); color: var(--brand); }
.m-search-results { display: flex; flex-direction: column; gap: 4px; margin-block-start: 8px; }
.m-search-result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); }
.m-search-result:hover { background: var(--bg); }
.m-search-result img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.m-search-result .t { flex: 1; font-size: 14px; font-weight: 500; }
.m-search-result .p { color: var(--price); font-weight: 700; font-size: 14px; white-space: nowrap; }
.m-search-viewall { display: block; text-align: center; padding: 10px; margin-block-start: 6px; border-block-start: 1px solid var(--line); color: var(--brand); font-weight: 700; font-size: 14px; }

/* Nav dropdowns */
.m-nav { display: flex; gap: 8px; }
.m-drop { position: relative; }
.m-drop-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid var(--line); border-radius: 99px;
    padding: 9px 18px; font-size: 14px; font-weight: 700; color: var(--ink);
    transition: border-color .15s, color .15s;
}
.m-drop.is-open .m-drop-btn, .m-drop-btn:hover { border-color: var(--brand); color: var(--brand); }
.m-drop.is-open .m-drop-btn svg:last-child { transform: rotate(180deg); }
.m-drop-menu {
    position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lift);
    min-width: 260px; max-height: 70vh; overflow: auto; padding: 6px; z-index: 950;
    display: none;
}
.m-drop.is-open .m-drop-menu { display: block; }
.m-drop-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
}
.m-drop-menu a:hover { background: var(--bg); color: var(--brand); }
.m-drop-menu a img { width: 30px; height: 30px; object-fit: cover; border-radius: 6px; }
.m-drop-menu a span { flex: 1; }
.m-drop-menu .m-arrow { color: var(--ink-soft); }
.m-drop-all { border-block-start: 1px solid var(--line); margin-block-start: 4px; color: var(--brand); font-weight: 700; }

/* Burger (mobile only) */
.m-burger {
    display: none; flex: 0 0 auto; width: 42px; height: 42px;
    border: 0; background: var(--bg); border-radius: 10px; color: var(--ink);
    align-items: center; justify-content: center;
}

/* Mobile drawer */
.m-drawer { position: fixed; inset: 0; z-index: 985; }
.m-drawer[hidden] { display: none; }
.m-drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 12, .5); }
.m-drawer-panel {
    position: absolute; inset-block: 0; inset-inline-start: 0;
    width: min(370px, 90vw); background: #fff; overflow-y: auto;
    box-shadow: var(--shadow-lift); padding: 12px 14px 30px;
    border-start-end-radius: 16px; border-end-end-radius: 16px;
}
.m-drawer-head {
    display: flex; align-items: center; gap: 12px;
    border-block-end: 1px solid var(--line); padding-block-end: 10px; margin-block-end: 6px;
}
.m-drawer-head .m-logo { flex: 1; }
.m-drawer-head .m-logo img { max-height: 30px; width: auto; }
.m-drawer-head .m-lang-switch { font-weight: 700; color: var(--brand); padding: 6px 10px; border-radius: 99px; }
.m-drawer-close { width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink); padding: 0; }
.m-drawer-links { display: flex; flex-direction: column; }
.m-drawer-links > a, .m-drawer-links > button {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 8px; border: 0; border-block-end: 1px solid var(--bg);
    background: none; font-family: inherit; font-size: 14.5px; font-weight: 700;
    color: var(--ink); text-align: start; cursor: pointer;
}
.m-drawer-links > a:hover, .m-drawer-links > button:hover { color: var(--brand); }
.m-drawer-links svg:first-child { color: var(--brand); flex: 0 0 auto; }
.m-drawer-links .m-chev { margin-inline-start: auto; color: var(--ink-soft); }
.m-drawer-links .m-pill { margin-inline-start: auto; }
.m-drawer-links .m-pill + .m-chev { margin-inline-start: 4px; }
.m-drawer-flag { font-size: 16px; }
.m-drawer-section {
    font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase;
    letter-spacing: .4px; padding: 14px 8px 4px;
}
.m-drawer-cats { display: flex; flex-direction: column; }
.m-drawer-cats a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 8px; border-block-end: 1px solid var(--bg);
    font-size: 14px; font-weight: 600; color: var(--ink);
}
.m-drawer-cats a:hover { color: var(--brand); }
.m-drawer-cats img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.m-drawer-all { color: var(--brand); font-weight: 700; }
[dir="rtl"] .m-chev { transform: scaleX(-1); }

/* Help dropdown (topbar) + drawer help view */
.m-topdrop .m-drop-btn {
    border: 0; background: none; padding: 4px 10px; border-radius: 99px;
    font-size: 13px; font-weight: 500; color: var(--ink-soft); gap: 6px;
}
.m-topdrop.is-open .m-drop-btn, .m-topdrop .m-drop-btn:hover { background: var(--bg); color: var(--brand); border: 0; }
.m-topdrop .m-drop-menu { inset-inline-end: auto; inset-inline-start: 0; min-width: 290px; padding: 4px 0; }
.m-help-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px; border-block-end: 1px solid var(--bg);
    font-size: 14px; font-weight: 600; color: var(--ink);
}
.m-help-item:last-child { border-block-end: 0; }
.m-help-item:hover { background: var(--bg); color: var(--brand); }
.m-help-item svg { color: var(--ink-soft); flex: 0 0 auto; }
.m-help-item:hover svg { color: var(--brand); }
.m-help-plain { padding-inline-start: 18px; }
.m-drawer .m-help-list .m-help-item { padding-inline: 8px; }
.m-drawer-view[hidden] { display: none; }

/* Cart */
.m-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; background: var(--bg); border-radius: 50%; }
.m-cart:hover { background: #e6e0d8; }
.m-cart .m-pill { position: absolute; top: -2px; inset-inline-end: -2px; }

/* RTL arrows flip */
[dir="rtl"] .m-arrow, [dir="rtl"] .m-view-all svg, [dir="rtl"] .m-scroll-btn svg { transform: scaleX(-1); }

/* ──────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────── */
.m-hero {
    position: relative; border-radius: var(--radius); overflow: hidden;
    min-height: 380px; margin-block: 20px 28px;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.m-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(24, 16, 10, .35), rgba(24, 16, 10, .62)); }
.m-hero-inner { position: relative; color: #fff; padding: 48px 20px; max-width: 680px; }
.m-hero-inner h1 { color: #fff; font-size: clamp(28px, 5vw, 46px); margin-block-end: 8px; }
.m-hero-inner p { font-size: clamp(15px, 2.4vw, 19px); opacity: .94; margin-block: 0 22px; }
.m-hero-btn {
    display: inline-block; background: var(--gold); color: #fff; font-weight: 700;
    border-radius: 99px; padding: 12px 34px; font-size: 16px; transition: background .15s;
}
.m-hero-btn:hover { background: var(--gold-dark); color: #fff; }
.m-hero-ribbon {
    position: absolute; bottom: 0; inset-inline: 0;
    background: rgba(200, 155, 94, .92); color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 8px 12px; font-size: 13.5px; font-weight: 700;
}

/* ──────────────────────────────────────────────
   Rows / scrollers
   ────────────────────────────────────────────── */
.m-row { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-block-end: 22px; }
.m-row-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 14px; }
.m-row-head h2 { font-size: 20px; margin: 0; }
.m-view-all {
    display: inline-flex; align-items: center; gap: 4px;
    border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 16px;
    font-size: 13px; font-weight: 700; color: var(--ink);
}
.m-view-all:hover { border-color: var(--brand); color: var(--brand); }
.m-scroller-wrap { position: relative; }
.m-scroller {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
    padding-block-end: 6px; scrollbar-width: none;
}
.m-scroller::-webkit-scrollbar { display: none; }
.m-scroller > * { scroll-snap-align: start; flex: 0 0 auto; }
.m-scroll-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; box-shadow: var(--shadow-lift); color: var(--ink);
    display: flex; align-items: center; justify-content: center; transition: opacity .15s;
}
.m-scroll-btn[disabled] { opacity: 0; pointer-events: none; }
.m-prev { inset-inline-start: -8px; }
.m-next { inset-inline-end: -8px; }
.m-scroll-btn:hover { color: var(--brand); }

/* Category cards */
.m-cat-card {
    width: 118px; display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: var(--cat-bg, var(--bg)); border-radius: var(--radius);
    padding: 16px 8px; text-align: center; transition: transform .15s, box-shadow .15s;
}
.m-cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--ink); }
.m-cat-icon { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.m-cat-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.m-cat-name { font-size: 13px; font-weight: 700; line-height: 1.3; }

/* Brand cards */
.m-brand-card {
    min-width: 130px; height: 76px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px 18px; font-weight: 800; font-size: 15px; letter-spacing: .3px;
    color: var(--ink); text-transform: uppercase; transition: border-color .15s, transform .15s;
}
.m-brand-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--brand); }

/* ──────────────────────────────────────────────
   Product card
   ────────────────────────────────────────────── */
.m-card {
    position: relative; width: 210px; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.m-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.m-card.is-oos .m-card-media img { filter: grayscale(.7); opacity: .7; }
.m-card-flag {
    position: absolute; top: 10px; inset-inline-start: 10px; z-index: 3;
    background: #f3e2ff; color: #8b34c9; font-size: 11px; font-weight: 700;
    border-radius: 6px; padding: 2px 8px;
}
.m-wish {
    position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; color: var(--ink-soft);
    display: flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s;
}
.m-wish:hover, .m-wish.is-active { color: var(--price); border-color: var(--price); }
.m-wish.is-active svg { fill: var(--price); }
.m-card-media { display: block; padding: 18px 18px 6px; }
.m-card-media img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.m-card-body { padding: 4px 14px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.m-card-brand { color: var(--ink-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.m-card-title {
    font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.6em;
}
.m-card-title:hover { color: var(--brand); }
.m-card-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.m-card-chips span { border: 1px solid var(--line); border-radius: 5px; font-size: 11px; padding: 1px 7px; color: var(--ink-soft); }
.m-card-price { margin-block-start: auto; font-weight: 800; }
.m-card-price .woocommerce-Price-amount { color: var(--price); font-size: 17px; }
.m-card-price .woocommerce-Price-currencySymbol { font-size: 11px; vertical-align: super; }
.m-card-price del { color: #9aa0ab; font-weight: 500; margin-inline-end: 6px; }
.m-card-price del .woocommerce-Price-amount { color: #9aa0ab; font-size: 13px; }
.m-card-price ins { text-decoration: none; }
.m-card-save { align-self: flex-start; background: var(--save-bg); color: var(--save-ink); font-size: 12px; font-weight: 700; border-radius: 5px; padding: 1px 8px; }
.m-card-save .woocommerce-Price-amount { color: var(--save-ink); }
.m-card-actions { padding: 10px 14px 14px; border-block-start: 1px solid var(--line); }
.m-btn-cart {
    display: flex !important; align-items: center; justify-content: center; gap: 8px;
    width: 100%; background: #fff; border: 1.5px solid var(--ink) !important; border-radius: 99px !important;
    color: var(--ink) !important; font-size: 13.5px; font-weight: 700 !important; padding: 8px 10px !important;
    transition: background .15s, color .15s; line-height: 1.2;
}
.m-btn-cart:hover { background: var(--ink) !important; color: #fff !important; }
.m-btn-cart.loading { opacity: .6; pointer-events: none; }
.m-btn-cart.added { background: var(--save-ink) !important; border-color: var(--save-ink) !important; color: #fff !important; }
.m-btn-cart.is-disabled { border-color: var(--line) !important; color: #9aa0ab !important; cursor: default; }
.added_to_cart { display: none !important; }

/* ──────────────────────────────────────────────
   Shop archive
   ────────────────────────────────────────────── */
.m-woo { padding-block: 24px; }
.m-woo .woocommerce-products-header { margin-block-end: 8px; }
.m-woo .woocommerce-breadcrumb {
    font-size: 13.5px; color: var(--ink-soft); font-weight: 600;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 11px 16px; margin-block-end: 16px;
}
.m-woo .woocommerce-breadcrumb a { color: var(--ink); font-weight: 700; }
.m-woo .woocommerce-breadcrumb a:hover { color: var(--brand); }
.m-crumb-sep { margin-inline: 8px; color: var(--ink-soft); }
.m-woo .woocommerce-products-header__title { font-size: 26px; }
.m-woo .woocommerce-result-count { color: var(--ink-soft); font-size: 13.5px; float: none; margin: 0; }
.m-woo .woocommerce-ordering { float: none; margin: 0; }
.m-woo .woocommerce-ordering select {
    border: 1.5px solid var(--line); border-radius: 99px; padding: 8px 16px;
    font-family: inherit; font-size: 13.5px; background: #fff;
}
.m-woo .woocommerce-notices-wrapper:empty { display: none; }
.m-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 10px 18px; flex-wrap: wrap; }
.woocommerce ul.products, .woocommerce-page ul.products, ul.products {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.woocommerce ul.products::before, .woocommerce ul.products::after,
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after { content: none; display: none; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product, ul.products li.product {
    /* !important: WooCommerce's .columns-N li.product percentage widths outrank us otherwise */
    float: none !important; clear: none !important; width: auto !important; margin: 0 !important; padding: 0 !important;
}
.woocommerce ul.products li.product .m-card-media img, .woocommerce-page ul.products li.product .m-card-media img {
    width: 100%; height: auto; margin: 0; box-shadow: none;
}
ul.products .m-card { width: 100%; height: 100%; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.m-grid .m-card { width: 100%; }
.woocommerce-pagination { text-align: center; margin-block: 26px; }
.woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; padding: 0; }
.woocommerce-pagination li a, .woocommerce-pagination li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; font-weight: 700; font-size: 14px; padding-inline: 6px;
}
.woocommerce-pagination li span.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.woocommerce-pagination li a:hover { border-color: var(--brand); color: var(--brand); }

/* No products / info */
.woocommerce-info, .woocommerce-message, .woocommerce-error {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px 18px !important; margin-block-end: 16px; border: 0; border-inline-start: 4px solid var(--gold);
    list-style: none; color: var(--ink);
}
.woocommerce-info::before, .woocommerce-message::before, .woocommerce-error::before,
.woocommerce-info::after, .woocommerce-message::after, .woocommerce-error::after { display: none !important; content: none !important; }
.woocommerce-error { border-inline-start-color: var(--price); }
.woocommerce-error li { margin: 0; }
.woocommerce-message { border-inline-start-color: var(--save-ink); }
.woocommerce-message a.button, .woocommerce-info a.button { float: none; margin-inline-start: 8px; }
.woocommerce-info a, .woocommerce-message a:not(.button) { color: var(--brand); font-weight: 700; }

/* Checkout: login / coupon toggles + forms */
.woocommerce-form-login-toggle .woocommerce-info, .woocommerce-form-coupon-toggle .woocommerce-info {
    padding: 11px 16px !important; font-size: 13.5px; margin-block-end: 10px;
}
form.checkout_coupon, form.woocommerce-form-login {
    background: #fff; border: 0 !important; border-radius: var(--radius) !important;
    box-shadow: var(--shadow); padding: 18px !important; margin-block-end: 16px;
}

/* ──────────────────────────────────────────────
   Single product
   ────────────────────────────────────────────── */
.single-product div.product { display: grid; grid-template-columns: minmax(300px, 480px) 1fr; gap: 32px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; position: relative; }
.single-product div.product .woocommerce-product-gallery { width: 100% !important; float: none !important; }
.single-product div.product .woocommerce-product-gallery__wrapper { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.single-product div.product .entry-summary { width: 100% !important; float: none !important; }
.single-product div.product .onsale {
    position: absolute; top: 36px; inset-inline-start: 36px; z-index: 5;
    background: #f3e2ff; color: #8b34c9; font-size: 12px; font-weight: 700;
    border-radius: 6px; padding: 3px 10px; min-height: 0; min-width: 0; line-height: 1.4;
}
.m-single-brand { margin: 0 0 2px; }
.m-single-brand a, .m-single-brand { color: var(--ink-soft); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.m-single-brand a:hover { color: var(--brand); }
.single-product .product_title { font-size: 24px; margin-block-end: 2px; }
.m-single-alt-name { color: var(--ink-soft); font-size: 15px; margin-block: 0 8px; }
.single-product div.product p.price { margin-block: 10px 4px; }
.single-product div.product p.price .woocommerce-Price-amount { color: var(--price); font-size: 30px; font-weight: 800; }
.single-product div.product p.price .woocommerce-Price-currencySymbol { font-size: 15px; vertical-align: super; }
.single-product div.product p.price del { color: #9aa0ab; font-size: 18px; margin-inline-end: 8px; }
.single-product div.product p.price del .woocommerce-Price-amount { color: #9aa0ab; font-size: 18px; }
.single-product div.product p.price ins { text-decoration: none; }
.m-single-save { display: inline-block; background: var(--save-bg); color: var(--save-ink); font-size: 13px; font-weight: 700; border-radius: 6px; padding: 2px 10px; margin-block: 0 8px; }
.m-single-save .woocommerce-Price-amount { color: var(--save-ink); }
.single-product .woocommerce-product-details__short-description { color: var(--ink-soft); font-size: 14.5px; }
.single-product form.cart { display: flex; gap: 10px; align-items: stretch; margin-block: 18px 8px; }
.single-product form.cart div.quantity { display: flex; }
.single-product form.cart .qty {
    width: 72px; border: 1.5px solid var(--line); border-radius: 99px;
    text-align: center; font-family: inherit; font-size: 15px; font-weight: 700; padding: 10px;
}
.single-product form.cart .single_add_to_cart_button {
    flex: 1; background: var(--brand); color: #fff; border: 0; border-radius: 99px;
    font-size: 15px; font-weight: 700; padding: 12px 28px; transition: background .15s;
}
.single-product form.cart .single_add_to_cart_button:hover { background: #5a3e2b; }
.m-btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #25d366; color: #fff !important; border-radius: 99px;
    font-size: 15px; font-weight: 700; padding: 12px 28px; margin-block: 4px 14px;
    transition: background .15s;
}
.m-btn-whatsapp:hover { background: #1faf53; }
.m-single-usps { display: flex; flex-direction: column; gap: 8px; border-block-start: 1px solid var(--line); padding-block-start: 14px; }
.m-usp { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 13.5px; }
.m-usp svg { color: var(--gold-dark); flex: 0 0 auto; }
.single-product .product_meta { font-size: 13px; color: var(--ink-soft); margin-block-start: 12px; }
.single-product .product_meta a { color: var(--brand); font-weight: 700; }

/* Tabs */
.single-product .woocommerce-tabs { grid-column: 1 / -1; }
.single-product .woocommerce-tabs ul.tabs {
    display: flex; gap: 6px; list-style: none; margin: 0 0 0; padding: 0 0 0;
    border-block-end: 1.5px solid var(--line);
}
.single-product .woocommerce-tabs ul.tabs::before, .single-product .woocommerce-tabs ul.tabs::after,
.single-product .woocommerce-tabs ul.tabs li::before, .single-product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.single-product .woocommerce-tabs ul.tabs li {
    background: none; border: 0; border-radius: 0; margin: 0; padding: 0;
}
.single-product .woocommerce-tabs ul.tabs li a {
    display: block; padding: 12px 20px; font-weight: 700; font-size: 14.5px; color: var(--ink-soft);
    border-block-end: 3px solid transparent; margin-block-end: -1.5px;
}
.single-product .woocommerce-tabs ul.tabs li.active a { color: var(--brand); border-block-end-color: var(--brand); }
.single-product .woocommerce-tabs .panel { padding-block: 18px; font-size: 14.5px; color: var(--ink-soft); }
.single-product .woocommerce-tabs .panel h2:first-of-type { display: none; }

/* Stock labels */
.single-product .stock { font-weight: 700; font-size: 14px; }
.single-product .stock.in-stock { color: var(--save-ink); }
.single-product .stock.limited-stock { color: #d97706; }
.single-product .stock.out-of-stock { color: var(--price); }

/* Related — "Suggested Essentials" carousel */
.single-product .related.products { grid-column: 1 / -1; border-block-start: 1px solid var(--line); padding-block-start: 18px; }
.single-product .related.products .m-row-head h2 { font-size: 20px; margin: 0; }
.m-card a.m-add-pill {
    position: absolute !important; top: 10px !important;
    inset-inline-end: 10px !important; inset-inline-start: auto !important;
    width: max-content !important; z-index: 3;
    display: inline-flex !important; align-items: center; gap: 6px;
    background: var(--brand) !important; color: #fff !important;
    border: 0 !important; border-radius: 99px !important;
    padding: 7px 16px !important; font-size: 13px; font-weight: 700 !important; line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: background .15s;
}
.m-card a.m-add-pill:hover { background: var(--brand-dark) !important; }
.m-card a.m-add-pill.added { background: var(--save-ink) !important; }
.m-card--suggest .m-card-media { padding-block-start: 30px; }

/* ──────────────────────────────────────────────
   Cart / Checkout
   ────────────────────────────────────────────── */
.woocommerce-cart .m-woo, .woocommerce-checkout .m-woo { max-width: 1080px; }
.m-woo .entry-header h1, .m-woo .m-page-title { font-size: 26px; }
.woocommerce table.shop_table {
    background: #fff; border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
    border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-block-start: 1px solid var(--line); padding: 12px 14px; }
.woocommerce table.shop_table thead th { border-block-start: 0; background: var(--bg); font-weight: 700; }
.woocommerce table.shop_table img { width: 64px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.woocommerce .cart_totals, .woocommerce-checkout #order_review, .woocommerce-checkout #customer_details .woocommerce-billing-fields {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.woocommerce .quantity .qty { border: 1.5px solid var(--line); border-radius: 99px; padding: 6px; text-align: center; font-family: inherit; }
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .woocommerce #respond input#submit {
    background: var(--brand); color: #fff; border-radius: 99px; font-weight: 700; font-family: inherit;
    padding: 10px 22px; border: 0;
}
.woocommerce button.button:hover, .woocommerce a.button:hover, .woocommerce input.button:hover { background: #5a3e2b; color: #fff; }
.woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce #place_order { background: var(--gold); font-size: 15px; }
.woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover, .woocommerce #place_order:hover { background: var(--gold-dark); }
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled] { background: var(--brand); color: #fff; opacity: .55; border-radius: 99px; padding: 10px 22px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container--default .select2-selection--single {
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-family: inherit; background: #fff; height: auto;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.5; padding: 0; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
.woocommerce form .form-row label { font-weight: 700; font-size: 13.5px; }
.woocommerce-checkout #payment { background: var(--bg); border-radius: var(--radius); }
.woocommerce-additional-fields, .woocommerce-shipping-fields { margin-block-start: 14px; }
.woocommerce .col2-set { display: grid; grid-template-columns: 1fr; gap: 18px; width: 100%; }
.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 { width: 100%; max-width: none; float: none; padding: 0; }
form.woocommerce-checkout { display: grid; grid-template-columns: 1.2fr .9fr; grid-template-rows: auto 1fr; gap: 16px 22px; align-items: start; }
form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
form.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; font-size: 19px; align-self: end; }
form.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; align-self: start; }
.woocommerce-form-login, .woocommerce-form-register, .woocommerce-MyAccount-content, .woocommerce-MyAccount-navigation ul {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; }
.woocommerce-MyAccount-navigation li { margin-block-end: 4px; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation li a:hover { background: var(--bg); color: var(--brand); }

/* ──────────────────────────────────────────────
   Static pages
   ────────────────────────────────────────────── */
.m-page { padding-block: 28px; }
.m-card-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.m-page-title { font-size: 26px; }
.m-prose p { color: var(--ink-soft); }

/* ──────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────── */
.m-footer { margin-block-start: 40px; }
.m-footer-top { background: #fff; border-block-start: 1px solid var(--line); padding-block: 26px 18px; }
.m-footer-newsletter { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-block-end: 22px; }
.m-footer-social p { margin: 0 0 10px; font-weight: 700; }
.m-social-icons { display: flex; gap: 10px; }
.m-social-icons a {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; color: var(--ink);
    transition: color .15s, border-color .15s;
}
.m-social-icons a:hover { color: var(--brand); border-color: var(--brand); }
.m-footer-usps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; padding-block: 18px; border-block-start: 1px solid var(--line); }
.m-footer-usp { display: flex; gap: 14px; align-items: flex-start; }
.m-footer-usp svg { color: var(--gold-dark); flex: 0 0 auto; margin-block-start: 2px; }
.m-footer-usp strong { display: block; font-size: 15px; margin-block-end: 4px; }
.m-footer-usp p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.m-footer-pay { display: flex; justify-content: center; padding-block: 14px; border-block-start: 1px solid var(--line); }
.m-pay-list { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.m-pay-list img { height: 30px; width: auto; display: block; }
.m-pay-badge { display: inline-block; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 16px; font-weight: 800; font-size: 13px; color: #7a8599; letter-spacing: .3px; }
.m-footer-links { background: #2b2622; color: #d9d4cf; padding-block: 30px 0; }
.m-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; padding-block-end: 24px; }
.m-footer-col h4 { color: #fff; font-size: 15px; margin-block-end: 12px; border-block-end: 1px solid rgba(255,255,255,.15); padding-block-end: 8px; }
.m-footer-col a, .m-footer-col span { display: block; padding-block: 5px; font-size: 13.5px; color: #d9d4cf; }
.m-footer-col a:hover { color: var(--gold); }
.m-footer-copy { border-block-start: 1px solid rgba(255,255,255,.12); text-align: center; font-size: 12.5px; padding-block: 14px; color: #b3aca5; }

/* WhatsApp FAB + back-to-top */
.m-whatsapp-fab {
    position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 980;
    background: #25d366; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    transition: transform .15s;
}
.m-whatsapp-fab:hover { transform: scale(1.07); }
.m-back-top {
    position: fixed; bottom: 30px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 970;
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 99px;
    box-shadow: var(--shadow-lift); padding: 9px 20px; font-size: 13px; font-weight: 700; color: var(--ink);
}
[dir="rtl"] .m-back-top { transform: translateX(50%); }

/* ──────────────────────────────────────────────
   Modal
   ────────────────────────────────────────────── */
.m-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.m-modal[hidden] { display: none; }
.m-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 12, .5); }
.m-modal-box {
    position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lift);
    width: min(440px, calc(100vw - 32px)); max-height: 80vh; display: flex; flex-direction: column; padding: 18px;
}
.m-modal-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 8px; }
.m-modal-head strong { font-size: 17px; }
.m-modal-close { background: var(--bg); border: 0; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--ink-soft); }
.m-modal-note { background: var(--save-bg); color: var(--save-ink); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; padding: 8px 12px; margin-block: 0 10px; }
.m-modal-note .woocommerce-Price-amount { color: var(--save-ink); }
.m-area-search { border: 1.5px solid var(--line); border-radius: 99px; padding: 9px 16px; font-family: inherit; margin-block-end: 10px; outline: none; }
.m-area-search:focus { border-color: var(--gold); }
.m-area-list { list-style: none; margin: 0; padding: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.m-area-list button {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--ink); font-family: inherit;
}
.m-area-list button:hover { border-color: var(--gold); }
.m-area-list em { font-style: normal; color: var(--price); font-weight: 700; font-size: 13px; white-space: nowrap; }
.m-area-list em .woocommerce-Price-amount { color: var(--price); }
.m-area-list button.is-current { border-color: var(--brand); background: #faf6f1; }
.m-area-list button.is-current em { color: var(--brand); }

/* Deliver-to modal: country → preference */
.m-deliver-view[hidden] { display: none; }
.m-back-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg); border: 0; border-radius: 99px;
    padding: 8px 16px; font-size: 14px; font-weight: 700; color: var(--ink);
}
.m-back-chip:hover { color: var(--brand); }
.m-pref-title { font-size: 20px; margin: 6px 0 2px; }
.m-pref-sub { color: var(--ink-soft); font-size: 13px; font-weight: 700; margin: 0 0 14px; }
.m-pref-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-pref-card {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 14px; font-size: 14px; font-weight: 700; color: var(--ink-soft);
    text-align: start; font-family: inherit; transition: border-color .15s, color .15s;
}
.m-pref-card:hover { border-color: var(--gold); }
.m-pref-card.is-active { border-color: var(--brand); color: var(--brand); }
.m-pref-card svg { flex: 0 0 auto; }
.m-pref-note { color: var(--ink-soft); font-size: 12.5px; margin: 14px 0 0; }

/* Currency */
button.m-country { background: none; border: 0; cursor: pointer; font-size: 13px; }
button.m-country:hover { background: var(--bg); color: var(--brand); }
.m-currency-note {
    background: #fdf3d8; color: #8a6116; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; padding: 10px 14px; margin-block-end: 12px;
}

/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */
@media (max-width: 920px) {
    .m-nav { display: none; }
    .m-topbar { display: none; }
    .m-burger { display: flex; }
    /* Search dropdown: anchor to the viewport, not the narrow input */
    .m-search-drop {
        position: fixed; top: 64px; inset-inline: 10px;
        min-width: 0; max-height: calc(100vh - 80px);
    }
    .m-header { border-block-start: 3px solid var(--brand); }
    .m-mainbar-inner { gap: 10px; padding-block: 10px; }
    .m-logo img { max-height: 30px; }
    .m-search { flex: 1 1 0; min-width: 110px; }
    .m-search input[type="search"] { padding-block: 9px; }
    .m-cart { width: 42px; height: 42px; border-radius: 10px; }
    /* "Deliver to" becomes a full-width bar under the main row */
    .m-deliver {
        order: 20; flex-basis: 100%; width: 100%;
        justify-content: flex-start; border-radius: 10px; padding: 9px 14px;
    }
    .m-deliver-label { flex-direction: row; align-items: center; gap: 5px; }
    .m-deliver > svg:last-child { margin-inline-start: auto; }
    form.woocommerce-checkout { grid-template-columns: 1fr; grid-template-rows: none; }
    form.woocommerce-checkout #customer_details, form.woocommerce-checkout #order_review_heading, form.woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
    .single-product div.product { grid-template-columns: 1fr; padding: 16px; }
}
@media (max-width: 920px) {
    /* Compact, summarized footer */
    .m-footer-top { padding-block: 18px 10px; }
    .m-footer-newsletter { justify-content: center; text-align: center; margin-block-end: 12px; }
    .m-footer-newsletter p { font-size: 13.5px; margin-block-end: 8px; }
    .m-social-icons { justify-content: center; }
    .m-footer-usps { grid-template-columns: 1fr 1fr; gap: 8px; padding-block: 12px; }
    .m-footer-usp { align-items: center; gap: 8px; background: var(--bg); border-radius: var(--radius-sm); padding: 9px 10px; }
    .m-footer-usp svg { width: 22px; height: 22px; margin: 0; }
    .m-footer-usp strong { font-size: 12px; margin: 0; line-height: 1.25; }
    .m-footer-usp p { display: none; }
    .m-footer-pay { padding-block: 10px; }
    .m-pay-list { gap: 18px; }
    .m-pay-list img { height: 22px; }
    /* Link columns become tap-to-expand accordions */
    .m-footer-links { padding-block-start: 6px; }
    .m-footer-cols { grid-template-columns: 1fr; gap: 0; padding-block-end: 10px; }
    .m-footer-col h4 {
        margin: 0; padding-block: 12px; border-block-end: 1px solid rgba(255,255,255,.12);
        cursor: pointer; position: relative; user-select: none;
    }
    .m-footer-col h4::after {
        content: "›"; position: absolute; inset-inline-end: 4px; top: 50%;
        transform: translateY(-50%) rotate(90deg); transition: transform .15s; font-size: 16px;
    }
    .m-footer-col.is-open h4::after { transform: translateY(-50%) rotate(-90deg); }
    .m-footer-col a, .m-footer-col span { display: none; padding-block: 7px; }
    .m-footer-col.is-open a, .m-footer-col.is-open span { display: block; }
    .m-footer-copy { font-size: 11.5px; padding-block: 12px; }
}
@media (max-width: 600px) {
    .m-hide-sm { display: none !important; }
    .m-card { width: 168px; }
    .woocommerce ul.products, .woocommerce-page ul.products, ul.products, .m-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    }
    .m-card-media { padding: 12px 12px 4px; }
    .m-card-body { padding: 4px 10px 8px; }
    .m-card-actions { padding: 8px 10px 12px; }
    .m-btn-cart span { font-size: 12.5px; }
    .m-toolbar { gap: 8px; }
    .m-woo .woocommerce-products-header__title { font-size: 21px; }
    .m-row { padding: 12px; }
    .m-hero { min-height: 300px; }
}
