/**
 * Modlino Design System — Pages
 * Shop archive، single product، cart، account
 */

/* ═══ HOMEPAGE SECTIONS ══════════════════════════════════════ */

.modlino-features {
    padding: var(--m-space-8) var(--m-container-gutter);
    background: var(--m-bg);
    border-bottom: 1px solid var(--m-color-neutral-100);
}
.modlino-features__grid {
    max-width: var(--m-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-5);
}
.modlino-features__item {
    display: flex;
    align-items: center;
    gap: var(--m-space-3);
    padding: var(--m-space-3);
}
.modlino-features__icon {
    width: 48px; height: 48px;
    border-radius: var(--m-radius-lg);
    background: var(--m-primary-soft);
    color: var(--m-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modlino-features__icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }
.modlino-features__title { font-size: var(--m-text-base); font-weight: var(--m-weight-bold); color: var(--m-text-strong); margin-bottom: 2px; }
.modlino-features__sub { font-size: var(--m-text-xs); color: var(--m-text-muted); }

@media (max-width: 999px) {
    .modlino-features__grid { grid-template-columns: repeat(2, 1fr); gap: var(--m-space-3); }
}

/* Category cards */
.modlino-cats {
    padding: var(--m-space-12) var(--m-container-gutter);
    background: var(--m-bg);
}
.modlino-cats__grid {
    max-width: var(--m-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--m-space-4);
}
.modlino-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background: var(--m-surface);
    padding: var(--m-space-6) var(--m-space-3);
    border-radius: var(--m-radius-xl);
    border: 1px solid var(--m-border);
    transition: all var(--m-duration-normal) var(--m-ease-standard);
}
.modlino-cat-card:hover {
    border-color: var(--m-primary);
    transform: translateY(-3px);
    box-shadow: var(--m-shadow-md);
}
.modlino-cat-card__icon {
    width: 56px; height: 56px;
    border-radius: var(--m-radius-lg);
    background: var(--m-primary-soft);
    color: var(--m-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--m-space-3);
    transition: all var(--m-duration-normal) var(--m-ease-standard);
}
.modlino-cat-card:hover .modlino-cat-card__icon {
    background: var(--m-primary);
    color: var(--m-text-on-brand);
}
.modlino-cat-card__icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; }
.modlino-cat-card__name { font-size: var(--m-text-sm); font-weight: var(--m-weight-semibold); color: var(--m-text-strong); }
.modlino-cat-card__count { font-size: var(--m-text-2xs); color: var(--m-text-muted); margin-top: 2px; }

@media (max-width: 999px) {
    .modlino-cats__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .modlino-cats__grid { grid-template-columns: repeat(3, 1fr); gap: var(--m-space-2); }
}

/* Promo Banners */
.modlino-banners {
    padding: var(--m-space-6) var(--m-container-gutter);
}
.modlino-banners__grid {
    max-width: var(--m-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--m-space-4);
}
.modlino-banner {
    border-radius: var(--m-radius-2xl);
    padding: var(--m-space-8);
    color: var(--m-text-on-brand);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 240px;
    transition: transform var(--m-duration-slow) var(--m-ease-standard);
}
.modlino-banner:hover { transform: translateY(-4px); }
.modlino-banner--primary { background: linear-gradient(135deg, var(--m-color-brand-600), var(--m-color-brand-700)); }
.modlino-banner--warm    { background: linear-gradient(135deg, #f59e0b, #d97706); }
.modlino-banner--cool    { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.modlino-banner h3 {
    color: var(--m-text-on-brand);
    font-size: var(--m-text-2xl);
    font-weight: var(--m-weight-extrabold);
    margin-bottom: var(--m-space-2);
}
.modlino-banner p {
    color: rgba(255,255,255,0.92);
    font-size: var(--m-text-sm);
    margin-bottom: var(--m-space-4);
}
.modlino-banner__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-1);
    background: rgba(255,255,255,0.2);
    padding: 8px 18px;
    border-radius: var(--m-radius-full);
    color: var(--m-text-on-brand);
    font-weight: var(--m-weight-semibold);
    font-size: var(--m-text-sm);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
}
.modlino-banner__decor {
    position: absolute;
    bottom: -20px; left: -20px;
    width: 180px; height: 180px;
    opacity: 0.15;
    pointer-events: none;
}
.modlino-banner__decor svg { width: 100%; height: 100%; fill: currentColor; }

@media (max-width: 999px) { .modlino-banners__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .modlino-banners__grid { grid-template-columns: 1fr; } }

/* ═══ PRODUCT CARD (shop loop) — minimal premium ═══════════════
 * Goal: emphasize image + price. Hide CTA button. Show actual % discount.
 * Layout: image (1:1) → title (1 line) → category (xs muted) → price (bold)
 * ══════════════════════════════════════════════════════════════ */

.woocommerce ul.products,
[data-products] {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-4);
    list-style: none;
    padding: 0;
    margin: 0;
}
@media (max-width: 999px) { .woocommerce ul.products, [data-products] { grid-template-columns: repeat(3, 1fr); gap: var(--m-space-3); } }
@media (max-width: 689px) { .woocommerce ul.products, [data-products] { grid-template-columns: repeat(2, 1fr); gap: var(--m-space-3); } }

