/*
 * Studio theme — layout refinements on top of storefront-market.css.
 * Everything is scoped to html[data-theme="studio"]; other themes are untouched.
 * Look: white page, black type and buttons, centred section titles,
 * borderless product cards on a light grey photo well, red sale/stock flags.
 */

html[data-theme="studio"] {
    --sf-mk-gap: 20px;
    --sf-mk-radius: 4px;
}

/* ---------- Announcement bar: black, quiet ---------- */

html[data-theme="studio"] .sf-ticker {
    background: #111111;
    color: #ffffff;
    border-bottom: 0;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

/* ---------- Masthead ---------- */

html[data-theme="studio"] .sf-masthead {
    border-bottom: 0;
}

html[data-theme="studio"] .sf-masthead-row {
    min-height: 80px;
}

html[data-theme="studio"] .sf-masthead .sf-search {
    max-width: 560px;
    margin-inline: auto;
}

html[data-theme="studio"] .sf-masthead .sf-search-input {
    border: 1px solid var(--theme-color-border);
    border-inline-end: 0;
    background: var(--theme-color-surface);
}

html[data-theme="studio"] .sf-masthead .sf-search-input:focus {
    background: #ffffff;
    border-color: #111111;
}

html[data-theme="studio"] .sf-search-btn {
    background: #111111;
    width: 48px;
}

html[data-theme="studio"] .sf-action:hover {
    background: transparent;
    color: #111111;
}

html[data-theme="studio"] .sf-action:hover .sf-action-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Category bar: centred text links ---------- */

html[data-theme="studio"] .sf-catbar {
    border-top: 1px solid var(--theme-color-border);
}

@media (min-width: 992px) {
    html[data-theme="studio"] .sf-catbar-list {
        justify-content: center;
        gap: 0.5rem;
    }

    html[data-theme="studio"] .sf-catbar-secondary.is-push {
        margin-inline-start: 0;
    }
}

html[data-theme="studio"] .sf-catbar-link {
    padding-block: 0.85rem;
    font-size: 0.9rem;
}

html[data-theme="studio"] .sf-catbar-link:hover,
html[data-theme="studio"] .sf-catbar-link.active {
    color: #111111;
    border-bottom-color: #111111;
}

/* ---------- Page ---------- */

html[data-theme="studio"] .sf-main:has(.sf-home) {
    background: #ffffff;
}

html[data-theme="studio"] .sf-home {
    padding-top: 0;
}

html[data-theme="studio"] .sf-block {
    margin-top: 3.25rem;
}

/* Section titles centred, "view all" as a small link under the title */
html[data-theme="studio"] .sf-row-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

html[data-theme="studio"] .sf-row-title {
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
    font-weight: var(--theme-weight-semibold);
}

html[data-theme="studio"] .sf-row-link {
    margin-inline-start: 0;
    color: var(--theme-color-text-muted);
    font-weight: var(--theme-weight-medium);
    text-decoration: underline;
    text-underline-offset: 4px;
}

html[data-theme="studio"] .sf-row-link:hover {
    color: #111111;
}

html[data-theme="studio"] .sf-row-link .sf-arrow {
    display: none;
}

html[data-theme="studio"] h2.sf-row-title.mb-3 {
    text-align: center;
    margin-bottom: 1.5rem !important;
}

/* ---------- Hero: full-width banner with side banners ---------- */

html[data-theme="studio"] .sf-hero-grid {
    max-width: none;
    padding-inline: 0;
    gap: 0;
}

html[data-theme="studio"] .sf-hero-main {
    border-radius: 0;
}

html[data-theme="studio"] .sf-hero-main .swiper-hero,
html[data-theme="studio"] .sf-hero-main .hero-slide {
    height: clamp(280px, 38vw, 520px);
}

html[data-theme="studio"] .sf-hero-main .hero-overlay {
    align-items: center;
    background: linear-gradient(to left, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.45));
}

[dir="rtl"][data-theme="studio"] .sf-hero-main .hero-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.45));
}

html[data-theme="studio"] .sf-hero-main .hero-content {
    padding-inline: clamp(1.5rem, 6vw, 5rem);
}

html[data-theme="studio"] .sf-hero-tag {
    border-radius: 0;
    background: #ffffff;
}

html[data-theme="studio"] .sf-btn-light {
    border-radius: 0;
    padding: 0.7rem 1.6rem;
}

html[data-theme="studio"] .sf-hero-main .swiper-pagination-bullet-active {
    background: #ffffff;
}

html[data-theme="studio"] .sf-hero-side {
    gap: 0;
}

html[data-theme="studio"] .sf-promo-tile,
html[data-theme="studio"] .sf-promo-tile.is-alt {
    border-radius: 0;
    padding: 1.5rem 2rem;
    box-shadow: none;
}

html[data-theme="studio"] .sf-promo-tile {
    background: #f3f3f3;
    color: #111111;
}

html[data-theme="studio"] .sf-promo-tile:hover {
    color: #111111;
}

html[data-theme="studio"] .sf-promo-tile.is-alt,
html[data-theme="studio"] .sf-promo-tile.is-alt:hover {
    background: #111111;
    color: #ffffff;
}

html[data-theme="studio"] .sf-promo-tile .sf-promo-tag {
    border-radius: 0;
    background: var(--theme-color-danger);
    color: #ffffff;
}

