/* Theme 5 — storefront page fixes
   Classic style.css covers header/home/product-card.
   Shop/category Vue pages use shop-* / product-grid classes that
   were never included in the classic stylesheet — add them here. */

:root {
    --border: #dedfde;
    --text: #262626;
    --muted: #6c6c6c;
    --white: #fff;
    --secondary: var(--primary-dark, #c44f14);
}

/* Product listing grid used by Shop.vue (classic cards keep classic styles) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ---------- Shop / Category listing ---------- */
.shop-page {
    padding: 24px 0 48px;
    background: #f0f2f5;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--white);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.shop-breadcrumb a {
    color: var(--muted);
}

.shop-breadcrumb a:hover {
    color: var(--primary);
}

.shop-breadcrumb strong {
    color: var(--text);
}

.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-count {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.shop-sort select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    background: var(--white);
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.shop-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
}

.shop-sidebar {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    align-self: start;
    overflow: hidden;
}

.shop-sidebar-head {
    background: var(--primary);
    color: var(--white);
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.shop-sidebar-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px;
}

.shop-sidebar-section:last-of-type {
    border-bottom: none;
}

.shop-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-sidebar-title i {
    color: var(--primary);
    font-size: 12px;
}

.shop-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-cat-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    padding: 5px 8px;
    border-radius: 6px;
    transition: 0.15s;
    text-decoration: none;
}

.shop-cat-list li a:hover,
.shop-cat-list li a.active {
    background: rgba(var(--primary-rgb), 0.07);
    color: var(--primary);
}

.shop-cat-list li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: background 0.15s;
}

.shop-cat-list li a:hover::before,
.shop-cat-list li a.active::before {
    background: var(--primary);
}

.shop-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    flex-wrap: wrap;
}

.shop-price-inputs input {
    width: 70px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    text-align: center;
    background: #f9f9f9;
}

.shop-price-inputs input[type="search"],
.shop-price-inputs input[style*="width:100%"],
.shop-price-inputs input[style*="width: 100%"] {
    width: 100%;
    text-align: left;
    flex: 1 1 100%;
}

.shop-price-sep {
    color: var(--muted);
    font-size: 11px;
}

.shop-sidebar .shop-filter-apply {
    margin: 0 16px 12px;
    width: calc(100% - 32px);
}

.shop-filter-apply {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.shop-filter-apply:hover {
    background: var(--primary-dark);
}

.shop-filter-apply i {
    margin-right: 6px;
}

.product-grid--shop {
    grid-template-columns: repeat(4, 1fr);
}

.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.shop-pagination .pagination {
    gap: 4px;
    flex-wrap: wrap;
    margin: 0;
}

.shop-pagination .page-link {
    border-radius: 8px !important;
    border-color: var(--border);
    color: var(--text);
    font-size: 14px;
    padding: 6px 14px;
}

.shop-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.shop-pagination .page-link:hover {
    background: rgba(var(--primary-rgb), 0.07);
    color: var(--primary);
    border-color: var(--primary);
}

.shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.shop-empty i {
    font-size: 48px;
    margin-bottom: 14px;
    color: #ccc;
    display: block;
}

.shop-empty p {
    font-size: 15px;
}

.shop-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 199;
}

.shop-sidebar-overlay.is-open {
    display: block;
}