.woocommerce ul.products li.product,
[data-products] li.product {
    background: var(--m-surface);
    border-radius: var(--m-radius-xl);
    border: 1px solid var(--m-color-neutral-100);
    box-shadow: var(--m-shadow-card);
    overflow: hidden;
    transition: transform var(--m-duration-normal) var(--m-ease-standard),
                box-shadow var(--m-duration-normal) var(--m-ease-standard);
    position: relative;
    padding: 0 0 var(--m-space-4);
    margin: 0;
    list-style: none;
}
.woocommerce ul.products li.product:hover,
[data-products] li.product:hover {
    transform: translateY(-2px);
    box-shadow: var(--m-shadow-card-hover);
}

/* Image area — no colored background, generous padding */
[data-products] .product figure,
.woocommerce ul.products li.product figure,
[data-products] .product > a:first-child {
    margin: 0;
    padding: var(--m-space-4);
    background: transparent;
    aspect-ratio: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
[data-products] .product figure img,
.woocommerce ul.products li.product img,
[data-products] .product > a:first-child img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform var(--m-duration-slow) var(--m-ease-standard);
    aspect-ratio: 1 !important;
}
[data-products] li.product:hover img,
.woocommerce ul.products li.product:hover img {
    transform: scale(1.04);
}

/* Title — 1 line, ellipsis */
[data-products] .product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: var(--m-text-sm);
    line-height: var(--m-leading-snug);
    font-weight: var(--m-weight-semibold);
    color: var(--m-text-strong);
    padding: var(--m-space-3) var(--m-space-4) 2px;
    margin: 0;
    min-height: 0;
    text-align: right;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category — small, muted, single line */
[data-products] .product .entry-meta,
.woocommerce ul.products li.product .entry-meta {
    font-size: var(--m-text-2xs);
    font-weight: var(--m-weight-medium);
    text-transform: none;
    color: var(--m-color-neutral-400);
    padding: 0 var(--m-space-4);
    margin: 0;
    letter-spacing: 0;
    list-style: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-products] .product .entry-meta li,
.woocommerce ul.products li.product .entry-meta li {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
}
[data-products] .product .entry-meta a,
.woocommerce ul.products li.product .entry-meta a {
    color: inherit;
    text-decoration: none;
}
[data-products] .product .entry-meta li + li::before,
.woocommerce ul.products li.product .entry-meta li + li::before {
    content: "، ";
}

/* Price — new bold/large, old strikethrough small/muted */
[data-products] .product .price,
.woocommerce ul.products li.product .price {
    padding: var(--m-space-2) var(--m-space-4) 0;
    font-size: var(--m-product-card-price-size);
    font-weight: var(--m-weight-bold);
    color: var(--m-text-strong);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: var(--m-space-2);
    flex-wrap: wrap;
    line-height: 1.4;
}
[data-products] .product .price .sale-price,
.woocommerce ul.products li.product .price .sale-price {
    display: flex;
    align-items: baseline;
    gap: var(--m-space-2);
    flex-direction: row-reverse;
}
[data-products] .product .price del,
.woocommerce ul.products li.product .price del {
    opacity: 1;
    font-weight: var(--m-weight-normal);
    font-size: var(--m-text-xs);
    color: var(--m-color-neutral-400);
    text-decoration: line-through;
    margin: 0;
}
[data-products] .product .price ins,
.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: var(--m-text-strong);
    background: transparent;
    font-weight: var(--m-weight-bold);
    font-size: var(--m-product-card-price-size);
}
[data-products] .product .price .woocommerce-Price-currencySymbol,
.woocommerce ul.products li.product .price .woocommerce-Price-currencySymbol {
    font-size: 0.7em;
    margin-inline-start: 4px;
    font-weight: var(--m-weight-medium);
    color: var(--m-color-neutral-500);
}

/* Sale badge — top-inline-start corner, compact, real percentage */
.onsale,
.modlino-sale-badge {
    background: var(--m-primary);
    color: var(--m-text-on-brand);
    font-weight: var(--m-weight-bold);
    font-size: var(--m-text-xs);
    padding: 4px 8px;
    border-radius: var(--m-radius-sm);
    top: var(--m-space-3);
    inset-inline-start: var(--m-space-3);
    inset-inline-end: auto;
    position: absolute;
    z-index: 5;
    line-height: 1.2;
    box-shadow: none;
    letter-spacing: 0;
    min-width: 0;
    text-align: center;
    direction: ltr;  /* keep "-۲۰٪" reading order */
    unicode-bidi: isolate;
    animation: none !important;
}
.onsale::before,
.modlino-sale-badge::before {
    content: none;  /* PHP filter now writes the actual percentage */
}

