/* ===================================
   ThemeSieuViet - Frontend Styles
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #4F46E5;
    --primary-rgb: 79, 70, 229;
    --primary-dark: #4338CA;
    --primary-light: #EEF2FF;
    --secondary: #0EA5E9;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #1E293B;
    --gray: #64748B;
    --gray-light: #F1F5F9;
    --white: #FFFFFF;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--dark); line-height: 1.6; background: var(--white); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Grid --- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    border: 2px solid transparent; cursor: pointer; transition: all var(--transition);
    text-decoration: none;
}
.btn--primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn--sm { padding: 8px 16px; font-size: 0.8rem; }

/* --- Header --- */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-light); padding: 16px 0;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.header__logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.header__menu { display: flex; list-style: none; gap: 32px; }
.header__menu a { color: var(--gray); font-weight: 500; font-size: 0.95rem; }
.header__menu a:hover, .header__menu a.active { color: var(--primary); }
.header__toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.header__toggle span { display: block; width: 24px; height: 2px; background: var(--dark); transition: var(--transition); }

@media (max-width: 768px) {
    .header__toggle { display: flex; }
    .header__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-light); padding: 20px; }
    .header__nav.active { display: block; }
    .header__menu { flex-direction: column; gap: 16px; }
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    color: var(--white); padding: 80px 0; text-align: center;
    background-size: cover; background-position: center; position: relative;
}
.hero--home { padding: 120px 0; }
.hero__title { font-size: 2.8rem; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero__subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__actions .btn--primary { background: var(--white); color: var(--primary); border-color: var(--white); }
.hero__actions .btn--primary:hover { background: var(--primary-light); }
.hero__actions .btn--outline { color: var(--white); border-color: var(--white); }
.hero__actions .btn--outline:hover { background: var(--white); color: var(--primary); }

@media (max-width: 768px) { .hero__title { font-size: 2rem; } .hero--home { padding: 80px 0; } }

/* --- Section --- */
.section { padding: 64px 0; }
.section--alt { background: var(--gray-light); }
.section__header { text-align: center; margin-bottom: 48px; }
.section__title { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.section__subtitle { color: var(--gray); font-size: 1.05rem; }
.section__footer { text-align: center; margin-top: 40px; }

/* --- Breadcrumb --- */
.breadcrumb { background: var(--gray-light); padding: 12px 0; }
.breadcrumb__list { display: flex; list-style: none; gap: 8px; font-size: 0.9rem; }
.breadcrumb__list li::after { content: '/'; margin-left: 8px; color: var(--gray); }
.breadcrumb__list li:last-child::after { display: none; }
.breadcrumb__list a { color: var(--gray); }
.breadcrumb__list a:hover { color: var(--primary); }
.breadcrumb__active { color: var(--dark); font-weight: 500; }

/* --- Product Card --- */
.product-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card__image { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--gray-light); color: inherit; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #7C3AED); color: var(--white); font-size: 3rem; font-weight: 800; }
.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255, 255, 255, .78);
    color: #0f172b;
    border: 1px solid rgba(255, 255, 255, .72);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 43, .12);
    backdrop-filter: blur(10px);
}
.product-card__body { padding: 20px; }
.product-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.product-card__title a { color: var(--dark); }
.product-card__title a:hover { color: var(--primary); }
.product-card__desc { color: var(--gray); font-size: 0.9rem; margin-bottom: 16px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.product-card__prices { display: grid; gap: 2px; }
.product-card__price { font-size: 1.2rem; font-weight: 800; color: #ed1c24; }
.product-card__old-price { color: #94A3B8; font-size: 0.85rem; font-weight: 700; text-decoration: line-through; }

/* --- Post Card --- */
.post-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card__image { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-light); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--secondary), var(--primary)); color: var(--white); font-size: 3rem; font-weight: 800; }
.post-card__body { padding: 20px; }
.post-card__category { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-bottom: 8px; }
.post-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.post-card__title a { color: var(--dark); }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { color: var(--gray); font-size: 0.9rem; margin-bottom: 12px; }
.post-card__meta { color: var(--gray); font-size: 0.8rem; }

/* --- Testimonial Card --- */
.testimonial-card {
    background: var(--white); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: transform var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); }
