:root, [data-theme="default"] {
    --bg: #f6f3ef;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #5c5c5c;
    --accent: #1e3a2f;
    --accent-soft: #2d5a47;
    --price: #0f5132;
    --sale: #c45c26;
    --border: #e8e4de;
    --shadow: 0 4px 14px rgba(30, 58, 47, 0.08);
    --shadow-hover: 0 12px 28px rgba(30, 58, 47, 0.14);
    --radius: 12px;
    --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #9e9e9e;
    --accent: #bb86fc;
    --accent-soft: #9c68d4;
    --price: #03dac6;
    --sale: #cf6679;
    --border: #333333;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --font: "Roboto", system-ui, -apple-system, sans-serif;
}

[data-theme="minimalist"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #333333;
    --text-muted: #777777;
    --accent: #000000;
    --accent-soft: #444444;
    --price: #000000;
    --sale: #e74c3c;
    --border: #eeeeee;
    --shadow: none;
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.05);
    --radius: 0px;
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-theme="ocean"] {
    --bg: #091428; /* Deep navy */
    --surface: #112240; /* Elevated blue/grey surface */
    --text: #e2e8f0; /* Ice blue text */
    --text-muted: #8892b0;
    --accent: #4fd1c5; /* Vibrant cyan */
    --accent-soft: #38b2ac;
    --price: #64ffda;
    --sale: #ff8a65; /* Coral contrast */
    --border: #1e3a5f;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --font: "Quicksand", "Open Sans", system-ui, sans-serif;
}

[data-theme="sunset"] {
    --bg: #fff3e0;
    --surface: #ffffff;
    --text: #3e2723;
    --text-muted: #5d4037;
    --accent: #e65100;
    --accent-soft: #ef6c00;
    --price: #bf360c;
    --sale: #d84315;
    --border: #ffe0b2;
    --shadow: 0 4px 14px rgba(230, 81, 0, 0.08);
    --shadow-hover: 0 12px 28px rgba(230, 81, 0, 0.14);
    --radius: 16px;
    --font: "Georgia", serif;
}

[data-theme="forest"] {
    --bg: #121e17; /* Deep pine background */
    --surface: #1e3326; /* Slightly lighter card surface */
    --text: #e8f0e8; /* Crisp off-white/green text */
    --text-muted: #96af9c;
    --accent: #6dbf81; /* Bright sage accent */
    --accent-soft: #4a945d;
    --price: #88d49e;
    --sale: #ff9d76; /* Peachy/orange contrast for sales */
    --border: #2c4a38;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.6);
    --radius: 16px;
    --font: "Merriweather", serif;
}

[data-theme="cyberpunk"] {
    --bg: #0d0e15;
    --surface: #1a1c29;
    --text: #00ffcc;
    --text-muted: #00b38f;
    --accent: #ff007f;
    --accent-soft: #ff4d94;
    --price: #ffff00;
    --sale: #ff3333;
    --border: #33334d;
    --shadow: 0 4px 14px rgba(255, 0, 127, 0.2);
    --shadow-hover: 0 12px 28px rgba(255, 0, 127, 0.4);
    --radius: 0px;
    --font: "Courier New", monospace;
}

[data-theme="rose"] {
    --bg: #fff0f5;
    --surface: #ffffff;
    --text: #4a2c3a;
    --text-muted: #805c6d;
    --accent: #c24673;
    --accent-soft: #d37396;
    --price: #9b284e;
    --sale: #e06c75;
    --border: #f8cce0;
    --shadow: 0 4px 14px rgba(194, 70, 115, 0.08);
    --shadow-hover: 0 12px 28px rgba(194, 70, 115, 0.14);
    --radius: 8px;
    --font: "Playfair Display", serif;
}

[data-theme="lavender"] {
    --bg: #f8f8ff;
    --surface: #ffffff;
    --text: #3d3b4f;
    --text-muted: #676483;
    --accent: #8782b5;
    --accent-soft: #a8a4cc;
    --price: #625c94;
    --sale: #e57373;
    --border: #e6e6fa;
    --shadow: 0 4px 14px rgba(135, 130, 181, 0.08);
    --shadow-hover: 0 12px 28px rgba(135, 130, 181, 0.14);
    --radius: 20px;
    --font: "Nunito", system-ui, sans-serif;
}

[data-theme="retro"] {
    --bg: #f4ecd8; /* Old paper tone */
    --surface: #ffffff;
    --text: #222222;
    --text-muted: #555555;
    --accent: #d23600; /* Punchy retro orange-red */
    --accent-soft: #e55c2a;
    --price: #0055ff; /* Hyperlink blue */
    --sale: #d23600;
    --border: #222222; /* Hard black borders */
    --shadow: 4px 4px 0px #222222; /* Stark brutalist shadow */
    --shadow-hover: 6px 6px 0px #222222;
    --radius: 0px; /* Sharp corners */
    --font: "Courier New", Courier, monospace; 
}

*, *::before, *::after { box-sizing: border-box; }