/* Out-of-stock badge — primary colour to match brand, hides sale badge if both */
.out-of-stock-badge,
.ct-woo-badge-out-of-stock {
    background: var(--m-primary);
    color: var(--m-text-on-brand);
    font-weight: var(--m-weight-bold);
    font-size: var(--m-text-xs);
    padding: 4px 10px;
    border-radius: var(--m-radius-sm);
    top: var(--m-space-3);
    inset-inline-start: var(--m-space-3);
    inset-inline-end: auto;
    position: absolute;
    z-index: 6;
    line-height: 1.2;
    box-shadow: none;
    opacity: 0.85;  /* slight visual distinction from sale badge */
}
.out-of-stock-badge::before,
.ct-woo-badge-out-of-stock::before,
.out-of-stock-badge::after,
.ct-woo-badge-out-of-stock::after {
    content: none !important;
    display: none !important;
}
li.product.outofstock .onsale,
li.product.outofstock .modlino-sale-badge {
    display: none;
}

/* Hide "تومان" on the strikethrough OLD price — show it only on the new price */
[data-products] .product .price del .woocommerce-Price-currencySymbol,
.woocommerce ul.products li.product .price del .woocommerce-Price-currencySymbol {
    display: none;
}
/* Remove the &nbsp; that WC leaves between number and symbol on the old price */
[data-products] .product .price del bdi,
.woocommerce ul.products li.product .price del bdi {
    white-space: nowrap;
}

/* Hide all CTA / action buttons on the loop card */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart,
[data-products] li.product .ct-woo-card-actions,
.woocommerce ul.products li.product .ct-woo-card-actions {
    display: none !important;
}

/* ═══ SINGLE PRODUCT ══════════════════════════════════════════ */

/* Reset wrapper */
body.single-product #product-2037,
body.single-product div[id^="product-"].product {
    display: block;
    background: transparent;
    padding: 0;
    /* center within --m-container-max; margin:0 left it RTL-stuck to the right */
    margin: 0 auto;
    max-width: var(--m-container-max);
    box-shadow: none;
    border: none;
}
body.single-product div[id^="product-"].product > * {
    display: block;
    width: 100%;
}
body.single-product div[id^="product-"].product > .product-entry-wrapper {
    display: grid;
}

body[data-prefix="product"] article { display: block; }
body[data-prefix="product"] article > * {
    grid-column: unset;
    width: 100%;
    max-width: var(--m-container-max);
    margin-inline: auto;
    float: none;
    clear: both;
}

/* Tabs/description and related products sit full-width otherwise (related is
   even outside <article>). Constrain them to the same content width, centered. */
body.single-product .woocommerce-tabs,
body.single-product .related.products,
body.single-product .up-sells.products {
    width: 100%;
    max-width: var(--m-container-max);
    margin-inline: auto;
    box-sizing: border-box;
}

/* Tighten vertical space around the breadcrumb: Blocksy's content container
   adds a large padding-top (--theme-content-vertical-spacing) above it, and the
   card adds margin-top below it. Trim both on the single-product page. */
body.single-product .ct-container-full[data-vertical-spacing] {
    padding-top: var(--m-space-4) !important;
}

/* Main wrapper: gallery right, summary left in RTL */
body.single-product .product-entry-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--m-space-10);
    background: var(--m-surface);
    border-radius: var(--m-radius-2xl);
    padding: var(--m-space-8);
    margin: var(--m-space-3) auto var(--m-space-6);
    max-width: var(--m-container-max);
    box-shadow: var(--m-shadow-md);
    border: 1px solid var(--m-border);
    align-items: start;
}

body.single-product .product-entry-wrapper > .woocommerce-product-gallery {
    grid-column: 1;  /* اول (راست در RTL) */
    grid-row: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    float: none;
    background: transparent;
    padding: 0;
}
body.single-product .product-entry-wrapper > .summary,
body.single-product .product-entry-wrapper > .summary.entry-summary {
    grid-column: 2;  /* دوم (چپ در RTL) */
    grid-row: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    float: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 999px) {
    body.single-product .product-entry-wrapper {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding: var(--m-space-5);
        margin: var(--m-space-4);
    }
    body.single-product .product-entry-wrapper > .woocommerce-product-gallery,
    body.single-product .product-entry-wrapper > .summary,
    body.single-product .product-entry-wrapper > .summary.entry-summary {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        grid-column: auto !important;
        grid-row: auto !important;
        float: none !important;
    }
    body.single-product .product-entry-wrapper > .woocommerce-product-gallery {
        margin-bottom: var(--m-space-6) !important;
    }
}