html[data-theme="studio"] .sf-promo-cta {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Category tiles: square images, label underneath ---------- */

html[data-theme="studio"] .sf-chips {
    gap: var(--sf-mk-gap);
    justify-content: safe center;
}

html[data-theme="studio"] .sf-chip {
    width: 150px;
}

html[data-theme="studio"] .sf-chip-media {
    width: 150px;
    height: 150px;
    border-radius: 0;
    border: 0;
    background: var(--theme-color-surface);
}

html[data-theme="studio"] .sf-chip-media img {
    transition: transform 300ms ease;
}

html[data-theme="studio"] .sf-chip:hover .sf-chip-media img {
    transform: scale(1.04);
}

html[data-theme="studio"] .sf-chip-label {
    font-weight: var(--theme-weight-medium);
}

@media (max-width: 767.98px) {
    html[data-theme="studio"] .sf-chip,
    html[data-theme="studio"] .sf-chip-media {
        width: 112px;
    }

    html[data-theme="studio"] .sf-chip-media {
        height: 112px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="studio"] .sf-chip-media img {
        transition: none;
    }
}

/* ---------- Product card: borderless, grey photo well ---------- */

html[data-theme="studio"] .sf-product-card,
html[data-theme="studio"] .sf-product-card:hover {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

html[data-theme="studio"] .sf-product-card .sf-product-media {
    background: var(--theme-color-surface);
    border-bottom: 0;
}

html[data-theme="studio"] .sf-product-card .sf-product-media img {
    padding: 10%;
    mix-blend-mode: multiply;
}

html[data-theme="studio"] .sf-product-card .sf-product-body {
    align-items: center;
    text-align: center;
    padding: 0.85rem 0.25rem 0;
}

html[data-theme="studio"] .sf-product-card .sf-product-title {
    font-size: 0.9rem;
    min-height: 2.8em;
}

html[data-theme="studio"] .sf-product-card .sf-product-title a:hover {
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-theme="studio"] .sf-product-card .sf-price {
    justify-content: center;
}

html[data-theme="studio"] .sf-price-value {
    font-size: 1rem;
    font-weight: var(--theme-weight-semibold);
}

html[data-theme="studio"] .sf-product-perks {
    display: none;
}

html[data-theme="studio"] .sf-product-card .sf-product-actions {
    width: 100%;
}

html[data-theme="studio"] .sf-product-card .sf-product-actions .btn-primary {
    background: transparent;
    border: 1px solid #111111;
    border-radius: 0;
    color: #111111;
}

html[data-theme="studio"] .sf-product-card .sf-product-actions .btn-primary:hover,
html[data-theme="studio"] .sf-product-card .sf-product-actions .btn-primary:focus-visible {
    background: #111111;
    color: #ffffff;
}

html[data-theme="studio"] .sf-flag {
    border-radius: 0;
    font-weight: var(--theme-weight-medium);
}

html[data-theme="studio"] .sf-flag.is-rank {
    background: #111111;
    color: #ffffff;
}

html[data-theme="studio"] .sf-flag.is-warning {
    background: var(--theme-color-danger);
}

/* ---------- Budget, reasons, brands, newsletter ---------- */

html[data-theme="studio"] .sf-budget-card {
    border-radius: 0;
    border-color: var(--theme-color-border);
    align-items: center;
    text-align: center;
}

html[data-theme="studio"] .sf-budget-card:hover {
    border-color: #111111;
}

html[data-theme="studio"] .sf-reasons {
    gap: 0;
    border-top: 1px solid var(--theme-color-border);
    border-bottom: 1px solid var(--theme-color-border);
}

html[data-theme="studio"] .sf-reason {
    flex-direction: column;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 1.75rem 1rem;
}

html[data-theme="studio"] .sf-reason > .bi {
    background: transparent;
    color: #111111;
    font-size: 1.9rem;
}

html[data-theme="studio"] .sf-brands .sf-brand-logo {
    border-radius: 0;
    filter: grayscale(1);
    opacity: 0.75;
}

html[data-theme="studio"] .sf-brands .sf-brand-logo:hover {
    filter: none;
    opacity: 1;
}

html[data-theme="studio"] .sf-faq .accordion-item {
    border-radius: 0;
    border-inline: 0;
    border-top: 0;
}

html[data-theme="studio"] .sf-newsletter {
    flex-direction: column;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: var(--theme-color-surface);
    padding: 2.5rem 1.5rem;
}

html[data-theme="studio"] .sf-newsletter-form {
    width: 100%;
    flex: none;
}

html[data-theme="studio"] .sf-newsletter-form .form-control,
html[data-theme="studio"] .sf-newsletter-form .btn {
    border-radius: 0;
}

/* ---------- Buttons site-wide ---------- */

html[data-theme="studio"] .btn {
    border-radius: 0;
}

/* ---------- Product listing pages use the same grid gap ---------- */

html[data-theme="studio"] .sf-section-title {
    font-weight: var(--theme-weight-semibold);
}

/* Centred titles look lopsided above a half-filled grid row, so the rail
   centres its items on tablet and up (phones keep the swipe row). */
@media (min-width: 768px) {
    html[data-theme="studio"] .sf-rail {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    html[data-theme="studio"] .sf-rail-item {
        flex: 0 0 calc((100% - 4 * var(--sf-mk-gap)) / 5);
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    html[data-theme="studio"] .sf-rail-item {
        flex-basis: calc((100% - 3 * var(--sf-mk-gap)) / 4);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    html[data-theme="studio"] .sf-rail-item {
        flex-basis: calc((100% - 2 * var(--sf-mk-gap)) / 3);
    }
}

html[data-theme="studio"] .sf-promo-cta {
    white-space: nowrap;
}