.testimonial-card__stars { margin-bottom: 16px; font-size: 1.1rem; }
.testimonial-card__stars span { color: #D1D5DB; }
.testimonial-card__stars .star--active { color: var(--warning); }
.testimonial-card__content { border: none; margin: 0 0 20px; padding: 0; }
.testimonial-card__content p { color: var(--gray); font-style: italic; line-height: 1.7; }
.testimonial-card__author { display: flex; align-items: center; gap: 12px; }
.testimonial-card__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial-card__avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--primary); color: var(--white); font-weight: 700; font-size: 1.2rem; }
.testimonial-card__name { display: block; font-weight: 600; color: var(--dark); }
.testimonial-card__company { display: block; font-size: 0.85rem; color: var(--gray); }

/* --- Theme Detail --- */
.theme-detail-page { background: #f8fafc; color: #0f172b; }
.theme-detail-hero { padding: 44px 0 22px; }
.theme-detail-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.86fr); gap: 26px; align-items: start; }
.theme-preview__stage, .theme-summary, .theme-overview-panel, .theme-gallery-grid a, .theme-gallery-grid button {
    border: 1px solid #eef2ff;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 43, 0.06);
}
.theme-preview__stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #edf0fb 0%, #ffffff 58%, var(--primary-light) 100%);
}
.theme-preview__stage-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}
.theme-preview__image-viewport {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.theme-preview__stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform .35s ease, filter .35s ease;
}
.theme-preview__stage-button:not(.is-scroll-preview):hover img,
.theme-preview__stage-button:not(.is-scroll-preview):focus-visible img {
    transform: scale(1.015);
    filter: saturate(1.04);
}
.theme-preview__stage-button.is-scroll-preview .theme-preview__image-viewport {
    display: block;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 43, .06);
}
.theme-preview__stage-button.is-scroll-preview img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
}
.theme-preview__stage-button.is-scroll-preview img.is-scroll-animated {
    animation: theme-image-scroll var(--theme-scroll-duration, 36s) cubic-bezier(.45, 0, .2, 1) 1s infinite;
}
.theme-preview__zoom {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(15, 23, 43, .78);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(15, 23, 43, .22);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.theme-preview__stage-button:hover .theme-preview__zoom,
.theme-preview__stage-button:focus-visible .theme-preview__zoom {
    opacity: 1;
    transform: translateY(0);
}
.theme-preview__zoom svg { width: 16px; height: 16px; }
.theme-preview__scroll-hint {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: none;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #0f172b;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(15, 23, 43, .12);
    pointer-events: none;
}
.theme-preview__stage-button.is-scroll-preview .theme-preview__scroll-hint {
    display: inline-flex;
}
.theme-preview__placeholder {
    display: grid; place-items: center; width: min(100%, 420px); aspect-ratio: 1;
    border-radius: 12px; background: linear-gradient(135deg, #0f172b, var(--primary)); color: #fff;
    font-size: 5rem; font-weight: 900;
}
.theme-preview__thumbs { display: grid; grid-template-columns: 44px 1fr 44px; gap: 16px; align-items: center; margin-top: 16px; }
.theme-preview__arrow {
    width: 44px; height: 44px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; color: #0f172b;
    display: grid; place-items: center; cursor: pointer; transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.theme-preview__arrow:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 8px 24px rgba(15, 23, 43, .08); }
.theme-preview__arrow svg { width: 18px; height: 18px; }
.theme-preview__thumb-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.theme-preview__thumb {
    position: relative;
    display: block;
    height: 44px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    cursor: zoom-in;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.theme-preview__thumb.is-active, .theme-preview__thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .12);
    transform: translateY(-1px);
}
.theme-preview__thumb img { width: 100%; height: 100%; object-fit: cover; }
.theme-preview__thumb.is-long-shot img { object-position: top center; }
.theme-preview__thumb.is-long-shot::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(15, 23, 43, .78);
    box-shadow: 0 4px 10px rgba(15, 23, 43, .18);
}
.theme-preview__stage-button:focus-visible,
.theme-preview__arrow:focus-visible,
.theme-preview__thumb:focus-visible,
.theme-lightbox__close:focus-visible,
.theme-lightbox__nav:focus-visible {
    outline: 3px solid rgba(var(--primary-rgb), .24);
    outline-offset: 3px;
}