/* === Gallery === */
body.single-product .ct-product-gallery-container .flexy-container {
    background: var(--m-bg-subtle);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-xl);
    padding: var(--m-space-5);
    margin-bottom: var(--m-space-3);
    min-height: 480px;
    width: 100%;
    position: relative;
    overflow: hidden;
}
body.single-product .ct-product-gallery-container .flexy-item img {
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
    margin-inline: auto;
    transition: opacity var(--m-duration-fast) var(--m-ease-standard);
}
body.single-product .ct-product-gallery-container .flexy-pills {
    background: transparent;
    border: none;
    padding: 0;
    margin: var(--m-space-4) 0 0;
    min-height: 0;
}
body.single-product .ct-product-gallery-container .flexy-pills ol {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--m-space-2);
    list-style: none;
    padding: 0;
    margin: 0;
}
body.single-product .ct-product-gallery-container .flexy-pills li {
    margin: 0;
    padding: var(--m-space-1);
    width: 100%;
    aspect-ratio: 1;
    background: var(--m-bg-subtle);
    border-radius: var(--m-radius-md);
    border: 2px solid var(--m-border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--m-duration-fast) var(--m-ease-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    box-sizing: border-box;
}
body.single-product .ct-product-gallery-container .flexy-pills li:hover,
body.single-product .ct-product-gallery-container .flexy-pills li.active {
    border-color: var(--m-primary);
}
body.single-product .ct-product-gallery-container .flexy-pills li img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* === Summary === */
body.single-product .summary { display: flex; flex-direction: column; }

.modlino-brand-link {
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-1);
    padding: 6px 12px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    border-radius: var(--m-radius-full);
    font-size: var(--m-text-xs);
    font-weight: var(--m-weight-bold);
    text-decoration: none;
    margin-bottom: var(--m-space-3);
    width: fit-content;
    transition: all var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-brand-link:hover {
    background: var(--m-primary);
    color: var(--m-text-on-brand);
}

body.single-product .product_title,
body.single-product .entry-title {
    font-size: var(--m-text-3xl);
    font-weight: var(--m-weight-extrabold);
    color: var(--m-text-strong);
    line-height: var(--m-leading-snug);
    margin: 0 0 var(--m-space-3);
    padding: 0;
}

body.single-product .price {
    font-size: var(--m-text-4xl);
    font-weight: var(--m-weight-extrabold);
    color: var(--m-primary);
    margin: var(--m-space-3) 0;
    display: flex;
    align-items: baseline;
    gap: var(--m-space-3);
    flex-wrap: wrap;
}
body.single-product .price del {
    color: var(--m-text-muted);
    font-weight: var(--m-weight-normal);
    font-size: var(--m-text-lg);
    opacity: 0.55;
}
body.single-product .price ins {
    text-decoration: none;
    background: transparent;
}

.modlino-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-1);
    background: linear-gradient(135deg, var(--m-color-brand-600), var(--m-color-brand-700));
    color: var(--m-text-on-brand);
    padding: 4px 12px;
    border-radius: var(--m-radius-md);
    font-weight: var(--m-weight-bold);
    font-size: var(--m-text-xs);
    margin-top: var(--m-space-2);
    box-shadow: var(--m-shadow-brand);
    width: fit-content;
    align-self: flex-start;
}

.modlino-stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-2);
    background: var(--m-color-success-bg);
    color: var(--m-color-success-fg);
    padding: 8px 14px;
    border-radius: var(--m-radius-md);
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-semibold);
    margin: var(--m-space-3) 0;
    width: fit-content;
    border: 1px solid var(--m-color-success-border);
}
.modlino-stock-indicator svg { stroke: var(--m-color-success-solid); width: 16px; height: 16px; }
.modlino-stock-indicator.low {
    background: var(--m-color-warning-bg);
    color: var(--m-color-warning-fg);
    border-color: var(--m-color-warning-border);
}
.modlino-stock-indicator.low svg { stroke: var(--m-color-warning-solid); }

body.single-product .woocommerce-product-details__short-description {
    background: var(--m-bg-subtle);
    padding: var(--m-space-4) var(--m-space-5);
    border-radius: var(--m-radius-lg);
    border-inline-end: 3px solid var(--m-primary);
    color: var(--m-text);
    line-height: var(--m-leading-relaxed);
    margin: var(--m-space-4) 0;
    font-size: var(--m-text-sm);
}
body.single-product .woocommerce-product-details__short-description p { margin: 0; }

