.theme-preview { display: none; }

[data-shop-preview] .theme-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: #171717;
    color: #fff;
    font-size: .78rem;
}

.theme-preview :is(select, button) {
    min-height: 36px;
    padding: 4px 8px;
    border: 1px solid #777;
    border-radius: 4px;
    background: #fff;
    color: #171717;
    font: inherit;
}

[data-shop-theme] .rd-nav__link { color: var(--color-text); }
[data-shop-theme] .rd-search input::placeholder { color: var(--color-text-muted); }
[data-shop-theme] .lucas-hero__button:hover,
[data-shop-theme] .lucas-sale a:hover {
    color: var(--color-primary-contrast);
    background: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Atelier */
[data-shop-theme="atelier"] {
    --color-bg: #fbf5ea;
    --color-surface: #f0e4d1;
    --color-surface-strong: #e6d6be;
    --color-text: #241c18;
    --color-text-muted: #634b3e;
    --color-border: #d7c5ae;
    --color-primary: #623a26;
    --color-sale: #892f25;
    --rd-footer: #37251d;
    --rd-accent: #c99569;
}

[data-shop-theme="atelier"] .lucas-hero .lucas-hero__slide {
    grid-template-columns: 1.18fr .82fr;
    background: #e8d5b9;
    border: 1px solid #c5aa88;
}

[data-shop-theme="atelier"] .lucas-hero__image { grid-column: 1; grid-row: 1; }
[data-shop-theme="atelier"] .lucas-hero__copy { grid-column: 2; grid-row: 1; padding-inline: clamp(22px, 4vw, 68px); }
[data-shop-theme="atelier"] :is(.lucas-hero__copy h1, .lucas-hero__copy h2, .lucas-section-heading h2, .lucas-catalog__intro h1) {
    font-family: var(--font-family-base);
    font-weight: 700;
    letter-spacing: -.035em;
}

[data-shop-theme="atelier"] .lucas-category-links a { border-inline: 0; font-size: 1rem; }
[data-shop-theme="atelier"] .lucas-hero__button { background: var(--color-primary); }
[data-shop-theme="atelier"] .lucas-sale { background: var(--color-surface); }

[data-shop-theme="atelier"] .lucas-shelf { border-top: 1px solid var(--color-border); padding-top: clamp(18px, 3vw, 35px); }
[data-shop-theme="atelier"] .lucas-shelf .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); }
[data-shop-theme="atelier"] .lucas-shelf .thumb { aspect-ratio: 5 / 4; }
[data-shop-theme="atelier"] .lucas-shelf .product-card { min-width: 0; }
[data-shop-theme="atelier"] .lucas-shelf--new .product-card:first-child:has(~ .product-card:nth-child(3)) { grid-column: 1 / -1; }
[data-shop-theme="atelier"] .lucas-shelf--best .product-card:nth-child(2) { margin-top: 20px; }
[data-shop-theme="atelier"] .lucas-shelf--hot {
    padding: clamp(16px, 3vw, 40px);
    background: #2c211b;
    color: #fbf5ea;
    border: 0;
}
[data-shop-theme="atelier"] .lucas-shelf--hot :is(a:hover, .price .old) { color: #e3c5a8; }
[data-shop-theme="atelier"] .lucas-shelf--hot .price.sale .now { color: #ffad9c; }
[data-shop-theme="atelier"] .lucas-shelf--hot .product-card:first-child:has(~ .product-card:nth-child(3)) { grid-column: 1 / -1; }

@media (min-width: 768px) {
    [data-shop-theme="atelier"] .lucas-shelf--new .product-grid:has(.product-card:nth-child(3)) {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
        align-items: start;
    }
    [data-shop-theme="atelier"] .lucas-shelf--new .product-card:first-child:has(~ .product-card:nth-child(3)) {
        grid-column: 1;
        grid-row: span 2;
    }
    [data-shop-theme="atelier"] .lucas-shelf--new .product-card:first-child:has(~ .product-card:nth-child(4)) { grid-row: span 3; }
    [data-shop-theme="atelier"] .lucas-shelf--new .product-card:first-child:has(~ .product-card:nth-child(3)) .thumb { aspect-ratio: 1; }
    [data-shop-theme="atelier"] .lucas-shelf--new .product-card:not(:first-child):is(:has(~ .product-card:nth-child(3)), :nth-child(n+3)) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
        align-items: center;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 10px;
    }
    [data-shop-theme="atelier"] .lucas-shelf--best .product-grid:has(.product-card:nth-child(4)) {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1fr);
    }
    [data-shop-theme="atelier"] .lucas-shelf--best .product-card:nth-child(2) .thumb { aspect-ratio: 4 / 5; }
    [data-shop-theme="atelier"] .lucas-shelf--best .product-card:nth-child(4) { margin-top: 38px; }
    [data-shop-theme="atelier"] .lucas-shelf--hot .product-grid:has(.product-card:nth-child(3)) {
        grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
        align-items: end;
    }
    [data-shop-theme="atelier"] .lucas-shelf--hot .product-card:first-child:has(~ .product-card:nth-child(3)) { grid-column: auto; }
    [data-shop-theme="atelier"] .lucas-shelf--hot .product-card:nth-child(2) .thumb { aspect-ratio: 4 / 5; }
    [data-shop-theme="atelier"] .lucas-shelf--hot .product-card:nth-child(4) { display: none; }
}