img {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: #fff;
    z-index: 100;
}
.skip-link:focus { left: 0; }

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

.site-header {
    padding: 1.75rem 0 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.site-header-top {
    display: flex;
    justify-content: right;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-header-top h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.search-container {
    position: relative;
    flex: 1 1 250px;
    max-width: 400px;
    display: flex;
    justify-content: flex-end;
}

#site-search {
    width: 100%;
    max-width: 300px;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    font-size: 0.95rem;
}

#site-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 191, 129, 0.2);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    width: 100%;
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-result-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(0,0,0,0.05);
}

.search-result-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    background: #eceae6;
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    overflow: hidden;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.search-result-price {
    font-size: 0.8rem;
    color: var(--price);
    font-weight: 700;
    margin: 0;
}

.site-header .tagline {
    margin: 0.35rem 0 0;
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 42rem;
}

.hero {
    margin: 0 0 1.75rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
}

@media (max-width: 767px) {
    .hero {
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        border-radius: 0;
    }
}

.hero img {
    display: block;
    width: 100%;
    max-height: min(42vh, 360px);
    object-fit: cover;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.reviews-showcase {
    margin: 0 0 1.5rem;
    --review-slideshow-height: 168px;
}

.reviews-showcase-heading {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.reviews-track {
    position: relative;
    height: var(--review-slideshow-height);
    overflow: hidden;
}

.review-slide {
    display: none;
    height: 100%;
    box-sizing: border-box;
}

.review-slide-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
}

.review-slide.is-active {
    display: block;
    animation: reviewFade 420ms ease-out;
}

@keyframes reviewFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.review-slide-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 100%;
    min-height: 0;
}

.review-listing-media {
    flex: 0 0 148px;
    width: 148px;
    height: 100%;
    max-height: var(--review-slideshow-height);
    background: #eceae6;
    overflow: hidden;
}

.review-listing-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.review-listing-placeholder {
    width: 100%;
    height: 100%;
    min-height: var(--review-slideshow-height);
    background: linear-gradient(135deg, #e8e4de 0%, #eceae6 100%);
}

.review-slide-main {
    flex: 1;
    padding: 0.85rem 1rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.review-slide-top {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow: hidden;
}

.review-slide-product {
    flex: 0 0 auto;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.25rem;
}

.review-slide-product .card-title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.review-product-link {
    text-decoration: none;
    color: inherit;
}

.review-product-link:hover .card-title {
    text-decoration: underline;
}

.review-price-row {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

a.review-etsy-cta {
    text-decoration: none;
    align-self: flex-start;
}

a.review-etsy-cta:hover {
    text-decoration: underline;
}

.review-stars {
    color: #b8860b;
    font-size: 1rem;
    letter-spacing: 0.06rem;
    margin: 0;
    line-height: 1.2;
    flex-shrink: 0;
}

.review-quote {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}

.review-quote q {
    font-style: italic;
    quotes: "\201C" "\201D";
}

.review-quote q::before,
.review-quote q::after {
    color: var(--text-muted);
    font-style: normal;
}

.review-text-muted {
    font-style: italic;
    color: var(--text-muted);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card a.card-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    text-decoration: none;
    color: inherit;
}

.card-actions {
    padding: 0 1rem 1rem;
    flex-shrink: 0;
}

.card-buy-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    border-radius: 9999px;
    color: #fff;
    background-color: var(--lumo-primary-color, #f1641e);
    transition: opacity 0.2s ease;
}

.card-buy-button:hover {
    opacity: 0.92;
    color: #fff;
}

.card-media {
    position: relative;
    aspect-ratio: 1;
    background: #eceae6;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card:hover .card-media img {
    transform: scale(1.04);
}

.card-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.badge-sale {
    background: #fff3e8;
    color: var(--sale);
}

.badge-stock {
    background: #fde8e8;
    color: #9b1c1c;
}

.card-body {
    padding: 1rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.35rem;
}

.card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-snippet {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-snippet a {
    color: var(--accent);
    text-decoration: underline;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-rating {
    color: #b8860b;
}

.price-row {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
}

.price-current {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--price);
}

.price-was {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.cta-hint {
    font-size: 0.75rem;
    color: var(--accent-soft);
    margin-top: 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.rating-link {
    text-decoration: none;
    color: inherit;
}

.rating-link:hover {
    text-decoration: underline;
}

.product-reviews-section {
    grid-column: 1 / -1;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.reviews-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-review-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.product-review-content {
    flex: 1;
}

.product-review-stars {
    color: #b8860b;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-review-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-review-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
    z-index: 9999;
    display: flex;
    justify-content: center;
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-consent-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.cookie-consent p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
}

.cookie-consent a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cookie-btn-accept {
    background-color: var(--accent);
    color: #fff;
}

.cookie-btn-accept:hover {
    opacity: 0.9;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: -0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.share-btn:hover {
    background: rgba(0,0,0,0.03);
    border-color: var(--text-muted);
}

.share-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cookie-btn-decline {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
    background-color: var(--border);
}