/* === Variations === */
body.single-product table.variations {
    display: block;
    margin: var(--m-space-5) 0;
    background: var(--m-bg-subtle);
    padding: var(--m-space-3) var(--m-space-4);
    border-radius: var(--m-radius-lg);
    border: 1px solid var(--m-border);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
body.single-product table.variations tbody {
    display: block !important;
    height: auto !important;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
}
body.single-product table.variations tr {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;   /* RTL start = right */
    gap: var(--m-space-2) !important;
    height: auto !important;
    margin: 0 0 var(--m-space-3);
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
}
body.single-product table.variations tr:last-child { margin-bottom: 0; }
body.single-product table.variations th,
body.single-product table.variations td {
    display: block !important;
    height: auto !important;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: right;
}
body.single-product table.variations th {
    font-weight: var(--m-weight-semibold);
    color: var(--m-text-strong);
    font-size: var(--m-text-sm);
    line-height: 1.3 !important;
    min-height: 0 !important;
}
body.single-product table.variations th label {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    height: auto !important;
    min-height: 0 !important;
    font-size: inherit !important;
}
/* reset link shouldn't reserve a full row when hidden */
body.single-product table.variations .reset_variations {
    display: inline-block;
    margin-top: var(--m-space-1);
    font-size: var(--m-text-xs);
}
body.single-product table.variations select {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-md);
    padding: 12px 14px;
    font-family: var(--m-font-sans);
    width: 100%;
    font-size: var(--m-text-sm);
    color: var(--m-text);
    cursor: pointer;
    height: auto;
}

/* Swatches */
.modlino-swatches-wrap {
    margin-top: var(--m-space-1);
}
.modlino-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--m-space-3);
    padding: var(--m-space-1) 0;
}
.modlino-swatches-wrap select[name^="attribute_pa_color"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    overflow: hidden;
}

/* === Add to cart === */
body.single-product form.cart {
    display: flex;
    align-items: center;
    gap: var(--m-space-3);
    margin: var(--m-space-5) 0;
    flex-wrap: wrap;
    background: transparent;
    padding: 0;
}
/* Quantity stepper. Blocksy's type-2 renders the +/- as position:absolute
   spans sitting inside the input's reserved side-padding. The custom input
   padding below removed that reservation, so the buttons overlapped the
   number. Fix: un-absolute the spans and lay the widget out as a flex row
   [−] [input] [+]. */
body.single-product .quantity,
body.single-product .quantity[data-type] {
    background: var(--m-bg-subtle);
    border-radius: var(--m-radius-md);
    border: 1px solid var(--m-border);
    overflow: hidden;
    display: inline-flex;
    align-items: stretch;
    width: auto;
    height: 48px;
    position: relative;
}
body.single-product .quantity .ct-increase,
body.single-product .quantity .ct-decrease {
    position: static;
    inset: auto;
    flex: 0 0 40px;
    width: 40px;
    height: auto;
    min-height: 0;
    max-width: none;
    border-radius: 0;
    background: transparent;
    color: var(--m-text-strong);
    cursor: pointer;
    transition: background var(--m-duration-fast) var(--m-ease-standard);
}
body.single-product .quantity .ct-increase { order: 0; }
body.single-product .quantity .ct-decrease { order: 2; }
body.single-product .quantity .ct-increase:hover,
body.single-product .quantity .ct-decrease:hover {
    background: var(--m-border);
}
body.single-product .quantity .ct-increase::before,
body.single-product .quantity .ct-decrease::before {
    color: var(--m-text-strong);
    font-size: 15px;
    margin: 0;
}
body.single-product .quantity input[type="number"],
body.single-product input.qty {
    order: 1;
    background: transparent;
    border: none;
    border-inline: 1px solid var(--m-border);
    border-radius: 0;
    padding: 0 6px !important;
    margin: 0;
    font-family: var(--m-font-sans);
    font-weight: var(--m-weight-bold);
    font-size: var(--m-text-md);
    color: var(--m-text-strong);
    width: 48px;
    text-align: center;
    height: auto;
    box-shadow: none !important;
}
body.single-product .single_add_to_cart_button {
    background: var(--m-primary);
    color: var(--m-text-on-brand);
    padding: 14px 36px;
    font-size: var(--m-text-md);
    font-weight: var(--m-weight-bold);
    border-radius: var(--m-radius-md);
    flex: 1;
    min-width: 220px;
    border: none;
    box-shadow: var(--m-shadow-brand);
    transition: all var(--m-duration-fast) var(--m-ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--m-space-2);
}
body.single-product .single_add_to_cart_button:hover {
    background: var(--m-primary-hover);
    box-shadow: var(--m-shadow-brand-strong);
    transform: translateY(-1px);
}