/* Street */
[data-shop-theme="street"] {
    color-scheme: dark;
    --color-bg: #161819;
    --color-surface: #202325;
    --color-surface-strong: #292d2f;
    --color-text: #f3f4f1;
    --color-text-muted: #b8bfc1;
    --color-border: #42484c;
    --color-primary: #d6f65e;
    --color-primary-contrast: #191d10;
    --color-sale: #ff9d90;
    --rd-footer: #111213;
    --rd-footer-text: #c0c5c7;
    --rd-accent: #d6f65e;
}

[data-shop-theme="street"] .rd-header .rd-search,
[data-shop-theme="street"] .rd-dropdown,
[data-shop-theme="street"] .rd-icon-btn:hover { background: var(--color-surface); border-color: var(--color-border); }
[data-shop-theme="street"] :is(.modal-content, .offcanvas) { background: var(--color-surface); color: var(--color-text); }
[data-shop-theme="street"] :is(.modal-content, .offcanvas) .btn-close { filter: invert(1); }
[data-shop-theme="street"] .lucas-hero .lucas-hero__slide { grid-template-columns: .95fr 1.05fr; background: #232729; }
[data-shop-theme="street"] .lucas-hero__image img { filter: saturate(.82) contrast(1.12); }
[data-shop-theme="street"] .lucas-hero__brand { color: var(--color-primary); }
[data-shop-theme="street"] .lucas-hero__copy :is(h1, h2) { font-weight: 800; text-transform: uppercase; }
[data-shop-theme="street"] :is(.lucas-hero__button, .lucas-sale a, .badge-tag) { color: var(--color-primary-contrast); }
[data-shop-theme="street"] .badge-tag.soldout { color: #fff; }
[data-shop-theme="street"] .lucas-category-links a { border-top: 2px solid var(--color-primary); background: var(--color-surface); }
[data-shop-theme="street"] .lucas-sale { background: var(--color-surface-strong); }
[data-shop-theme="street"] :is(.form-control, .form-select, .qty-box input) {
    background-color: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border);
}

/* Studio */
[data-shop-theme="studio"] {
    --color-bg: #f8fbff;
    --color-surface: #edf3fa;
    --color-surface-strong: #e1eaf4;
    --color-text: #172a40;
    --color-text-muted: #506278;
    --color-border: #cbd8e8;
    --color-primary: #234db5;
    --rd-footer: #162942;
    --rd-footer-text: #d5e0ef;
    --rd-accent: #8eacfb;
}

[data-shop-theme="studio"] .lucas-hero .lucas-hero__slide {
    grid-template-columns: .9fr 1.1fr;
    padding: clamp(12px, 2vw, 25px);
    background: #e9f0fa;
    border-radius: 22px;
}

[data-shop-theme="studio"] .lucas-hero__copy { padding-inline: clamp(12px, 4vw, 70px); }
[data-shop-theme="studio"] .lucas-hero__brand { color: var(--color-primary); }
[data-shop-theme="studio"] .lucas-hero__image { border-radius: 14px; overflow: hidden; }
[data-shop-theme="studio"] :is(.lucas-hero__button, .lucas-sale a, .lucas-category-links a, .chip) { border-radius: 999px; }
[data-shop-theme="studio"] :is(.product-card .thumb, .lucas-catalog__intro, .lucas-sale) { border-radius: 14px; }
[data-shop-theme="studio"] .lucas-sale { background: var(--color-surface); }

[data-shop-theme] .lucas-catalog__results { min-width: 0; }
[data-shop-theme] .lucas-catalog .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-shop-theme] .product-page .lucas-product-media { min-width: 0; }
[data-shop-theme] .product-page .gallery .main-image { min-width: 0; }
[data-shop-theme] .product-page .gallery .thumbs img { aspect-ratio: 1; }

