:root {
    --green: #007a3d;
    --green-dark: #005f31;
    --red: #ce1126;
    --black: #131921;
    --nav: #232f3e;
    --yellow: #febd69;
    --yellow-dark: #f3a847;
    --ink: #1f2937;
    --soft: #eaeded;
    --muted: #6b7280;
    --border: #e5e7eb;
    --gold: #f2b705;
    --font-size-body: 15px;
    --font-size-ui: 14px;
    --font-size-small: 12px;
    --font-size-heading-sm: 16px;
    --font-size-heading-md: 20px;
    --font-size-heading-lg: 28px;
    --container-max: 1600px;
    --container-pad: clamp(12px, 2vw, 32px);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: var(--font-size-body);
    line-height: 1.5;
    color: var(--black);
    background: var(--soft);
}
.container {
    width: 100%;
    max-width: var(--container-max);
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    margin-left: auto;
    margin-right: auto;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.top-strip {
    background: var(--green-dark);
    color: #fff;
    font-size: 13px;
    padding: 7px 0;
}
.top-strip-inner, .top-utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.top-utility a { color: #fff; font-weight: 700; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: none;
}
.middle-header { padding: 10px 0; background: #fff; }
.middle-header-grid {
    display: grid;
    grid-template-columns: 210px 1fr auto;
    align-items: center;
    gap: 22px;
}
.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green);
}
.brand-mark strong { display: block; font-size: 23px; line-height: 1; }
.brand-mark small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 3px;
}
/* Text fallback ("PS") only, shown when no store logo is uploaded. */
span.brand-icon {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}
/* The uploaded store logo is rendered as-is - never force a background
   behind it, since it is commonly a transparent PNG/SVG. */
img.brand-icon {
    background: transparent;
    object-fit: contain;
}
.search-box { position: relative; }
.search-combobox {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.search-combobox input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    border: 0;
    padding: 0 13px;
    background: #fff;
}
.search-combobox input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-combobox input:focus { outline: none; }
.search-submit {
    flex: 0 0 auto;
    width: 54px;
    min-height: 42px;
    border: 0;
    background: var(--yellow);
    color: #111;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.search-submit:hover, .search-submit:focus-visible { background: var(--yellow-dark); }
.search-submit svg { width: 20px; height: 20px; display: block; }
.search-suggest-list {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    z-index: 60;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(17, 24, 39, .14);
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.search-suggest-list[hidden] { display: none; }
.search-suggest-list li { margin: 0; }
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--ink);
}
.search-suggest-item:hover, .search-suggest-item.is-active { background: var(--soft); }
.search-suggest-item img { width: 40px; height: 40px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0; }
.search-suggest-name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest-price { flex-shrink: 0; font-weight: 900; font-size: 13px; text-align: end; }
.search-suggest-price del { display: block; font-weight: 700; color: var(--muted); font-size: 11px; }
.search-suggest-state { padding: 14px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.search-suggest-viewall { display: block; text-align: center; padding: 10px; font-weight: 800; color: var(--green); border-top: 1px solid var(--border); margin-top: 4px; text-decoration: none; }
.search-suggest-viewall:hover { background: var(--soft); border-radius: 6px; }
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.icon-link {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--green);
    font-size: 22px;
    font-weight: 900;
}
.mini-contact span { display: block; color: var(--muted); font-size: 12px; }
.mini-contact strong { display: block; white-space: nowrap; font-size: 14px; color: var(--ink); }
.cart-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    background: var(--green);
    border: 1px solid var(--green);
    color: #fff;
    padding: 11px 14px;
    border-radius: 8px;
    font-weight: 900;
}
.cart-button:hover { background: var(--green-dark); color: #fff; }
.cart-button:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.cart-button-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 auto;
}
.cart-button strong {
    min-width: 24px;
    min-height: 24px;
    display: grid;
    place-items: center;
    padding-inline: 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--red);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}