/* === Actions row (wishlist + share) === */
.modlino-actions-row {
    display: flex;
    gap: var(--m-space-2);
    margin: var(--m-space-4) 0;
}
.modlino-wishlist-btn, .modlino-share-btn {
    background: var(--m-bg);
    border: 1px solid var(--m-border);
    color: var(--m-text);
    padding: 10px 16px;
    border-radius: var(--m-radius-md);
    font-family: var(--m-font-sans);
    font-weight: var(--m-weight-semibold);
    font-size: var(--m-text-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-1);
    transition: all var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-wishlist-btn:hover { border-color: var(--m-primary); color: var(--m-primary); }
.modlino-wishlist-btn.active {
    background: var(--m-primary-soft);
    border-color: var(--m-primary);
    color: var(--m-primary);
}
.modlino-wishlist-btn.active svg { fill: var(--m-primary); }
.modlino-share-btn:hover { border-color: var(--m-color-neutral-800); }

.modlino-share-wrap { position: relative; }
.modlino-share-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    inset-inline-end: 0;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    box-shadow: var(--m-shadow-xl);
    padding: 6px;
    min-width: 160px;
    display: none;
    z-index: var(--m-z-dropdown);
    flex-direction: column;
}
.modlino-share-wrap.open .modlino-share-menu { display: flex; }
.modlino-share-menu a,
.modlino-share-menu button {
    display: flex;
    align-items: center;
    gap: var(--m-space-2);
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--m-text);
    text-decoration: none;
    font-family: inherit;
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-medium);
    border-radius: var(--m-radius-md);
    cursor: pointer;
    text-align: right;
}
.modlino-share-menu a:hover,
.modlino-share-menu button:hover { background: var(--m-bg-subtle); }

/* === Trust + Delivery === */
.modlino-trust-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--m-space-2);
    margin: var(--m-space-4) 0;
    padding: var(--m-space-3);
    background: var(--m-bg-subtle);
    border-radius: var(--m-radius-lg);
    border: 1px solid var(--m-border);
}
.modlino-trust-item {
    display: flex;
    align-items: center;
    gap: var(--m-space-2);
    padding: 4px;
}
.modlino-trust-item svg { color: var(--m-primary); stroke: var(--m-primary); }
.modlino-trust-item .t-title { font-size: var(--m-text-xs); font-weight: var(--m-weight-bold); color: var(--m-text-strong); line-height: 1.3; }
.modlino-trust-item .t-sub { font-size: var(--m-text-2xs); color: var(--m-text-muted); margin-top: 2px; }

.modlino-delivery-box {
    display: flex;
    align-items: center;
    gap: var(--m-space-3);
    background: var(--m-primary-soft);
    border-inline-end: 3px solid var(--m-primary);
    padding: var(--m-space-3) var(--m-space-4);
    border-radius: var(--m-radius-md);
    margin: var(--m-space-3) 0;
}
.modlino-delivery-box .d-title { font-size: var(--m-text-sm); font-weight: var(--m-weight-bold); color: var(--m-text-strong); }
.modlino-delivery-box .d-sub { font-size: var(--m-text-xs); color: var(--m-text-muted); margin-top: 2px; }

/* === Countdown === */
.modlino-countdown {
    background: linear-gradient(135deg, var(--m-primary-soft), var(--m-color-danger-bg));
    border: 1px solid var(--m-color-brand-200);
    border-radius: var(--m-radius-lg);
    padding: var(--m-space-3) var(--m-space-4);
    margin: var(--m-space-3) 0;
    display: flex;
    flex-direction: column;
    gap: var(--m-space-2);
}
.modlino-countdown-label {
    display: flex;
    align-items: center;
    gap: var(--m-space-2);
    color: var(--m-color-brand-800);
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-bold);
}
.modlino-countdown-label svg { stroke: var(--m-primary); width: 18px; height: 18px; fill: none; stroke-width: 2; }
.modlino-countdown-boxes { display: flex; gap: var(--m-space-1); align-items: stretch; }
.cd-box {
    background: var(--m-bg);
    border-radius: var(--m-radius-md);
    padding: 8px 10px;
    text-align: center;
    flex: 1;
    box-shadow: var(--m-shadow-xs);
    display: flex;
    flex-direction: column;
}
.cd-num { font-size: var(--m-text-xl); font-weight: var(--m-weight-extrabold); color: var(--m-primary); line-height: 1; }
.cd-label { font-size: var(--m-text-2xs); color: var(--m-text-muted); margin-top: 4px; }
.cd-sep { align-self: center; color: var(--m-primary); font-weight: var(--m-weight-extrabold); font-size: var(--m-text-xl); }