body.theme-lightbox-open { overflow: hidden; }
.theme-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.theme-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}
.theme-lightbox__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(2, 6, 23, .78);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}
.theme-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(1120px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
}
.theme-lightbox__figure {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    width: 100%;
    margin: 0;
}
.theme-lightbox__viewport {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    max-height: calc(100vh - 140px);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
.theme-lightbox__figure img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 140px);
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}
.theme-lightbox__figure.is-scroll-preview .theme-lightbox__viewport {
    display: block;
}
.theme-lightbox__figure.is-scroll-preview img {
    width: 100%;
    max-height: none;
    object-fit: cover;
    object-position: top center;
}
.theme-lightbox__figure.is-scroll-preview img.is-scroll-animated {
    animation: theme-image-scroll var(--theme-scroll-duration, 60s) cubic-bezier(.45, 0, .2, 1) 1s infinite;
}
.theme-lightbox__figure figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #fff;
    font-weight: 800;
}
.theme-lightbox__figure small {
    color: rgba(255, 255, 255, .72);
    font-weight: 800;
}
.theme-lightbox__close,
.theme-lightbox__nav {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .82);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(2, 6, 23, .34), 0 0 0 4px rgba(255, 255, 255, .16);
    transition: background .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.theme-lightbox__close:hover,
.theme-lightbox__nav:hover {
    border-color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 18px 42px rgba(2, 6, 23, .4), 0 0 0 5px rgba(255, 255, 255, .2);
}
.theme-lightbox__close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
}
.theme-lightbox__close:hover { transform: translateY(-1px); }
.theme-lightbox__nav {
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    transform: translateY(-50%);
}
.theme-lightbox__nav:hover { transform: translateY(-50%) scale(1.04); }
.theme-lightbox__nav--prev { left: 18px; }
.theme-lightbox__nav--next { right: 18px; }
.theme-lightbox__close svg,
.theme-lightbox__nav svg { width: 20px; height: 20px; }

@keyframes theme-image-scroll {
    0% { opacity: 1; transform: translate3d(0, 0, 0); }
    80% { opacity: 1; transform: translate3d(0, calc(var(--theme-scroll-distance, 0px) * -1), 0); }
    86% { opacity: .45; transform: translate3d(0, calc(var(--theme-scroll-distance, 0px) * -1), 0); }
    87% { opacity: .25; transform: translate3d(0, 0, 0); }
    93%, 100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

.theme-preview__stage-button.is-scroll-preview .theme-preview__image-viewport::after,
.theme-lightbox__figure.is-scroll-preview .theme-lightbox__viewport::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(255, 255, 255, .62);
    border-top-color: var(--primary);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 43, .18));
    animation: theme-scroll-loader var(--theme-scroll-duration, 36s) linear 1s infinite;
}

@keyframes theme-scroll-loader {
    0%, 81%, 100% { opacity: 0; transform: rotate(0deg); }
    85%, 92% { opacity: 1; transform: rotate(270deg); }
    96% { opacity: 0; transform: rotate(360deg); }
}