@media (max-width: 1024px) {
    .product-grid--shop {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .shop-filter-toggle {
        display: flex;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100dvh;
        z-index: 200;
        overflow-y: auto;
        border-radius: 0;
        transition: left 0.3s;
    }

    .shop-sidebar.is-open {
        left: 0;
    }

    .shop-sidebar-close {
        display: block;
    }

    .product-grid--shop {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Categories / static page heroes used by Vue pages */
.page-hero {
    background: var(--primary);
    color: var(--white);
    padding: 28px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--white);
}

.page-hero p {
    font-size: 14px;
    opacity: 0.92;
    margin: 0;
    color: var(--white);
}

.service-page-section {
    padding: 24px 0 32px;
}


/* ========== Product section / rating (from theme4) ========== */
.product-section {
    padding: 20px 0 10px;
}

.product-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.product-rating i {
    color: #f5b301;
    font-size: 11px;
}

.product-rating--detail {
    justify-content: flex-start;
    margin-bottom: 12px;
}

.product-rating--detail i {
    font-size: 14px;
}


/* ========== Product detail page (from theme4) ========== */
.product-detail-page {
    padding: 20px 0 40px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span:last-child {
    color: var(--text);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.product-detail-image {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.product-detail-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.gallery-main {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    position: relative;
    aspect-ratio: 1;
}

.gallery-main img.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.gallery-main img.gallery-media[hidden] {
    display: none;
}

.gallery-disc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

.gallery-video-wrap {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
}

.gallery-video-wrap[hidden] {
    display: none;
}

.gallery-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.gallery-main img.is-fading {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.gallery-thumbs-wrap {
    width: 100%;
}

.gallery-thumbs-wrap.is-scrollable {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding-bottom: 4px;
}

.gallery-thumbs.is-scrollable {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
    padding-bottom: 6px;
}

.gallery-thumbs.is-scrollable::-webkit-scrollbar {
    display: block;
    height: 5px;
}

.gallery-thumbs.is-scrollable::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 99px;
}

.gallery-thumbs.is-scrollable .gallery-thumb {
    scroll-snap-align: start;
}

.gallery-thumbs-nav {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s, color 0.2s;
}

.gallery-thumbs-nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.gallery-thumbs-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--primary);
}

.gallery-thumb--video {
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}

.video-thumb-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.video-thumb-inner i {
    font-size: 18px;
    color: #fff;
}

.product-attrs {
    list-style: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.product-attrs li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 5px 0;
}

.product-attrs li + li {
    border-top: 1px dashed #eee;
    margin-top: 4px;
    padding-top: 9px;
}

.attr-label {
    color: var(--muted);
    min-width: 72px;
    flex-shrink: 0;
}

.attr-value {
    color: var(--text);
    font-weight: 500;
}

.product-brand {
    color: var(--primary);
    font-weight: 600;
}

.product-brand:hover {
    text-decoration: underline;
}

.in-stock {
    color: #1a8f4c;
    font-weight: 600;
}

.in-stock i {
    margin-right: 4px;
}

.rating-count {
    font-size: 14px;
    color: var(--muted);
    margin-left: 8px;
    font-weight: 400;
}

.product-rating--detail .rating-count {
    font-size: 13px;
}

.product-detail-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-detail-short {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.product-detail-price {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

/* ── Color Swatches ── */
.pro-color { margin-bottom: 16px; }

.color-selector { display: flex; flex-wrap: wrap; gap: 10px; }

.color-swatch-item {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* hide native radio but keep it accessible & clickable via label */
.color-swatch-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    margin: 0;
}

.color-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    outline: 2px solid rgba(0,0,0,0.15);
    outline-offset: 0px;
    cursor: pointer;
    transition: transform 0.18s, outline-color 0.18s, outline-width 0.18s;
    user-select: none;
    background-image: none !important;
    background-size: auto !important;
    flex-shrink: 0;
}

.color-swatch-name {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
    text-align: center;
    max-width: 72px;
    word-break: break-word;
}

.color-swatch:hover {
    transform: scale(1.1);
    outline-color: var(--primary);
    outline-width: 2.5px;
}

.color-swatch-item input[type="radio"]:checked + .color-swatch {
    border-color: #fff;
    outline-color: #222;
    outline-width: 3px;
    transform: scale(1.12);
}

.color-swatch-check {
    display: none;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    pointer-events: none;
}

.color-swatch-item input[type="radio"]:checked + .color-swatch .color-swatch-check {
    display: block;
}

.weight-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.weight-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.weight-btn:hover,
.weight-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.btn-clear-option {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-bottom: 20px;
}

.btn-clear-option:hover {
    color: var(--primary);
}

.product-qty-row {
    margin-bottom: 24px;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #eee;
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-family: inherit;
    font-size: 15px;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 14px 24px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.btn-add-cart {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-add-cart:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-buy-now {
    background: var(--primary);
    color: var(--white);
}

.btn-buy-now:hover {
    background: var(--primary-dark);
}

.product-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 6px;
    flex-wrap: wrap;
}

.product-share h3 {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    margin: 0;
}

.share-links {
    display: flex;
    gap: 8px;
}

.share-links a,
.share-links button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.share-links a[aria-label="Facebook"] { background: #1877f2; }
.share-links a[aria-label="Twitter"]  { background: #1da1f2; }
.share-links a[aria-label="WhatsApp"] { background: #25d366; }
.share-native-btn { background: var(--primary); }
.share-copy-btn { background: #334155; }

.share-links a:hover,
.share-links button:hover { opacity: 0.82; color: #fff; }

/* ── Product Description Card ── */
.product-description {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.product-description > h2,
.product-description .pd-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: block;
}

/* Prose – WYSIWYG / Summernote content */
.product-description p,
.pd-content p   { font-size: 14px; color: #555; line-height: 1.8; margin: 0 0 12px; }
.pd-content h1  { font-size: 20px; color: #1a1a2e; font-weight: 700; margin: 0 0 10px; }
.pd-content h2  { font-size: 17px; color: #1a1a2e; font-weight: 700; margin: 0 0 10px; border: none; padding: 0; }
.pd-content h3  { font-size: 15px; color: #1a1a2e; font-weight: 700; margin: 0 0 8px; }
.pd-content h4, .pd-content h5, .pd-content h6 { color: #1a1a2e; font-weight: 700; margin: 0 0 8px; }
.pd-content ul, .pd-content ol { padding-left: 20px; margin: 0 0 12px; color: #555; font-size: 14px; line-height: 1.8; }
.pd-content li  { margin-bottom: 4px; }
.pd-content strong, .pd-content b { font-weight: 700; color: #333; }
.pd-content a   { color: var(--primary); text-decoration: underline; }
.pd-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }
.pd-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.pd-content table th,
.pd-content table td { border: 1px solid #e0e0e0; padding: 8px 12px; }
.pd-content table th { background: #f5f5f5; font-weight: 700; }
.pd-content blockquote { border-left: 4px solid var(--primary); margin: 12px 0; padding: 10px 16px; background: #fef9f9; color: #555; font-style: italic; }

/* ── Product Reviews Card ── */
/* Product Reviews */
.product-reviews {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.reviews-head h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.btn-write-review {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: filter 0.2s;
    background: var(--primary);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-write-review:hover {
    filter: brightness(0.9);
    color: #fff;
}

.reviews-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 24px;
    align-items: center;
}

.reviews-score-box {
    text-align: center;
    min-width: 120px;
    flex-shrink: 0;
}

.reviews-score {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 8px;
}

.reviews-score-box .product-rating {
    justify-content: center;
    margin-bottom: 6px;
}

.reviews-total {
    font-size: 13px;
    color: var(--muted);
}

.reviews-bars {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.review-bar-row > span {
    width: 28px;
    flex-shrink: 0;
}

.review-bar-row em {
    width: 20px;
    text-align: right;
    font-style: normal;
    font-size: 12px;
}

.review-bar {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.review-bar span {
    display: block;
    height: 100%;
    background: #f5b301;
    border-radius: 4px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.review-item {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: var(--white);
}

.review-item-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.review-author {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-date {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.review-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.review-form {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.review-form h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.review-star-input {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.star-input-btn {
    border: none;
    background: none;
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}

.star-input-btn.active,
.star-input-btn:hover {
    color: #f5b301;
}

.star-input-btn:active {
    transform: scale(1.1);
}

.review-input,
.review-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 14px;
    background: var(--white);
}

.review-input:focus,
.review-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit-review {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-review:hover {
    background: var(--primary-dark);
}

/* Review Modal Popup */
.review-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.review-modal[hidden] {
    display: none;
}

.review-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.review-modal-box {
    position: relative;
    width: min(480px, 100%);
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.review-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 2;
}

.review-modal-head h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.review-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal-close:hover {
    background: #eee;
    color: var(--primary);
}

.review-form--modal {
    border: none;
    border-radius: 0;
    background: var(--white);
    padding: 18px;
}

.related-products {
    padding-bottom: 20px;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .product-detail-actions {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
    }
}

/* ========== Auth pages (from theme4) ========== */
.auth-page,
.service-page {
    background: #f2f2f7;
}

.auth-page .mobile-category-scroll,
.service-page .mobile-category-scroll {
    display: none !important;
}

.auth-main {
    padding: 24px 16px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-shell {
    width: min(440px, 100%);
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.auth-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fdf0f2;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.auth-banner {
    display: none !important;
}

.auth-card-head {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-head h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-card-head p {
    font-size: 14px;
    color: var(--muted);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.auth-field label em {
    font-style: normal;
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.auth-input-wrap > i {
    color: #aaa;
    font-size: 15px;
    flex-shrink: 0;
}

.auth-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    background: transparent;
    min-width: 0;
}

.auth-input-wrap input.is-invalid {
    color: var(--text);
}

.auth-toggle-pass {
    border: none;
    background: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.auth-toggle-pass:hover {
    color: var(--primary);
}

.auth-error {
    display: block;
    font-size: 12px;
    color: #d32f2f;
    margin-top: 5px;
    min-height: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-error.is-visible {
    opacity: 1;
    min-height: 16px;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.auth-check-block {
    margin-bottom: 4px;
}

.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-check a {
    color: var(--primary);
    font-weight: 500;
}

.auth-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.auth-submit:hover {
    background: var(--primary-dark);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #aaa;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.auth-social-btn:hover {
    border-color: #ccc;
    background: #fafafa;
}

.auth-social-google i {
    color: #ea4335;
}

.auth-social-fb i {
    color: #1877f2;
}

.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.out-stock {
    color: #dc2626;
    font-weight: 600;
}
.out-stock i { margin-right: 4px; }
.product-attribute { margin-bottom: 16px; }
.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- Categories serial dropdown ---------- */
.main-nav__link--button {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    line-height: 66px;
}

.main-nav__item--open .main-nav__sub-megamenu,
.main-nav__item--open .main-nav__sub-menu {
    opacity: 1;
    visibility: visible;
    transform: rotateX(0deg);
}

.main-nav__item--open > .main-nav__link,
.main-nav__item--open > .main-nav__link--button {
    background-color: rgba(0, 0, 0, 0.04);
}

.main-nav__item--categories .main-nav__sub-menu {
    z-index: 40;
}

.menu--categories {
    min-width: 220px;
    max-height: min(70vh, 480px);
    overflow-y: auto;
}