/* === Tabs === */
body.single-product .woocommerce-tabs {
    background: var(--m-surface);
    border-radius: var(--m-radius-2xl);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--m-border);
    margin: var(--m-space-8) auto;
    max-width: var(--m-container-max);
}
body.single-product .woocommerce-tabs ul.tabs {
    background: var(--m-bg-subtle);
    border-bottom: 1px solid var(--m-border);
    padding: 0 var(--m-space-2);
    margin: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
body.single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
body.single-product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}
body.single-product .woocommerce-tabs ul.tabs li a {
    padding: var(--m-space-4) var(--m-space-6);
    font-weight: var(--m-weight-semibold);
    color: var(--m-text-muted);
    font-size: var(--m-text-base);
    text-transform: none;
    letter-spacing: 0;
    border: none;
    border-bottom: 3px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-2);
    text-decoration: none;
    transition: all var(--m-duration-fast) var(--m-ease-standard);
    background: transparent;
}
body.single-product .woocommerce-tabs ul.tabs li:hover a { color: var(--m-text-strong); }
body.single-product .woocommerce-tabs ul.tabs li.active a {
    color: var(--m-primary);
    border-bottom-color: var(--m-primary);
    background: var(--m-surface);
    font-weight: var(--m-weight-bold);
}
body.single-product .woocommerce-tabs .panel {
    padding: var(--m-space-8);
    color: var(--m-text);
    line-height: var(--m-leading-loose);
    font-size: var(--m-text-base);
}
body.single-product .woocommerce-tabs .panel h2:first-child { display: none; }
body.single-product .woocommerce-tabs .panel h2 {
    font-size: var(--m-text-2xl);
    font-weight: var(--m-weight-extrabold);
    color: var(--m-text-strong);
    margin: var(--m-space-6) 0 var(--m-space-3);
    padding-bottom: var(--m-space-2);
    border-bottom: 2px solid var(--m-primary-soft);
}
body.single-product .woocommerce-tabs .panel h3 {
    font-size: var(--m-text-lg);
    font-weight: var(--m-weight-bold);
    margin: var(--m-space-4) 0 var(--m-space-2);
}
body.single-product .woocommerce-tabs .panel p { margin: 0 0 var(--m-space-3); }
body.single-product .woocommerce-tabs .panel ul,
body.single-product .woocommerce-tabs .panel ol {
    background: var(--m-bg-subtle);
    border-radius: var(--m-radius-lg);
    padding: var(--m-space-4) var(--m-space-8);
    margin: var(--m-space-3) 0 var(--m-space-4);
}

/* === Related products slider === */
body.single-product .related, body.single-product section.related {
    padding: var(--m-space-8) var(--m-container-gutter);
    margin: var(--m-space-8) auto;
    max-width: var(--m-container-max);
}
body.single-product .related h2 {
    font-size: var(--m-text-2xl);
    font-weight: var(--m-weight-extrabold);
    margin: 0 0 var(--m-space-5);
    display: flex;
    align-items: center;
    gap: var(--m-space-2);
}
body.single-product .related h2::before {
    content: "";
    width: 4px;
    height: 22px;
    background: var(--m-primary);
    border-radius: var(--m-radius-xs);
}
body.single-product .related ul.products,
body.single-product .related [data-products] {
    display: flex;
    grid-template-columns: none;
    gap: var(--m-space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: var(--m-container-gutter);
    padding: var(--m-space-2) 0 var(--m-space-3);
    scrollbar-width: none;
}
body.single-product .related ul.products::-webkit-scrollbar,
body.single-product .related [data-products]::-webkit-scrollbar { display: none; }
body.single-product .related ul.products li.product,
body.single-product .related [data-products] li.product {
    flex: 0 0 calc(25% - var(--m-space-3));
    scroll-snap-align: start;
    min-width: 200px;
}
@media (max-width: 999px) {
    body.single-product .related ul.products li.product,
    body.single-product .related [data-products] li.product { flex: 0 0 calc(50% - var(--m-space-2)); }
}
@media (max-width: 600px) {
    body.single-product .related ul.products li.product,
    body.single-product .related [data-products] li.product { flex: 0 0 70%; }
}

.modlino-slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--m-space-3);
    gap: var(--m-space-3);
}
.modlino-slider-dots { display: flex; gap: var(--m-space-1); flex: 1; justify-content: center; }
.modlino-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--m-radius-full);
    background: var(--m-color-neutral-300);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-slider-dot.active {
    background: var(--m-primary);
    width: 24px;
    border-radius: var(--m-radius-xs);
}
.modlino-slider-arrows { display: flex; gap: var(--m-space-1); }
.modlino-slider-arrow {
    width: 36px;
    height: 36px;
    border-radius: var(--m-radius-md);
    background: var(--m-bg);
    border: 1px solid var(--m-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--m-text);
    transition: all var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-slider-arrow:hover:not(:disabled) {
    background: var(--m-primary);
    border-color: var(--m-primary);
    color: var(--m-text-on-brand);
}
.modlino-slider-arrow:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══ STICKY ADD-TO-CART ═════════════════════════════════════ */

.modlino-sticky-cart {
    position: fixed;
    bottom: 0;
    transform: translateY(110%);
    left: 0; right: 0;
    background: var(--m-bg);
    border-top: 1px solid var(--m-border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    z-index: var(--m-z-sticky);
    transition: transform var(--m-duration-slow) var(--m-ease-decelerate);
}
.modlino-sticky-cart.show { transform: translateY(0); }
.modlino-sticky-inner {
    max-width: var(--m-container-max);
    margin: 0 auto;
    padding: var(--m-space-3) var(--m-container-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--m-space-4);
}
.modlino-sticky-info { display: flex; align-items: center; gap: var(--m-space-3); flex: 1; min-width: 0; }
.modlino-sticky-img {
    width: 52px; height: 52px;
    border-radius: var(--m-radius-md);
    object-fit: cover;
    background: var(--m-bg-subtle);
    flex-shrink: 0;
}
.modlino-sticky-meta { min-width: 0; }
.modlino-sticky-title {
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-semibold);
    color: var(--m-text-strong);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 380px;
}
.modlino-sticky-price {
    font-size: var(--m-text-base);
    font-weight: var(--m-weight-extrabold);
    color: var(--m-primary);
    display: flex;
    gap: var(--m-space-2);
    align-items: baseline;
}
.modlino-sticky-price del { opacity: 0.5; font-size: var(--m-text-xs); font-weight: var(--m-weight-normal); color: var(--m-text-muted); }
.modlino-sticky-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--m-space-2);
    background: var(--m-primary);
    color: var(--m-text-on-brand);
    border: none;
    padding: 12px 22px;
    border-radius: var(--m-radius-md);
    font-family: var(--m-font-sans);
    font-weight: var(--m-weight-bold);
    font-size: var(--m-text-base);
    cursor: pointer;
    transition: all var(--m-duration-fast) var(--m-ease-standard);
    flex-shrink: 0;
    box-shadow: var(--m-shadow-brand);
}
.modlino-sticky-btn:hover { background: var(--m-primary-hover); transform: translateY(-1px); }
@media (max-width: 600px) {
    .modlino-sticky-title { font-size: var(--m-text-xs); max-width: 160px; }
    .modlino-sticky-btn span { display: none; }
}