[data-shop-theme="atelier"] .lucas-catalog__intro { background: transparent; border-block: 1px solid var(--color-border); padding-inline: 0; }
[data-shop-theme="atelier"] .lucas-catalog .filters { background: transparent; border: 1px solid var(--color-border); }
[data-shop-theme="atelier"] .lucas-catalog .product-card .thumb { aspect-ratio: 5 / 4; }
[data-shop-theme="atelier"] .product-card .name,
[data-shop-theme="atelier"] .product-page .lucas-purchase .product-title {
    font-family: var(--font-family-base);
    font-weight: 700;
}
[data-shop-theme="atelier"] .product-card .name { font-size: .95rem; line-height: 1.5; }
[data-shop-theme="atelier"] .product-page .gallery { flex-direction: column-reverse; }
[data-shop-theme="atelier"] .product-page .gallery .main-image img { aspect-ratio: 5 / 4; }
[data-shop-theme="atelier"] .product-page .gallery .thumbs { flex-direction: row; width: 100%; overflow-x: auto; }
[data-shop-theme="atelier"] .product-page .gallery .thumbs button { width: 72px; }
[data-shop-theme="atelier"] .product-page .product-description { max-width: 760px; }

[data-shop-theme="street"] .lucas-catalog__intro { border-left: 3px solid var(--color-primary); }
[data-shop-theme="street"] .lucas-catalog__intro h1 { text-transform: uppercase; }
[data-shop-theme="street"] .lucas-catalog .product-card .thumb { aspect-ratio: 4 / 5; }
[data-shop-theme="street"] .lucas-catalog .product-card .thumb img[src$="placeholder-product.svg"],
[data-shop-theme="street"] .product-page .gallery img[src$="placeholder-product.svg"] { filter: invert(.88); }
[data-shop-theme="street"] .lucas-catalog .product-card .info { border-bottom: 1px solid var(--color-border); padding-bottom: 12px; }
[data-shop-theme="street"] .product-page .lucas-purchase .product-title { text-transform: uppercase; }
[data-shop-theme="street"] .product-page .lucas-purchase .product-price { padding-bottom: 14px; border-bottom: 2px solid var(--color-primary); }
[data-shop-theme="street"] .product-page .gallery .thumbs button.active { outline: 2px solid var(--color-primary); outline-offset: -2px; }
[data-shop-theme="street"] .product-page .product-actions { background: var(--color-bg); }

[data-shop-theme="studio"] .lucas-catalog .filters { border-radius: 14px; }
[data-shop-theme="studio"] .lucas-catalog .product-card {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}
[data-shop-theme="studio"] .lucas-catalog .product-card .thumb { border-radius: 0; }
[data-shop-theme="studio"] .lucas-catalog .product-card .info { padding: 12px; }
[data-shop-theme="studio"] .product-page .gallery .main-image,
[data-shop-theme="studio"] .product-page .gallery .thumbs img { border-radius: 12px; overflow: hidden; }
[data-shop-theme="studio"] .product-page .lucas-purchase { border-radius: 14px; background: var(--color-surface); padding: clamp(16px, 3vw, 32px); }
[data-shop-theme="studio"] .product-page .option-btn { border-radius: 8px; }
[data-shop-theme="studio"] .product-page .product-actions .btn-shop { border-radius: 8px; }

@media (min-width: 768px) {
    :is([data-shop-theme="street"], [data-shop-theme="studio"]) .lucas-catalog .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    [data-shop-theme="studio"] .lucas-catalog .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
    :is([data-shop-theme="atelier"], [data-shop-theme="street"], [data-shop-theme="studio"]) .lucas-hero .lucas-hero__slide {
        grid-template-columns: minmax(0, 1fr);
    }
    [data-shop-theme="atelier"] .lucas-hero__copy { grid-column: auto; grid-row: 2; }
    [data-shop-theme="atelier"] .lucas-hero__image { aspect-ratio: 16 / 10; }
    [data-shop-theme="atelier"] .lucas-category-links a { font-size: .88rem; }
}