.main-menu { background: var(--green); padding: 0; }
.main-menu > .container { position: relative; }
.main-menu .navbar-toggler { background: #fff; margin: 8px 0; }
.main-menu .navbar-nav { gap: 2px; }
.main-menu .nav-link {
    color: #fff;
    font-weight: 900;
    padding: 13px 15px;
    font-size: 14px;
}
.main-menu .nav-link.active, .main-menu .nav-link:hover { background: var(--green-dark); color: #fff; outline: 0; }
.menu-offer { color: #fff; font-weight: 900; font-size: 14px; }
.dropdown-item-wrap { position: relative; }
.level-one, .level-two {
    position: absolute;
    list-style: none;
    margin: 0;
    padding: 8px;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 16px 34px rgba(17, 24, 39, .14);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .18s ease;
    z-index: 20;
}
.level-one { top: 100%; inset-inline-start: 0; }
.level-two { top: -9px; inset-inline-start: 100%; border-radius: 8px; }
/* .level-one already starts flush with its trigger's own edge (0), so
   flipping it means re-anchoring to the trigger's OPPOSITE edge - unlike
   .level-two below, which sits fully beside its trigger (100% away) and so
   flips to the mirrored 100% on the other side instead. */
.ltr .level-one.submenu-flip { left: auto; right: 0; }
.rtl .level-one.submenu-flip { right: auto; left: 0; }
.ltr .level-two.submenu-flip { left: auto; right: 100%; }
.rtl .level-two.submenu-flip { right: auto; left: 100%; }
.dropdown-item-wrap:hover > .level-one,
.has-sub:hover > .level-two,
.dropdown-item-wrap:focus-within > .level-one,
.has-sub:focus-within > .level-two {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item-wrap.is-open > .level-one,
.has-sub.is-open > .level-two {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.level-one a, .level-two a {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--ink);
    border-radius: 6px;
    font-weight: 700;
}
.level-one a:hover, .level-two a:hover { background: var(--soft); color: var(--green); }
.has-sub { position: relative; }
.nav-item-line { display: flex; align-items: stretch; min-width: 0; }
.nav-item-line > a { flex: 1 1 auto; min-width: 0; }
.nav-expand {
    border: 0; background: transparent; color: inherit; width: 40px; min-height: 40px;
    display: inline-grid; place-items: center; cursor: pointer;
}
.main-menu > .container > .navbar-collapse > .navbar-nav > li > .nav-item-line > .nav-expand { color: #fff; }
.nav-expand:focus-visible { outline: 3px solid #fbbf24; outline-offset: -3px; }
.nav-expand[aria-expanded="true"] span { transform: rotate(90deg); }
.nav-expand span { display: block; transition: transform .15s ease; }
.rtl .nav-expand span { transform: scaleX(-1); }
.rtl .nav-expand[aria-expanded="true"] span { transform: scaleX(-1) rotate(90deg); }
.porto-home { background: var(--soft); padding: 18px 0; }
.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 14px;
    align-items: stretch;
}
.side-categories, .promo-tile, .filter-panel, .summary-box, .checkout-form, .success-box, .mini-panel {
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    background: #fff;
}
.side-categories { overflow: hidden; }
.side-categories h2 {
    margin: 0;
    padding: 12px 14px;
    font-size: 16px;
    background: var(--nav);
    color: #fff;
    font-weight: 900;
}
.side-categories a {
    display: flex;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    font-weight: 700;
}
.side-categories a:hover { color: #c45500; background: #f7fafafa; }
.hero-section {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1607083206869-4c7672e72a8a?auto=format&fit=crop&w=1100&q=75') center/cover;
    color: #fff;
    border-radius: 4px;
    padding: 34px;
}
.hero-slider { position: relative; min-width: 0; overflow: hidden; border-radius: 4px; }
.hero-slides { position: relative; min-height: 360px; }
.hero-slide { position: absolute; inset: 0; min-height: 360px; opacity: 0; visibility: hidden; transition: opacity .45s ease; background-size: cover; background-position: center; }
.hero-slide.is-active { position: relative; opacity: 1; visibility: visible; z-index: 1; }
.hero-control { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; }
.hero-prev { inset-inline-start: 12px; }
.hero-next { inset-inline-end: 12px; }
.hero-dots { position: absolute; z-index: 3; inset-inline: 0; bottom: 13px; display: flex; justify-content: center; gap: 7px; }
.hero-dots button { width: 10px; height: 10px; border: 1px solid #fff; border-radius: 50%; padding: 0; background: transparent; }
.hero-dots button.is-active { background: #fff; }
.eyebrow {
    display: inline-block;
    color: var(--yellow);
    font-weight: 900;
    margin-bottom: 12px;
}
.hero-section h1, .page-hero h1, .success-box h1 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0;
}
.hero-section p { color: #ecfff4; font-size: 16px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { border-radius: 999px; font-weight: 900; padding: 9px 18px; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: #111; }
.btn-primary:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: #111; }
.btn-outline-success { color: var(--green); border-color: var(--green); }
.promo-stack { display: grid; gap: 18px; }
.promo-tile {
    min-height: 173px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
}
.promo-tile span { color: var(--muted); font-weight: 800; }
.promo-tile strong { font-size: 30px; font-weight: 900; line-height: 1; }
.promo-tile small { color: var(--muted); font-weight: 700; }
.red-tile { background: linear-gradient(135deg, #b12704, #f08804); color: #fff; }
.red-tile span, .red-tile small { color: #fff; }
.white-tile { background: #fff; }

.section-block { padding: 18px 0; }
.soft-bg { background: var(--soft); }
.section-block > .container {
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.porto-home .container {
    background: transparent;
    border: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 14px;
}
.section-heading h2, .filter-panel h2, .summary-box h2, .checkout-form h2, .mini-panel h2 {
    font-size: 21px;
    font-weight: 900;
    margin: 0;
}
.section-heading a { color: #007185; font-weight: 900; }
.category-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.category-grid, .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.category-card {
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    padding: 14px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}
.category-card.compact { padding: 12px; min-height: 112px; }
.category-card:hover, .product-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .12);
}
.category-card span { font-size: 26px; }
.category-card strong, .category-card small { display: block; }
.category-card small { color: var(--muted); margin-top: 3px; }
.product-card {
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.product-image {
    position: relative;
    height: 168px;
    overflow: hidden;
    background: #f7f7f7;
}
.dense-grid .product-image {
    height: 135px;
    margin: 10px 10px 0;
    border-radius: 4px;
}
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product-image span {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: #fff;
    color: #111;
    border-radius: 3px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}
/* Featured + Sale badges sharing the top of the product image. A flex row
   spanning the image width (not two independently-absolute-positioned
   spans) so the two badges can never overlap: Featured sits at the start,
   the sale badge is pushed to the end via margin-inline-start:auto - which
   also puts it at the end when it is the only badge present. */
.product-image .card-badges {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    z-index: 2;
}
.product-image .card-badges span {
    position: static;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-image .card-badges .badge-sale {
    background: var(--red);
    color: #fff;
    margin-inline-start: auto;
}
.product-info {
    padding: 10px 12px 12px;
    display: flex;
    flex: 1;
    flex-direction: column;
}
.product-row { margin-top: auto; }
.price-line { min-height: 30px; }
.product-info h3 {
    font-size: 14px;
    font-weight: 900;
    margin: 0 0 5px;
    line-height: 1.3;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-info p { color: #007600; margin: 0 0 8px; font-size: 12px; }
.product-row, .price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.price-line { justify-content: flex-start; margin-bottom: 11px; }
.price-line strong, .product-row strong, .detail-price { color: #b12704; font-weight: 900; }
.price-line del { color: var(--muted); font-size: 13px; }
.market-rating {
    color: #ffa41c;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 5px;
}
.market-rating span {
    color: #007185;
    font-weight: 700;
}
.small-btn {
    background: var(--yellow);
    color: #111;
    border: 0;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 900;
    width: 100%;
    text-align: center;
    margin-top: auto;
}
.small-btn:hover { background: var(--yellow-dark); color: #111; }
.small-btn--disabled, .small-btn--disabled:hover { background: #e9ecef; color: #868e96; cursor: not-allowed; }
.card-availability { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; margin: 2px 0 6px; }
.card-availability.stock-limited { background: #fff7e0; color: #92400e; }
.card-availability.stock-out { background: #fde8e8; color: var(--red); }
.card-availability.stock-preorder { background: #e6f0ff; color: #1d4ed8; }
.product-info form { margin-top: auto; }
.detail-cart-form { margin-bottom: 0; }
.cart-remove {
    grid-column: auto;
    justify-self: end;
    color: #b42318;
    font-weight: 900;
    background: #fff5f5;
    border: 1px solid #ffd1d1;
    border-radius: 999px;
    padding: 7px 12px;
}
.mini-panel { padding: 15px; height: 100%; }
.mini-product {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.mini-product img { width: 62px; height: 62px; object-fit: cover; border-radius: 4px; }
.mini-product span, .mini-product strong { display: block; }
.mini-product strong { color: var(--green); margin-top: 4px; }
.highlight-panel { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; }
.highlight-panel span { color: #d7ffe7; font-weight: 900; }
.highlight-panel p { color: #ecfff4; }
.highlight-panel a { color: #fff; font-weight: 900; text-decoration: underline; }

.page-hero { background: var(--soft); padding: 30px 0; border-bottom: 1px solid var(--border); }
.page-hero p { color: var(--muted); margin: 8px 0 0; }
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    padding: 8px 0;
    overflow-wrap: anywhere;
}
/* Parent-link segments read lighter than the unwrapped current-page text
   at the end of the trail, which inherits the container's own (slightly
   stronger) weight above - no markup change needed to tell them apart. */
.breadcrumb-bar a {
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}
.breadcrumb-bar a:hover {
    text-decoration: underline;
}
.listing-layout, .cart-layout, .checkout-layout, .product-detail, .search-layout, .contact-grid, .account-grid { display: grid; gap: 22px; }
.filter-panel, .summary-box, .checkout-form, .success-box { padding: 20px; }
.filter-panel label { display: block; margin: 16px 0 7px; font-weight: 800; }
.shop-filter-form {
    display: grid;
    gap: 8px;
}
.shop-filter-form .check-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
}
.shop-filter-form .check-line input {
    width: 16px;
    height: 16px;
}
.filter-reset {
    color: var(--green);
    font-weight: 900;
    text-align: center;
}
.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.listing-toolbar span {
    color: var(--muted);
    font-weight: 800;
}
.empty-state {
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
    padding: 28px;
    text-align: center;
    margin-bottom: 14px;
}
.gallery { min-width: 0; }
.gallery-main { position: relative; }
.main-photo-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; background: #fff; cursor: zoom-in; overflow: hidden; }
.gallery .main-photo { width: 100%; height: 470px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; display: block; }
.main-photo-trigger:focus-visible .main-photo { outline: 3px solid var(--green); outline-offset: 2px; }

/* Supplementary 2x pointer-follow zoom. Both CSS and JavaScript gate this to
   real hover/fine-pointer capability, so touch scrolling is never involved. */
@media (hover: hover) and (pointer: fine) {
    .main-photo-trigger.is-hover-zoom-ready .main-photo {
        cursor: zoom-in;
        will-change: transform, transform-origin;
        transition: transform .14s ease-out;
    }
    .main-photo-trigger.is-hover-zooming .main-photo {
        transform: scale(2);
        transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-photo-trigger.is-hover-zoom-ready .main-photo { transition: none; }
}

/* Mobile-first: horizontal scrollable thumbnail strip beneath the main image. */
.thumb-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    margin-top: 10px;
    padding: 6px 4px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    min-width: 0;
    scrollbar-width: none;
}
.thumb-row::-webkit-scrollbar { display: none; }
.thumb-row::-webkit-scrollbar-track {
    border-radius: 999px;
    background: color-mix(in srgb, var(--border) 55%, transparent);
}
.thumb-row::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 55%, transparent);
}
.thumb-row::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--muted) 75%, transparent);
}
.thumb-nav { position: relative; margin-top: 4px; }
.thumb-nav .thumb-row { min-width: 0; }
.thumb-arrow { position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(17, 94, 55, .18); border-radius: 50%; background: rgba(255,255,255,.96); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 5px 18px rgba(0,0,0,.14); transform: translateY(-50%); transition: opacity .18s ease, visibility .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.thumb-arrow[data-gallery-thumb-prev] { inset-inline-start: 6px; }
.thumb-arrow[data-gallery-thumb-next] { inset-inline-end: 6px; }
.thumb-arrow span { font-size: 30px; line-height: 1; }
.thumb-arrow:hover:not(:disabled), .thumb-arrow:focus-visible { border-color: var(--green); color: var(--green-dark); }
.thumb-arrow:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 35%, transparent); outline-offset: 2px; }
.thumb-arrow:disabled { opacity: .3; cursor: default; box-shadow: none; pointer-events: none; }
[dir="rtl"] .thumb-arrow span { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
    .thumb-arrow { opacity: 0; visibility: hidden; pointer-events: none; }
    .thumb-nav:hover .thumb-arrow,
    .thumb-nav:focus-within .thumb-arrow { opacity: 1; visibility: visible; pointer-events: auto; }
    .thumb-nav:hover .thumb-arrow:disabled,
    .thumb-nav:focus-within .thumb-arrow:disabled { opacity: .3; pointer-events: none; }
}
@media (max-width: 480px) { .thumb-arrow { width: 34px; height: 34px; } }
.thumb-btn {
    flex: 0 0 auto;
    width: 78px;
    height: 78px;
    padding: 0;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    scroll-snap-align: start;
}
.thumb-btn img { height: 100%; width: 100%; object-fit: contain; background: #fff; border-radius: 6px; display: block; }
.thumb-btn.is-active,
.thumb-btn:focus-visible { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 16%, transparent); outline: 0; }

/* Product image lightbox */
body.lightbox-open { overflow: hidden; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 1000; }
.lightbox:not([hidden]) { display: flex; align-items: center; justify-content: center; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(9, 14, 12, .85); }
.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close { top: -18px; inset-inline-end: -18px; width: 40px; height: 40px; font-size: 22px; line-height: 1; }
.lightbox-prev,
.lightbox-next { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 28px; line-height: 1; }
.lightbox-prev { inset-inline-start: -20px; }
.lightbox-next { inset-inline-end: -20px; }
.lightbox-prev[hidden],
.lightbox-next[hidden] { display: none; }

@media (max-width: 575px) {
    .lightbox-content { max-width: 96vw; }
    .lightbox-close { top: 8px; inset-inline-end: 8px; }
    .lightbox-prev { inset-inline-start: 4px; }
    .lightbox-next { inset-inline-end: 4px; }
}

.product-detail .detail-info h1 {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    font-weight: 900;
}
.product-brand-primary {
    width: auto; min-height: 10px; display: flex; align-items: center;
    margin: 6px 0 10px; font-size: 15px; font-weight: 800;
}
.product-brand-primary img { display: block; width: auto; height: 10px; max-width: 100%; object-fit: contain; object-position: left center; }
.rtl .product-brand-primary img { object-position: right center; }
.detail-info p, .product-points { color: var(--muted); }
.customer-benefits { margin: 18px 0; padding: 16px; border: 1px solid color-mix(in srgb, var(--green) 18%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--green) 5%, #fff); }
.detail-info .customer-benefits-intro { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.customer-benefits-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.customer-benefits-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.customer-benefit-icon { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(0,95,49,.09); }
.customer-benefit-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-about { margin-top: 28px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.product-about h2 { margin: 0 0 16px; font-size: 18px; line-height: 1.3; font-weight: 800; }
.product-about-list { display: grid; gap: 10px; margin: 0; padding-inline-start: 22px; color: var(--ink); font-size: 15px; line-height: 1.55; }
.product-about-list li { padding-inline-start: 3px; overflow-wrap: anywhere; }
.product-about-list li::marker { color: var(--green); }
.product-specifications { margin-top: 28px; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.product-specifications h2 { margin: 0 0 16px; font-size: 20px; }
.product-specifications-content { max-width: 100%; overflow-wrap: anywhere; }
.product-specifications-content table { display: block; width: max-content; min-width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; -webkit-overflow-scrolling: touch; }
.product-specifications-content th, .product-specifications-content td { padding: 9px 12px; border: 1px solid var(--border); text-align: start; }
.product-specifications-content a { overflow-wrap: anywhere; }
.rating { color: #f59e0b; font-weight: 900; margin-bottom: 10px; }
.rating span { color: var(--muted); }
.detail-price { font-size: 30px; margin: 12px 0; }
.quantity-row { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.quantity-row button, .quantity-row input { width: 44px; height: 42px; border: 0; background: #fff; text-align: center; font-weight: 800; }
.quantity-row input { border-inline: 1px solid var(--border); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stock-pill { display: inline-block; background: #e7f8ee; color: var(--green); border-radius: 999px; padding: 7px 12px; font-weight: 900; margin-bottom: 12px; }
.stock-pill.stock-in { background: #e7f8ee; color: var(--green); }
.stock-pill.stock-limited { background: #fff7e0; color: #92400e; }
.stock-pill.stock-out { background: #fde8e8; color: var(--red); }
.stock-pill.stock-preorder { background: #e6f0ff; color: #1d4ed8; }
.detail-stock-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-condition-badge { display: inline-block; background: #f1f3f5; color: #495057; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .92em; margin-bottom: 12px; }
.mobile-purchase-bar { display: none; }

@media (max-width: 767px) {
    body.has-mobile-purchase-bar {
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-purchase-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 900;
        display: grid;
        grid-template-columns: minmax(82px, .8fr) repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -8px 24px rgba(17, 24, 39, .12);
    }
    .mobile-purchase-bar[hidden] { display: none; }
    .mobile-purchase-summary {
        display: flex;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        line-height: 1.15;
    }
    .mobile-purchase-summary strong {
        overflow: hidden;
        color: var(--green);
        font-size: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-purchase-summary small {
        overflow: hidden;
        margin-top: 3px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-purchase-bar .btn {
        min-width: 0;
        min-height: 48px;
        padding: 7px 8px;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.15;
    }
    .mobile-purchase-bar .btn:focus-visible {
        outline: 3px solid var(--yellow);
        outline-offset: 2px;
    }
    .mobile-purchase-bar .btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }
}

@media (max-width: 390px) {
    body.has-mobile-purchase-bar {
        padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-purchase-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mobile-purchase-summary {
        grid-column: 1 / -1;
        min-height: 28px;
    }
    .mobile-purchase-summary small { margin-top: 1px; }
}

/* Transaction History payment-status pill. Same shape as .stock-pill -
   background/color pairs with real text inside, never color alone. */
.status-pill { display: inline-block; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-weight: 900; font-size: 13px; white-space: nowrap; }
.status-pill.status-pending { background: #fff7e0; color: #92400e; }
.status-pill.status-collected { background: #e7f8ee; color: var(--green); }
.status-pill.status-cancelled { background: #fde8e8; color: var(--red); }
.status-pill.status-refunded { background: #e6f0ff; color: #1d4ed8; }

/* Order Detail item-table thumbnail. Same sizing/values as .cart-item img. */
.order-item-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--soft); }
.detail-price del { color: var(--muted); font-size: 18px; margin-inline-start: 8px; }
.discount-badge { display: inline-block; background: var(--red); color: #fff; font-size: 14px; font-weight: 900; border-radius: 999px; padding: 4px 10px; margin-inline-start: 8px; vertical-align: middle; }
/* Product Detail: the same badge, repositioned onto the main gallery image
   (.gallery-main is already position:relative, see .gallery-main above)
   instead of inline in the price row - small/premium sizing, top corner,
   never covering more than a corner of the photo. */
.gallery-discount-badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    margin-inline-start: 0;
    font-size: 12px;
    padding: 5px 11px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(17, 24, 39, .18);
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.out-of-stock-msg { color: var(--red); font-weight: 800; align-self: center; }

/* Product Data tab notices on the product detail page: the minimum order
   quantity, and a future availability date. Both are informational - the
   server is what actually enforces them (core/Cart.php, pages/checkout.php). */
.detail-minimum-note,
.detail-availability-note {
    margin: 0 0 8px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.4;
}
.detail-minimum-note { background: #eef8f2; color: #14603c; }
.detail-availability-note { background: #fff4e5; color: #8a4b00; }
.product-options { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 22px; max-width: 100%; }
.product-option-row { display: flex; flex-direction: column; gap: 6px; max-width: 100%; width: 100%; }
.product-option-label { font-weight: 800; }
.req-mark { color: var(--red); }
.product-option-select { width: 100%; max-width: 320px; }
.detail-delivery-note { color: var(--muted); font-size: var(--font-size-small); margin: 10px 0 0; }

/* Product option tiles: clickable, keyboard-accessible radio tiles that
   progressively replace the always-present <select> above (no-JS fallback -
   see the inline script guard in product-detail.php). Text-value options
   (storage/size/model/...) and colour_swatch options share this same
   generic tile system; colour options add the circular swatch visual via
   the --swatch modifier. Nothing here is specific to any option name. */
.product-option-tiles { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.product-option-tiles[hidden] { display: none; }
.product-option-row.is-tiles-ready .product-option-select--tile-fallback { display: none; }
.product-option-tile {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 44px;
    min-height: 44px;
    padding-block: 9px;
    padding-inline: 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.product-option-tile--swatch { padding-block: 5px; padding-inline: 5px 9px; }
.product-option-tile input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.product-option-tile-visual {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    background: var(--swatch-color, #fff);
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}
.product-option-tile-visual--text { background: var(--soft); }
/* Color values with an admin-uploaded product image use that image as the
   selector thumbnail instead of a plain color circle (see product-detail.php). */
.product-option-tile-visual--image {
    background: #fff;
    overflow: hidden;
    padding: 0;
}
.product-option-tile-visual--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.product-option-tile-label {
    max-width: 150px;
    overflow-wrap: anywhere;
    font-size: var(--font-size-ui);
    font-weight: 800;
    line-height: 1.2;
}
.product-option-tile--swatch .product-option-tile-label { font-size: 13px; }
.product-option-tile:hover { border-color: var(--green); }
.product-option-tile input:checked ~ .product-option-tile-label { color: var(--green-dark); }
.product-option-tile input:checked + .product-option-tile-visual {
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--green);
}
.product-option-tile input:checked + .product-option-tile-visual::after {
    content: "✓";
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #111;
    font-size: 12px;
    font-weight: 900;
}
.product-option-tile:has(input:checked),
.product-option-tile.is-selected {
    border-color: var(--green);
    background: var(--soft);
}
.product-option-tile:focus-within {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.product-option-tile:has(input:disabled),
.product-option-tile.is-disabled {
    border-style: dashed;
    cursor: not-allowed;
    color: var(--muted);
    opacity: .55;
}
.product-option-tile:has(input:disabled) .product-option-tile-visual,
.product-option-tile.is-disabled .product-option-tile-visual { opacity: .45; }
.product-option-tile.is-outofstock .product-option-tile-label { text-decoration: line-through; }
/* Combination-availability preview (current selection or hover/keyboard-focus
   on the OTHER option group) - purely visual, never disables or hides a
   value; every tile stays fully clickable/tappable in both states. Kept
   subtle and transition-based (no keyframe/blink animation) so it never
   raises the flashing-content accessibility concern. Selected-state styling
   above always reads visually stronger than either of these. */
.product-option-tile.is-combo-available:not(.is-selected):not(:has(input:checked)) {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(0, 122, 61, .14);
}
.product-option-tile.is-combo-unavailable:not(.is-selected):not(:has(input:checked)) {
    opacity: .5;
}
.product-option-tile.is-combo-unavailable:not(.is-selected):not(:has(input:checked)) .product-option-tile-visual {
    opacity: .7;
}
.variant-unavailable-msg { color: var(--red); font-weight: 800; margin: 4px 0 0; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.cart-variant-label { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
@media (max-width: 575px) {
    .product-option-select { max-width: 100%; }
}
.option-group { margin: 18px 0; }
.swatches { display: flex; gap: 8px; margin-top: 8px; }
.swatches button { border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 8px 13px; font-weight: 800; }
.swatches .active { border-color: var(--green); color: var(--green); background: var(--soft); }
.info-tabs { border: 1px solid var(--border); border-radius: 8px; padding: 18px; margin-top: 26px; }
.tab-head { display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; font-weight: 900; }
.tab-head span:first-child { color: var(--green); }
.cart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cart-toolbar a, .cart-toolbar button, .summary-link, .link-muted { color: var(--green); font-weight: 900; background: none; border: 0; padding: 0; }
.account-chip {
    background: var(--green);
    color: #fff !important;
    font-weight: 900;
}
.account-chip svg { width: 20px; height: 20px; }
.cart-item {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    gap: 13px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}
.cart-item.full {
    grid-template-columns: 96px minmax(0, 1fr) 132px 126px auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 24, 39, .05);
}
.cart-thumb img,
.cart-item img { width: 84px; height: 84px; object-fit: contain; border-radius: 8px; background: var(--soft); }
.cart-item h2 { font-size: 16px; font-weight: 900; margin: 0 0 5px; }
.cart-item p { color: var(--muted); margin: 0; }
.cart-product-info a { color: var(--green); font-weight: 900; }
.cart-qty-control {
    display: grid;
    grid-template-columns: 36px 48px 36px;
    align-items: center;
    width: 120px;
    min-width: 120px;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}
.cart-qty-control button,
.cart-qty-control input {
    width: 100%;
    height: 38px;
    border: 0;
    background: #fff;
    text-align: center;
    font-weight: 900;
}
.cart-qty-control button {
    background: var(--soft);
    color: var(--green);
    font-size: 18px;
}
.cart-price-stack {
    text-align: end;
}
.cart-price-stack small,
.cart-price-stack strong {
    display: block;
}
.cart-price-stack small {
    color: var(--muted);
}
.cart-price-stack strong {
    color: #b12704;
    font-size: 17px;
}
.cart-secondary-action {
    margin-top: 10px;
    border-color: var(--border);
    color: var(--green);
    background: #fff;
}
.cart-secondary-action:hover {
    background: var(--soft);
    border-color: var(--green);
    color: var(--green);
}
.quantity-row.small { margin-bottom: 0; }
.quantity-row.small button, .quantity-row.small input { width: 34px; height: 34px; }
.coupon-box { display: grid; grid-template-columns: 1fr 130px; gap: 10px; margin-top: 16px; }
.sticky-summary { position: sticky; top: 170px; }
.summary-box div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.summary-box .total { font-size: 20px; font-weight: 900; border-bottom: 0; }
.order-success-item-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.order-success-item-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.checkout-form label { font-weight: 900; margin-bottom: 6px; }
.checkout-form .form-control, .checkout-form .form-select { border-radius: 8px; min-height: 46px; }
.checkout-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.checkout-steps span { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fff; font-weight: 900; text-align: center; }
.otp-verify-panel { max-width: 480px; }
.otp-verify-panel p { margin-bottom: 10px; }
.otp-code-input {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 10px;
    text-align: center;
    max-width: 220px;
    min-height: 54px;
    border-radius: 8px;
}
.otp-resend-form { border-top: 1px solid var(--border); padding-top: 14px; }

/* Delivery method tiles (checkout order-level selection). Horizontal,
   wrapping flexbox so it mirrors correctly under dir="rtl" without any
   direction-specific overrides, and wraps to one column on narrow screens
   naturally via each tile's min/max width rather than a breakpoint switch. */
.delivery-method-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.delivery-method-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.delivery-method-option:hover { border-color: var(--green); }
.delivery-method-option:focus-within {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.delivery-method-option:has(input:checked),
.delivery-method-option.is-selected { border-color: var(--green); background: var(--soft); box-shadow: 0 0 0 1px var(--green) inset; }
.delivery-method-option input[type="radio"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--green); margin-top: 2px; }
.delivery-method-badge {
    position: absolute;
    inset-block-start: -9px;
    inset-inline-start: 12px;
    background: var(--yellow);
    color: var(--black);
    font-size: 11px;
    font-weight: 900;
    border-radius: 999px;
    padding: 2px 9px;
}
.delivery-method-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.delivery-method-info strong { font-weight: 900; }
.delivery-method-desc, .delivery-method-eta { color: var(--muted); font-size: 13px; }
.delivery-method-price { font-weight: 900; white-space: nowrap; }
.delivery-method-price.is-free { color: var(--green-dark); }
@media (max-width: 767px) {
    .delivery-method-option { padding: 12px; flex: 1 1 100%; }
}

/* Saved-address selection (checkout). Same flexbox + gap approach as
   .delivery-method-option so it mirrors correctly under dir="rtl". */
.saved-address-list { display: grid; gap: 10px; margin-top: 10px; margin-bottom: 20px; }
.saved-address-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.saved-address-option:has(input:checked),
.saved-address-option.is-selected { border-color: var(--green); background: var(--soft); }
.saved-address-option input[type="radio"] { width: 20px; height: 20px; flex-shrink: 0; margin-block-start: 2px; accent-color: var(--green); }
.saved-address-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.saved-address-info small { color: var(--muted); font-size: 13px; }
.checkout-steps .active { background: var(--green); color: #fff; border-color: var(--green); }
.safe-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.success-section { padding: 70px 0; background: var(--soft); min-height: 60vh; display: grid; place-items: center; }
.success-box { text-align: center; max-width: 680px; margin: auto; }
.success-box.wide { max-width: 900px; }
.success-icon {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 42px;
    margin-bottom: 18px;
}
.order-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0; text-align: start; }
.order-meta div, .dashboard-cards div { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: #fff; }
.order-meta span, .order-meta strong, .dashboard-cards span, .dashboard-cards strong { display: block; }
.order-meta span, .dashboard-cards span { color: var(--muted); font-size: 13px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0; }
.timeline span { border: 1px solid var(--border); border-radius: 8px; padding: 11px; background: #fff; font-weight: 900; }
.timeline .done { background: #e7f8ee; color: var(--green); border-color: #bde9cf; }
.success-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.result-count { color: var(--muted); font-weight: 800; margin-bottom: 14px; }
.card-actions { display: grid; gap: 8px; }
.compare-table { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.compare-table table { width: 100%; min-width: 720px; border-collapse: collapse; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--border); padding: 14px; text-align: start; }
.compare-table th { background: var(--soft); font-weight: 900; }
.account-menu { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.account-menu a { display: block; padding: 13px 15px; border-bottom: 1px solid var(--border); font-weight: 800; }
.account-menu form { margin: 0; }
.account-menu button { display: block; width: 100%; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: inherit; font: inherit; font-weight: 800; text-align: start; cursor: pointer; }
.account-menu .active { background: var(--green); color: #fff; }
.account-panel, .track-card, .faq-item { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 20px; }
.dashboard-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.dashboard-cards strong { color: var(--green); font-size: 28px; }
.account-summary-list { display: grid; gap: 12px; margin: 0 0 16px; }
.account-summary-list > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.account-summary-list dt { color: var(--muted); font-weight: 700; margin: 0; }
.account-summary-list dd { margin: 0; font-weight: 800; text-align: end; overflow-wrap: anywhere; }

/* Customer-account dashboard: reusable nav panel + dashboard tiles (scoped) */
.account-main { min-width: 0; }
.account-menu-list { list-style: none; margin: 0; padding: 0; }
.account-menu-list li:last-child a,
.account-menu-list li:last-child button,
.account-menu-list li:last-child .account-menu-disabled { border-bottom: 0; }
.account-menu a, .account-menu button, .account-menu-disabled {
    display: flex;
    align-items: center;
    gap: 10px;
}
.account-menu a:focus-visible, .account-menu button:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: -3px;
}
.account-menu-icon { width: 20px; height: 20px; flex: none; display: inline-flex; color: var(--green); }
.account-menu-icon svg { width: 100%; height: 100%; }
.account-menu .active .account-menu-icon { color: #fff; }
.account-menu-disabled {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    cursor: not-allowed;
}
.account-menu-disabled .account-menu-icon { color: var(--muted); }
.account-menu-disabled em {
    margin-inline-start: auto;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    background: var(--soft);
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}

.dashboard-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.dashboard-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
a.dashboard-tile:hover { border-color: var(--green); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.dashboard-tile:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.dashboard-tile-icon { width: 28px; height: 28px; color: var(--green); }
.dashboard-tile-icon svg { width: 100%; height: 100%; }
.dashboard-tile-label { font-weight: 800; }
.dashboard-tile-count {
    position: absolute;
    inset-inline-end: 16px;
    inset-block-start: 16px;
    background: var(--green);
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.dashboard-tile.is-disabled {
    color: var(--muted);
    background: var(--soft);
    cursor: not-allowed;
}
.dashboard-tile.is-disabled .dashboard-tile-icon { color: var(--muted); }
.dashboard-tile-badge {
    position: absolute;
    inset-inline-end: 14px;
    inset-block-start: 14px;
    font-size: 11px;
    font-weight: 800;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}
@media (max-width: 575px) {
    .dashboard-tiles { grid-template-columns: 1fr; }
}

/* Address Book list page */
.address-book-toolbar { display: flex; justify-content: flex-end; }
.address-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.address-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 18px;
}
.address-card.is-default { border-color: var(--green); }
.address-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.address-badge-default {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}
.address-label { font-weight: 800; color: var(--muted); font-size: 13px; }
.address-card-name { font-weight: 900; margin: 0 0 2px; }
.address-card-phone { color: var(--muted); margin: 0 0 8px; }
.address-card-lines { margin: 0 0 14px; }
.address-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.address-card-actions form { margin: 0; }
@media (max-width: 575px) {
    .address-card-grid { grid-template-columns: 1fr; }
}
.track-form { display: grid; grid-template-columns: 1fr 1fr 140px; gap: 10px; margin-bottom: 18px; }
.timeline.detailed { margin-top: 18px; }
.faq-list { display: grid; gap: 12px; max-width: 900px; margin: auto; }
.faq-item h2 { font-size: 18px; font-weight: 900; }
.faq-item p { color: var(--muted); margin-bottom: 0; }
.auth-wrap {
    display: grid;
    place-items: center;
}
.auth-card {
    width: min(460px, 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
}
.auth-card label {
    display: block;
    font-weight: 900;
    margin: 12px 0 6px;
}
.signup-card {
    width: min(820px, 100%);
}
.signup-card fieldset {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}
.signup-card legend {
    width: 100%;
    margin: 0 0 4px;
    padding-block-end: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    font-size: 18px;
    font-weight: 900;
}
.signup-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}
.signup-grid-full {
    grid-column: 1 / -1;
}
.signup-card .required-mark {
    color: #b42318;
}
.signup-newsletter {
    margin-block-start: 12px;
}
.signup-card .signup-newsletter label {
    display: inline-block;
    margin: 0;
}
@media (max-width: 576px) {
    .signup-card {
        padding: 18px;
    }
    .signup-form-grid {
        grid-template-columns: 1fr;
    }
    .signup-grid-full {
        grid-column: auto;
    }
}
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}
.social-login button {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-weight: 900;
}
.auth-note {
    color: var(--muted);
    font-size: 13px;
}
.account-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.account-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}
.account-panel h2 { font-size: 20px; font-weight: 900; margin: 0 0 10px; }
.account-panel-lead { font-weight: 900; color: var(--green); margin: 0 0 6px; }
.account-continue-btn { display: inline-block; margin-top: 14px; }
.account-panel-returning .auth-card {
    width: 100%;
    border: 0;
    padding: 0;
}
.auth-forgot-link {
    display: inline-block;
    margin: 6px 0 0;
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
}
@media (max-width: 767px) {
    .account-entry { grid-template-columns: 1fr; }
}
.site-footer { background: var(--black); color: #e5e7eb; padding: 34px 0 18px; }
.footer-newsletter {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.12);
    padding-bottom: 28px;
    margin-bottom: 28px;
}
.footer-newsletter h2 { color: #fff; font-weight: 900; margin: 0 0 4px; }
.footer-newsletter p { margin: 0; color: #d1d5db; }
.footer-newsletter form { display: grid; grid-template-columns: 1fr 120px; }
.footer-newsletter input, .footer-newsletter button {
    min-height: 46px;
    border: 0;
    padding: 0 13px;
}
.footer-newsletter input { border-radius: 8px 0 0 8px; }
.footer-newsletter button { border-radius: 0 8px 8px 0; background: var(--green); color: #fff; font-weight: 900; }
.site-footer h3 { font-size: 16px; font-weight: 900; color: #fff; }
.site-footer a { display: block; color: #d1d5db; margin-bottom: 8px; }
.footer-brand { color: #fff; font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.whatsapp-link {
    display: inline-block !important;
    background: var(--green);
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 900;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #e5e7eb;
    flex-shrink: 0;
}
.footer-social a:hover,
.footer-social a:focus-visible { background: var(--green); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; color: #9ca3af; }
.rtl .navbar-nav { padding-right: 0; }
.rtl .form-control, .rtl .form-select, .rtl textarea, .rtl input, .rtl select { text-align: right; }
.rtl .level-two { inset-inline-start: auto; inset-inline-end: 100%; }
.rtl .footer-newsletter input { border-radius: 0 8px 8px 0; }
.rtl .footer-newsletter button { border-radius: 8px 0 0 8px; }

@media (min-width: 768px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dense-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr 340px; align-items: start; }
    .contact-grid { grid-template-columns: 1fr 340px; align-items: start; }
}

@media (min-width: 992px) {
    .listing-layout { grid-template-columns: 250px 1fr; align-items: start; }
    .search-layout { grid-template-columns: 250px 1fr; align-items: start; }
    .product-detail { grid-template-columns: 1fr 1fr; align-items: start; }
    .account-grid { grid-template-columns: 1fr 280px; align-items: start; }
}

@media (min-width: 1200px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dense-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .listing-layout .product-grid,
    .search-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .product-grid.homepage-product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1600px) {
    .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .listing-layout .product-grid,
    .search-layout .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
    .middle-header-grid { grid-template-columns: 1fr; }
    .header-actions { justify-content: space-between; }
    .home-grid { grid-template-columns: minmax(0, 1fr) 220px; }
    .category-strip { grid-template-columns: repeat(3, 1fr); }
    .hero-section { min-height: 330px; }
}

@media (max-width: 991px) {
    .main-menu .navbar-nav { padding: 10px 0; }
    .level-one, .level-two {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border-radius: 8px;
        margin: 0 12px 8px;
    }
    .dropdown-item-wrap:hover > .level-one,
    .has-sub:hover > .level-two,
    .dropdown-item-wrap:focus-within > .level-one,
    .has-sub:focus-within > .level-two { display: none; }
    .dropdown-item-wrap.is-open > .level-one,
    .has-sub.is-open > .level-two { display: block; }
    .nav-item-line { width: 100%; }
    .nav-expand { flex: 0 0 48px; }
    .menu-offer { padding: 0 18px 14px; }
    .home-grid { grid-template-columns: 1fr; }
    .hero-section { min-height: 315px; }
    .footer-newsletter { grid-template-columns: 1fr; }
    .sticky-summary { position: static; }
    .cart-item.full { grid-template-columns: 74px 1fr; }
    .cart-item.full .cart-qty-control,
    .cart-item.full .cart-price-stack,
    .cart-item.full .cart-remove { grid-column: 2; justify-self: start; }
    .cart-price-stack { text-align: start; }
    .order-meta, .timeline, .dashboard-cards, .track-form { grid-template-columns: 1fr 1fr; }
    .gallery .main-photo { height: 390px; }
    .dense-grid .product-image { height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}

@media (max-width: 575px) {
    body { background: #f2f5f3; }
    .site-header {
        position: static;
        border-bottom: 0;
        box-shadow: 0 8px 22px rgba(0, 95, 49, .12);
    }
    .top-strip {
        padding: 6px 0;
        font-size: 12px;
        background: linear-gradient(90deg, var(--green-dark), var(--green));
    }
    .top-strip-inner { display: block; text-align: center; font-weight: 800; }
    .top-utility { display: none; }
    .middle-header {
        padding: 10px 0 12px;
        background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
    }
    .middle-header-grid {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: center;
    }
    .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 12px;
        border-radius: 10px;
    }
    span.brand-icon {
        box-shadow: 0 8px 16px rgba(0, 122, 61, .22);
    }
    .brand-mark { gap: 8px; }
    .brand-mark strong { font-size: 20px; }
    .brand-mark small { display: none; }
    .search-box { grid-column: 1 / -1; order: 3; }
    .search-combobox {
        border: 1px solid #cde5d6;
        border-radius: 999px;
        box-shadow: 0 8px 18px rgba(17, 24, 39, .08);
    }
    .search-combobox input[type="search"] {
        min-height: 40px;
        padding: 0 14px;
        font-size: 13px;
        background: #fff;
    }
    .search-submit {
        min-height: 40px;
        width: 44px;
        border-radius: 999px;
        margin: 3px;
    }
    .search-suggest-list { max-height: 60vh; }
    .header-actions {
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
        gap: 6px;
    }
    .mini-contact { display: none; }
    .icon-link:not(.account-chip) { display: none; }
    .cart-button {
        padding: 8px 10px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        border-radius: 999px;
        font-size: 13px;
        box-shadow: 0 8px 16px rgba(0, 122, 61, .18);
    }
    .cart-button-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .cart-button strong {
        min-width: 20px;
        min-height: 20px;
        padding-inline: 5px;
        font-size: 12px;
    }
    .main-menu {
        background: #ffffff;
        border-top: 1px solid #e2eee7;
        border-bottom: 1px solid #d8eadf;
    }
    .main-menu .navbar-toggler {
        margin: 6px 0;
        padding: 5px 9px;
        border: 1px solid #cde5d6;
        border-radius: 999px;
        background: #f5fbf7;
    }
    .main-menu .navbar-nav { padding: 4px 0 8px; width: 100%; }
    .main-menu .nav-link {
        padding: 10px 12px;
        font-size: 13px;
        color: var(--green-dark);
        border-radius: 8px;
    }
    .main-menu .nav-link.active,
    .main-menu .nav-link:hover {
        background: #e7f7ee;
        color: var(--green-dark);
    }
    .menu-offer { display: none; }
    .porto-home { padding: 12px 0 8px; }
    .home-grid { gap: 10px; }
    .side-categories {
        order: 2;
        border: 0;
        background: transparent;
        overflow: visible;
    }
    .side-categories h2 {
        display: none;
    }
    .side-categories a {
        display: inline-flex;
        width: auto;
        margin: 0 7px 8px 0;
        padding: 9px 12px;
        border: 1px solid #cde5d6;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 4px 10px rgba(17, 24, 39, .05);
        font-size: 13px;
    }
    .side-categories a span { display: none; }
    .hero-section {
        padding: 26px 22px;
        min-height: 255px;
        border-radius: 18px;
        background: url('https://images.unsplash.com/photo-1607083206869-4c7672e72a8a?auto=format&fit=crop&w=900&q=75') center/cover;
    }
    .hero-section h1 { font-size: 30px; line-height: 1.05; }
    .hero-section p { font-size: 14px; margin-bottom: 0; }
    .hero-actions { gap: 8px; margin-top: 16px; }
    .hero-actions .btn { padding: 9px 14px; font-size: 13px; }
    .promo-stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .promo-tile {
        min-height: 118px;
        border-radius: 14px;
        padding: 14px;
    }
    .promo-tile strong { font-size: 22px; }
    .category-strip {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
    }
    .category-card.compact {
        min-width: 132px;
        min-height: 100px;
        border-radius: 14px;
        scroll-snap-align: start;
    }
    .category-card.compact span { font-size: 24px; }
    .category-card.compact strong { font-size: 13px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-image { height: 190px; }
    .dense-grid .product-image {
        height: 118px;
        margin: 8px 8px 0;
    }
    .product-image .card-badges { top: 6px; inset-inline-start: 6px; inset-inline-end: 6px; gap: 4px; }
    .product-image .card-badges span { padding: 3px 6px; font-size: 10px; }
    .product-card {
        border-radius: 14px;
        box-shadow: 0 8px 18px rgba(17, 24, 39, .06);
    }
    .product-info { padding: 9px 10px 10px; }
    .product-info h3 { font-size: 13px; min-height: 34px; }
    .product-info p { display: none; }
    .market-rating { font-size: 11px; margin-bottom: 4px; }
    .price-line { margin-bottom: 8px; flex-wrap: wrap; gap: 5px; }
    .small-btn { padding: 7px 8px; font-size: 12px; }
    .gallery .main-photo { height: 320px; }
    .thumb-row img { height: 78px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .footer-newsletter form { grid-template-columns: 1fr; gap: 8px; }
    .footer-newsletter input, .footer-newsletter button, .rtl .footer-newsletter input, .rtl .footer-newsletter button { border-radius: 8px; }
    .cart-item { grid-template-columns: 60px 1fr; }
    .cart-item strong { grid-column: 2; }
    .checkout-steps, .coupon-box, .order-meta, .timeline, .dashboard-cards, .track-form { grid-template-columns: 1fr; }
    .cart-item.full {
        grid-template-columns: 72px minmax(0, 1fr) !important;
        align-items: start;
        gap: 10px;
        padding: 10px;
        border-radius: 12px;
    }
    .cart-item.full .cart-thumb {
        grid-column: 1;
        grid-row: 1 / 5;
    }
    .cart-thumb img,
    .cart-item.full img {
        width: 64px;
        height: 64px;
    }
    .cart-item.full .cart-product-info,
    .cart-item.full .cart-qty-control,
    .cart-item.full .cart-price-stack,
    .cart-item.full .cart-remove {
        grid-column: 2 !important;
    }
    .cart-product-info h2 {
        font-size: 14px;
        line-height: 1.25;
    }
    .cart-product-info p,
    .cart-product-info a,
    .cart-price-stack small {
        font-size: 12px;
    }
    .cart-item.full .cart-qty-control {
        display: grid;
        grid-template-columns: 34px 44px 34px;
        width: 112px;
        min-width: 112px;
        justify-self: start;
        margin-top: 3px;
    }
    .cart-qty-control button,
    .cart-qty-control input {
        height: 36px;
    }
    .cart-item.full .cart-price-stack {
        justify-self: start;
        text-align: start;
    }
    .cart-price-stack strong {
        font-size: 15px;
    }
    .cart-item.full .cart-remove {
        justify-self: start;
        padding: 6px 11px;
    }
}


/* Product detail tabs */
.product-tabs-section {
    margin-top: 32px;
}

.product-tabs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

.product-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.product-tab-btn {
    border: 0;
    background: transparent;
    padding: 15px 20px;
    font-weight: 700;
    cursor: pointer;
    color: #475569;
    border-bottom: 3px solid transparent;
}

.product-tab-btn.is-active {
    background: #fff;
    color: #111827;
    border-bottom-color: #b91c1c;
}

.product-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-inline-start: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 12px;
}

.product-tab-panel {
    padding: 24px;
}

.product-description-content {
    line-height: 1.8;
    color: #334155;
    font-size: clamp(14px, 1.3vw, 16px);
    overflow-wrap: anywhere;
}
.product-description-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.product-description-content th, .product-description-content td { border: 1px solid var(--border); padding: 8px 10px; }

/* Grouped Product Attributes specifications (see core/ProductAttribute.php) -
   one card per attribute group, ordered by group then attribute sort_order. */
.product-specs-groups {
    display: grid;
    gap: 20px;
}

.product-specs-group-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--green-dark, #0f5132);
}

.product-specs-table {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    max-width: 100%;
}

.product-spec-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    border-bottom: 1px solid #e5e7eb;
}

.product-spec-row:last-child {
    border-bottom: 0;
}

.product-spec-label,
.product-spec-value {
    padding: 14px 16px;
    overflow-wrap: anywhere;
    min-width: 0;
}

.product-spec-label {
    font-weight: 700;
    background: #f8fafc;
    color: #111827;
}

.product-spec-value {
    color: #334155;
}

.reviews-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 18px;
}

.reviews-summary strong {
    font-size: 28px;
    color: #111827;
}

.product-reviews-list {
    display: grid;
    gap: 14px;
}

.product-review-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.product-review-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.product-review-head span {
    font-weight: 700;
    color: #b91c1c;
}

.product-review-card p {
    color: #334155;
    line-height: 1.7;
}

.product-review-card small,
.muted {
    color: #64748b;
}

@media (max-width: 700px) {
    .product-tabs-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .product-tab-btn {
        text-align: start;
        border-bottom: 1px solid #e5e7eb;
    }

    .product-spec-row {
        grid-template-columns: 1fr;
    }

    .product-spec-label {
        border-bottom: 1px solid #e5e7eb;
    }
}


/* Public product review form */
.write-review-box {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 22px;
}
.write-review-box h3 {
    margin: 0 0 6px;
    font-size: 22px;
}
.review-form-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0;
}
.review-form-errors {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0;
}
.product-review-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.review-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.product-review-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #111827;
}
.product-review-form input,
.product-review-form select,
.product-review-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    color: #111827;
}
.product-review-form textarea {
    resize: vertical;
    min-height: 120px;
}
.review-textarea-label {
    grid-column: 1 / -1;
}
@media (max-width: 700px) {
    .review-form-grid {
        grid-template-columns: 1fr;
    }
}

/* AJAX Cart: wrapping the existing quantity/remove controls in real <form>
   elements (for a genuine no-JS fallback) must not change how they lay out
   inside .cart-item.full's CSS grid - display:contents makes the <form>
   itself transparent to the grid, leaving its child exactly where the bare
   button/div sat before. */
.cart-qty-form,
.cart-remove-form {
    display: contents;
}
.cart-qty-form input,
.cart-remove-form button {
    cursor: pointer;
}
.live-cart-item[aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
}
.live-cart-item button:disabled,
.live-cart-item input:disabled,
[data-product-detail-form] button:disabled,
.card-add-to-cart-form button:disabled {
    opacity: .6;
    cursor: not-allowed;
}
[data-product-detail-form][aria-busy="true"],
.card-add-to-cart-form[aria-busy="true"] {
    opacity: .85;
}

/* Shared AJAX-cart feedback toast (Add to Cart / Update / Remove messages).
   role="status"/"alert" is set per-message by JS; this only handles layout
   and color, mirroring the existing .alert-success/.alert-danger palette
   used elsewhere on the site. */
.cart-feedback-region {
    position: fixed;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 28px));
}
.cart-feedback-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .12);
    border: 1px solid transparent;
    animation: cart-feedback-in .18s ease-out;
}
.cart-feedback-success {
    background: #e7f8ee;
    color: var(--green-dark);
    border-color: #bfe8cf;
}
.cart-feedback-error {
    background: #fde8e8;
    color: var(--red);
    border-color: #f7c6c6;
}
@keyframes cart-feedback-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .cart-feedback-region {
        inset-inline: 14px;
        max-width: none;
    }
}

/* Phase 3 typography scale: compact interface text is deliberately separate
   from semantic headings and long-form reading content. */
.main-menu .nav-link,
.menu-offer,
.level-one a,
.level-two a,
.btn,
.small-btn,
.filter-panel label,
.checkout-form label,
.auth-card label,
.form-label,
.product-review-form label,
.product-option-label,
.delivery-method-info strong,
.account-menu a,
.account-menu button,
.account-menu-disabled,
.table thead th,
.compare-table th,
.product-tab-btn,
.footer-newsletter button {
    font-size: var(--font-size-ui);
}

.form-control,
.form-select,
textarea,
input,
select {
    font-size: var(--font-size-ui);
}

.table tbody td,
.compare-table td,
.product-spec-value,
.listing-toolbar,
.result-count,
.empty-state,
.site-footer,
.footer-bottom {
    font-size: var(--font-size-body);
}

small,
.small,
.form-text,
.text-muted small,
.search-suggest-price del,
.mobile-purchase-summary small,
.account-menu-disabled em,
.dashboard-tile-badge,
.address-badge-default,
.market-rating {
    font-size: var(--font-size-small);
    line-height: 1.45;
}

.product-info h3 {
    font-size: var(--font-size-ui);
}

.product-description-content,
.product-review-card p,
.content-page-body,
.faq-item p {
    font-size: var(--font-size-ui);
    line-height: 1.7;
}

/* Long-form policy/content pages stay narrow for readability even inside
   the wider .container - matches .faq-list / .success-box precedent. */
.content-page-body {
    max-width: 820px;
    margin-inline: auto;
}

.content-page-body h2,
.product-description-content h2 {
    font-size: var(--font-size-heading-md);
    line-height: 1.25;
}

.content-page-body h3,
.product-description-content h3 {
    font-size: var(--font-size-heading-sm);
    line-height: 1.3;
}

.rtl {
    line-height: 1.6;
}
.rtl .btn,
.rtl .form-label,
.rtl .auth-card label,
.rtl .table,
.rtl .account-menu {
    line-height: 1.5;
}

@media (max-width: 767px) {
    .form-control,
    .form-select,
    textarea,
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    .search-combobox input[type="search"],
    .footer-newsletter input {
        font-size: 16px;
    }

    .main-menu .nav-link,
    .side-categories a,
    .product-info h3,
    .small-btn {
        font-size: var(--font-size-ui);
    }

    /* The two-button 320px purchase bar needs its existing compact label
       size to avoid clipping long English/Arabic purchase actions. */
    .mobile-purchase-bar .btn {
        font-size: 13px;
    }
}


/* Customer Reward Points ledger: the signed points column. */
.reward-points-delta { font-weight: 800; white-space: nowrap; }
.reward-points-delta.is-positive { color: var(--green, #14603c); }
.reward-points-delta.is-negative { color: var(--red, #b02a37); }