/* ═══ ARCHIVE / CATEGORY PAGE ════════════════════════════════ */

.archive .hero-section,
.ct-archive-template[data-prefix*="woo"] .hero-section {
    background: linear-gradient(135deg, var(--m-primary), var(--m-primary-hover));
    padding: var(--m-space-12) var(--m-container-gutter);
    margin: 0;
    position: relative;
    overflow: hidden;
}
.archive .hero-section .page-title,
.archive .hero-section .entry-title,
.ct-archive-template[data-prefix*="woo"] .hero-section .page-title {
    color: var(--m-text-on-brand);
    font-weight: var(--m-weight-extrabold);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: var(--m-space-2);
}
.archive .hero-section .ct-breadcrumbs,
.archive .hero-section .ct-breadcrumbs a {
    color: rgba(255,255,255,0.85);
}

.woo-listing-top {
    background: transparent;
    padding: var(--m-space-4) 0;
    border: none;
    margin-bottom: var(--m-space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--m-space-4);
}
.woocommerce .woocommerce-result-count {
    color: var(--m-text-muted);
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-medium);
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}
.woocommerce-ordering select {
    background: var(--m-bg);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-md);
    padding: 10px 16px;
    font-family: var(--m-font-sans);
    color: var(--m-text);
    font-size: var(--m-text-sm);
    font-weight: var(--m-weight-medium);
    cursor: pointer;
    min-width: 200px;
}

/* ═══ Brand strip (homepage) ════════════════════════════════ */

.modlino-brands {
    background: var(--m-bg-subtle);
    padding: var(--m-space-10) var(--m-container-gutter);
}
.modlino-brands__inner { max-width: var(--m-container-max); margin: 0 auto; }
.modlino-brands h2 {
    color: var(--m-text-strong);
    text-align: center;
    font-size: var(--m-text-3xl);
    font-weight: var(--m-weight-extrabold);
    margin: 0 0 var(--m-space-2);
}
.modlino-brands .sub {
    text-align: center;
    color: var(--m-text-muted);
    font-size: var(--m-text-sm);
    margin-bottom: var(--m-space-6);
}
.modlino-brands__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-3);
}
.modlino-brand-card {
    background: var(--m-bg);
    padding: var(--m-space-5) var(--m-space-3);
    border-radius: var(--m-radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all var(--m-duration-normal) var(--m-ease-standard);
    border: 1px solid var(--m-border);
}
.modlino-brand-card:hover {
    border-color: var(--m-primary);
    background: var(--m-primary-soft);
    transform: translateY(-3px);
    box-shadow: var(--m-shadow-md);
}
.modlino-brand-name {
    font-size: var(--m-text-lg);
    font-weight: var(--m-weight-extrabold);
    letter-spacing: 1px;
    color: var(--m-text-strong);
    margin-bottom: 4px;
}
.modlino-brand-card:hover .modlino-brand-name { color: var(--m-primary); }
.modlino-brand-count { font-size: var(--m-text-xs); color: var(--m-text-muted); }

@media (max-width: 999px) { .modlino-brands__grid { grid-template-columns: repeat(2, 1fr); } }


/* Card overflow clip (kept here — affects badge positioning) */
[data-products] li.product,
.woocommerce ul.products li.product {
    overflow: hidden;
}