.theme-summary { padding: 28px; }
.theme-summary__badge {
    display: inline-flex; align-items: center; min-height: 26px; padding: 4px 12px; border-radius: 999px;
    background: #fff1f1; color: #ed1c24; font-size: .82rem; font-weight: 800; margin-bottom: 14px;
}
.theme-summary h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 2.6vw, 2.35rem); line-height: 1.16; font-weight: 850; letter-spacing: 0; color: #0f172b; }
.theme-summary__prices { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-bottom: 16px; }
.theme-summary__prices strong { color: #ed1c24; font-size: clamp(1.55rem, 2.6vw, 2.05rem); font-weight: 900; line-height: 1; }
.theme-summary__prices del { color: #8994a8; font-weight: 700; font-size: .98rem; }
.theme-summary__prices span { padding: 5px 10px; border-radius: 8px; background: #fff1f1; color: #ed1c24; font-weight: 800; font-size: .86rem; }
.theme-summary__excerpt { color: #647084; line-height: 1.75; margin: 0 0 20px; }
.theme-summary__features { display: grid; gap: 10px; list-style: none; margin: 0 0 26px; }
.theme-summary__features li { display: flex; align-items: flex-start; gap: 10px; color: #5d6880; font-weight: 600; line-height: 1.5; }
.theme-summary__features svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--primary); margin-top: 2px; }
.theme-summary__actions { display: grid; grid-template-columns: 1fr 1.05fr; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid #e8edf5; }
.theme-summary__actions--single { grid-template-columns: 1fr; }
.theme-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px;
    border-radius: 12px; font-weight: 800; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.theme-btn:hover { transform: translateY(-1px); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn--primary { color: #fff; background: linear-gradient(135deg, #ed1c24, #c9151b); box-shadow: 0 14px 28px rgba(237, 28, 36, .24); }
.theme-btn--primary:hover { color: #fff; }
.theme-btn--outline { color: #ed1c24; background: #fff; border-color: #ed1c24; }
.theme-btn--outline:hover { background: #fff1f1; color: #c9151b; }
.theme-btn--light { background: #fff; color: var(--primary); min-width: 170px; }
.theme-summary__support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 22px; }
.theme-summary__support div { display: grid; justify-items: center; text-align: center; gap: 8px; min-width: 0; padding: 0 10px; border-left: 1px solid #e7edf5; }
.theme-summary__support div:first-child { border-left: 0; }
.theme-summary__support .theme-large-icon { width: 40px; height: 40px; margin-bottom: 2px; }
.theme-summary__support strong { color: #0f172b; font-size: .78rem; line-height: 1.3; }
.theme-summary__support small { color: #6b7689; font-size: .75rem; line-height: 1.45; }
.theme-large-icon { display: block; color: var(--primary); stroke: currentColor; }

.theme-tabs-section, .theme-gallery-section, .theme-related-section, .theme-cta-section { padding: 18px 0; }
.theme-tabs { display: flex; gap: 26px; border-bottom: 1px solid #e6ebf3; margin-bottom: 0; overflow-x: auto; }
.theme-tabs a { color: #677287; font-weight: 800; padding: 0 18px 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.theme-tabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.theme-content-panel {
    padding: 30px 24px;
    border: 1px solid #eef2ff;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 43, 0.06);
}
.theme-content-panel__pane[hidden] { display: none; }
.theme-content-panel__pane h2 {
    margin: 0 0 12px;
    color: #0f172b;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0;
}
.theme-content-panel__content { max-width: 980px; min-height: 1px; }
.theme-overview-panel {
    display: grid; grid-template-columns: minmax(250px, .9fr) 1.8fr; gap: 26px; padding: 30px 24px; border-top-left-radius: 0; border-top-right-radius: 0;
}
.theme-overview-panel h2, .theme-section-heading h2, .theme-cta h2 { margin: 0; color: #0f172b; font-size: 1.45rem; line-height: 1.25; font-weight: 850; letter-spacing: 0; }
.theme-overview-panel__subheading { margin-top: 28px !important; padding-top: 24px; border-top: 1px solid #e7edf5; }
.theme-overview-panel__content { max-width: 100%; }
.theme-overview-panel__features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.theme-overview-panel__feature-content { grid-column: 1 / -1; min-width: 0; }
.theme-overview-panel__features article {
    display: grid; justify-items: center; text-align: center; gap: 8px; padding: 0 22px; border-left: 1px solid #e7edf5;
}
.theme-overview-panel__features .theme-large-icon { width: 54px; height: 54px; margin-bottom: 6px; }
.theme-overview-panel__features h3 { margin: 0; font-size: .92rem; color: #0f172b; font-weight: 800; }
.theme-overview-panel__features p { margin: 0; color: #6b7689; font-size: .86rem; line-height: 1.55; }

.theme-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 16px; }
.theme-section-heading a { color: var(--primary); font-weight: 800; font-size: .9rem; }
.theme-section-heading a::after { content: "›"; margin-left: 8px; font-size: 1.2rem; line-height: 0; }
.theme-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.theme-gallery-grid a,
.theme-gallery-grid button {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #eef2ff;
    overflow: hidden;
    box-shadow: none;
    cursor: zoom-in;
}
.theme-gallery-grid img { width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; transition: transform .35s ease; }
.theme-gallery-grid a:hover img,
.theme-gallery-grid button:hover img,
.theme-gallery-grid button:focus-visible img { transform: scale(1.03); }
.theme-gallery-grid button:focus-visible {
    outline: 3px solid rgba(var(--primary-rgb), .24);
    outline-offset: 3px;
}

.theme-related-carousel {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 14px;
    align-items: center;
}
.theme-related-carousel.is-static { grid-template-columns: minmax(0, 1fr); }
.theme-related-carousel.is-static .theme-related-carousel__nav { display: none; }
.theme-related-carousel__viewport {
    min-width: 0;
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}
.theme-related-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 36px) / 3);
    gap: 18px;
}
.theme-related-carousel__slide {
    min-width: 0;
    scroll-snap-align: start;
}
.theme-related-carousel__slide .product-card {
    height: 100%;
}
.theme-related-carousel__nav {
    width: 46px;
    height: 46px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    color: #0f172b;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 43, .06);
    transition: border-color .2s ease, color .2s ease, transform .2s ease, opacity .2s ease;
}
.theme-related-carousel__nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.theme-related-carousel__nav:disabled {
    opacity: .38;
    cursor: not-allowed;
}
.theme-related-carousel__nav svg { width: 18px; height: 18px; }

.theme-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 44px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; overflow: hidden; box-shadow: 0 18px 50px rgba(var(--primary-rgb), .20); }
.theme-cta h2 { color: #fff; margin-bottom: 8px; }
.theme-cta p { margin: 0; color: rgba(255,255,255,.88); }

@media (max-width: 992px) {
    .theme-detail-grid, .theme-overview-panel { grid-template-columns: 1fr; }
    .theme-overview-panel__features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-related-carousel__track { grid-auto-columns: calc((100% - 18px) / 2); }
    .theme-gallery-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .theme-detail-hero { padding-top: 28px; }
    .theme-summary { padding: 22px 18px; }
    .theme-summary__actions, .theme-summary__support, .theme-overview-panel__features { grid-template-columns: 1fr; }
    .theme-preview__stage { padding: 14px; }
    .theme-preview__zoom { right: 10px; bottom: 10px; opacity: 1; transform: none; }
    .theme-preview__scroll-hint { left: 10px; bottom: 52px; font-size: .72rem; }
    .theme-preview__thumbs { grid-template-columns: 36px 1fr 36px; gap: 10px; }
    .theme-preview__thumb-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .theme-lightbox { padding: 12px; }
    .theme-lightbox__dialog { width: 100%; max-height: calc(100vh - 24px); }
    .theme-lightbox__viewport { max-height: calc(100vh - 112px); border-radius: 12px; }
    .theme-lightbox__figure img { max-height: calc(100vh - 112px); border-radius: 12px; }
    .theme-lightbox__figure.is-scroll-preview img { max-height: none; }
    .theme-lightbox__figure figcaption { align-items: flex-start; flex-direction: column; gap: 4px; font-size: .9rem; }
    .theme-lightbox__close { top: 10px; right: 10px; width: 40px; height: 40px; }
    .theme-lightbox__nav { width: 42px; height: 42px; }
    .theme-lightbox__nav--prev { left: 10px; }
    .theme-lightbox__nav--next { right: 10px; }
    .theme-overview-panel__features article { border-left: 0; border-top: 1px solid #e7edf5; padding: 18px 0 0; }
    .theme-related-carousel { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; }
    .theme-related-carousel__track { grid-auto-columns: 100%; }
    .theme-related-carousel__nav { width: 40px; height: 40px; border-radius: 12px; }
    .theme-cta { align-items: stretch; flex-direction: column; padding: 24px 20px; }
}

/* --- Post Detail --- */
.post-detail { max-width: 800px; margin: 0 auto; }
.post-detail__header { text-align: center; margin-bottom: 32px; }
.post-detail__category { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.post-detail__title { font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.post-detail__meta { color: var(--gray); font-size: 0.9rem; }
.post-detail__image { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.post-detail__related { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--gray-light); }

/* --- Page Content --- */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content__title { font-size: 2.2rem; font-weight: 800; margin-bottom: 24px; }
.page-content__image { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }

/* --- Prose (Rich Content) --- */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 12px; color: var(--dark); }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 24px 0 8px; color: var(--dark); }
.prose p { margin-bottom: 16px; color: var(--gray); line-height: 1.8; }
.prose ul, .prose ol { margin: 16px 0; padding-left: 24px; color: var(--gray); }
.prose li { margin-bottom: 8px; }
.prose blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 24px 0; background: var(--primary-light); border-radius: 0 8px 8px 0; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 24px 0; }

/* --- Filters --- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center; }
.filters__item { padding: 8px 20px; border-radius: 20px; font-size: 0.9rem; font-weight: 500; color: var(--gray); background: var(--gray-light); transition: all var(--transition); }
.filters__item:hover, .filters__item--active { background: var(--primary); color: var(--white); }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 32px; }
.pagination__link { padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; color: var(--gray); background: var(--gray-light); transition: all var(--transition); }
.pagination__link:hover { background: var(--primary-light); color: var(--primary); }
.pagination__link--active { background: var(--primary); color: var(--white); }
.pagination__link--disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Theme Listing --- */
.theme-listing-page {
    background: #f8fbff;
    color: #0f172b;
}
.theme-listing-hero {
    position: relative;
    min-height: 215px;
    padding: 44px 0 92px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(248, 251, 255, .98) 0%, rgba(248, 251, 255, .82) 52%, rgba(235, 243, 255, .42) 100%),
        radial-gradient(circle at 78% 20%, rgba(59, 79, 232, .22), transparent 32%),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}
.theme-listing-hero::before,
.theme-listing-hero::after {
    content: "";
    position: absolute;
    right: 4%;
    bottom: -70px;
    width: 280px;
    height: 260px;
    border: 1px solid rgba(59, 79, 232, .12);
    background:
        linear-gradient(90deg, rgba(59, 79, 232, .12) 1px, transparent 1px) 0 0 / 34px 100%,
        linear-gradient(0deg, rgba(59, 79, 232, .08) 1px, transparent 1px) 0 0 / 100% 28px,
        linear-gradient(135deg, rgba(59, 79, 232, .16), rgba(255, 255, 255, .12));
    transform: skewX(-16deg) rotate(2deg);
}
.theme-listing-hero::after {
    right: 20%;
    bottom: -96px;
    width: 210px;
    height: 310px;
    opacity: .72;
    transform: skewX(-14deg) rotate(-7deg);
}
.theme-listing-hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}
.theme-listing-hero h1 {
    margin: 0 0 12px;
    color: #0f172b;
    font-size: clamp(2rem, 4vw, 3.05rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0;
}
.theme-listing-hero p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}
.theme-listing-section {
    position: relative;
    z-index: 2;
    padding: 0 0 52px;
    margin-top: -48px;
}
.theme-listing-filter {
    display: grid;
    grid-template-columns: minmax(210px, 1.25fr) repeat(4, minmax(145px, .92fr)) auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid #e6edf8;
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 16px 42px rgba(15, 23, 43, .08);
    backdrop-filter: blur(14px);
}
.theme-listing-filter label {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.theme-listing-filter label > span {
    color: #4f5f78;
    font-size: .78rem;
    font-weight: 700;
}
.theme-listing-filter input,
.theme-listing-filter select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dce5f3;
    border-radius: 8px;
    background: #fff;
    color: #0f172b;
    font: inherit;
    font-size: .9rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.theme-listing-filter input:focus,
.theme-listing-filter select:focus {
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, .12);
}
.theme-listing-filter select {
    padding: 0 36px 0 12px;
}
.theme-listing-filter__search {
    position: relative;
}
.theme-listing-filter__search svg {
    position: absolute;
    left: 14px;
    bottom: 13px;
    width: 20px;
    height: 20px;
    color: #64748b;
    pointer-events: none;
}
.theme-listing-filter__search input {
    padding: 0 14px 0 44px;
}
.theme-listing-filter__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #dce5f3;
    border-radius: 8px;
    background: #fff;
    color: #ed1c24;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.theme-listing-filter__button:hover {
    border-color: #ed1c24;
    background: #fff1f1;
    box-shadow: 0 10px 24px rgba(237, 28, 36, .12);
    transform: translateY(-1px);
}
.theme-listing-filter__button svg {
    width: 20px;
    height: 20px;
}
.theme-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.theme-listing-card {
    overflow: hidden;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.theme-listing-card:hover {
    border-color: #f3f4f6;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
    transform: translateY(-4px);
}
.theme-listing-card__image {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #ffffff);
    color: #ed1c24;
    font-size: 3rem;
    font-weight: 900;
}
.theme-listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, filter .45s ease;
}
.theme-listing-card:hover .theme-listing-card__image img {
    transform: scale(1.05);
    filter: saturate(1.04);
}
.theme-listing-card__placeholder {
    color: #ed1c24;
}
.theme-listing-card__discount {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ed1c24;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(237, 28, 36, .2);
}
.theme-listing-card__body {
    display: grid;
    gap: 10px;
    padding: 14px;
}
.theme-listing-card__category {
    position: absolute;
    left: 12px;
    top: 12px;
    display: block;
    max-width: calc(100% - 92px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #0f172b;
    box-shadow: 0 8px 22px rgba(15, 23, 43, .12);
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}
.theme-listing-card h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.34;
    font-weight: 850;
    letter-spacing: 0;
}
.theme-listing-card h2 a {
    color: #0f172b;
}
.theme-listing-card h2 a:hover {
    color: #ed1c24;
}
.theme-listing-card__prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.theme-listing-card__prices strong {
    color: #ed1c24;
    font-size: .95rem;
    font-weight: 800;
}
.theme-listing-card__prices del {
    color: #999;
    font-size: .82rem;
    font-weight: 500;
}
.theme-listing-card p {
    margin: 0;
    min-height: 42px;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.6;
}
.theme-listing-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}
.theme-listing-card__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #ed1c24;
    border-radius: 6px;
    color: #ed1c24;
    font-size: .86rem;
    font-weight: 850;
}
.theme-listing-card__actions a:last-child {
    color: #fff;
    background: linear-gradient(135deg, #ed1c24, #c9151b);
    box-shadow: 0 12px 24px rgba(237, 28, 36, .18);
}
.theme-listing-card__actions a:hover {
    transform: translateY(-1px);
}
.theme-listing-pagination {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}
.theme-listing-pagination .pagination {
    margin-top: 0;
}
.theme-listing-pagination .pagination__link {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce5f3;
    background: #fff;
    color: #475569;
    font-weight: 800;
}
.theme-listing-pagination .pagination__link--active {
    border-color: #ed1c24;
    background: #ed1c24;
    color: #fff;
}
.theme-listing-empty {
    display: grid;
    gap: 8px;
    place-items: center;
    padding: 72px 24px;
    border: 1px solid #dfe8f6;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}
.theme-listing-empty h2 {
    margin: 0;
    color: #0f172b;
    font-size: 1.35rem;
}
.theme-listing-empty p {
    margin: 0;
    color: #64748b;
}
.theme-listing-support {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 28px;
    padding: 22px;
    border: 1px solid #dfe8f6;
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 34px rgba(15, 23, 43, .06);
}
.theme-listing-support article {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    min-width: 0;
    padding: 0 20px;
    border-left: 1px solid #e4ebf5;
}
.theme-listing-support article:first-child {
    border-left: 0;
}
.theme-listing-support article > span {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
}
.theme-listing-support svg {
    width: 27px;
    height: 27px;
}
.theme-listing-support h3 {
    margin: 0 0 4px;
    color: #0f172b;
    font-size: .92rem;
    line-height: 1.35;
    font-weight: 850;
}
.theme-listing-support p {
    margin: 0;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .theme-listing-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .theme-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-listing-support { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
    .theme-listing-support article:nth-child(odd) { border-left: 0; }
}
@media (max-width: 720px) {
    .theme-listing-hero { padding: 34px 0 78px; }
    .theme-listing-filter,
    .theme-listing-grid,
    .theme-listing-support { grid-template-columns: 1fr; }
    .theme-listing-filter { gap: 12px; padding: 14px; }
    .theme-listing-card__actions { grid-template-columns: 1fr; }
    .theme-listing-support article { border-left: 0; padding: 0; }
}

/* --- Empty State --- */
.empty-state { text-align: center; padding: 64px 0; color: var(--gray); }

/* --- Error Page --- */
.error-page { text-align: center; padding: 80px 0; }
.error-page__code { font-size: 8rem; font-weight: 800; color: var(--primary); line-height: 1; }
.error-page__title { font-size: 1.5rem; font-weight: 700; margin: 16px 0 8px; }
.error-page__text { color: var(--gray); margin-bottom: 32px; }

/* --- Footer --- */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 64px 0 0; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer__title { color: var(--white); font-weight: 700; margin-bottom: 16px; font-size: 1.1rem; }
.footer__text { font-size: 0.9rem; line-height: 1.7; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 8px; }
.footer__links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer__links a:hover { color: var(--white); }
.footer__contact { list-style: none; font-size: 0.9rem; }
.footer__contact li { margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 0.85rem; }

@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .footer__grid { grid-template-columns: 1fr; } }
