/* ===== PRODUCT VIEW PAGE ===== */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px 0;
    font-size: 13px;
    color: #888;
}
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: var(--green-100); }
.breadcrumb .sep { color: #ccc; }
.breadcrumb .current { color: #222; font-weight: 600; }

/* ===== PRODUCT VIEW LAYOUT ===== */
.product-view {
    padding: 24px 0 48px;
}
.product-view-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 900px) {
    .product-view-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== GALLERY ===== */
.pv-gallery {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    width: 100%;
    overflow: hidden;
}
@media (max-width: 900px) {
    .pv-gallery { position: unset; top: auto; }
}

/* Main swiper */
.pv-swiper-main {
    width: 100%;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    margin-bottom: 12px;
    background: #f5f5f0;
}
.pv-swiper-main .swiper-slide {
    aspect-ratio: 1;
}
.pv-swiper-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pv-swiper-main .swiper-button-prev,
.pv-swiper-main .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.pv-swiper-main .swiper-button-prev::after,
.pv-swiper-main .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}

/* Thumbnail swiper */
.pv-swiper-thumbs {
    width: 100%;
}
.pv-swiper-thumbs .swiper-slide {
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f5f5f0;
    transition: border-color 0.15s;
    opacity: 0.6;
    aspect-ratio: 1;
}
.pv-swiper-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pv-swiper-thumbs .swiper-slide-thumb-active {
    border-color: var(--green-100);
    opacity: 1;
}

/* ===== PRODUCT INFO ===== */
.pv-info {}
.pv-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.pv-meta span { display: flex; align-items: center; gap: 4px; }
.pv-title {
    font-size: 26px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 12px;
}
@media (max-width: 600px) { .pv-title { font-size: 20px; } }

.pv-price-card {
    background: var(--black-5);
    border-radius: var(--radius-md, 8px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.pv-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 0;
}
.pv-price {
    font-size: 30px;
    font-weight: 700;
    color: var(--black-100);
}
.pv-price-old {
    font-size: 16px;
    color: #bbb;
    text-decoration: line-through;
}
.pv-stock {
    font-size: 13px;
    color: #888;
    margin-bottom: 0;
    white-space: nowrap;
}

/* Variants */
.pv-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.pv-variant-btn {
    padding: 6px 16px;
    border: 1.5px solid #ddd;
    border-radius: var(--radius-sm, 4px);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    color: #333;
}
.pv-variant-btn:hover { border-color: var(--black-100); color: var(--black-100); }
.pv-variant-btn.active {
    border-color: var(--black-100);
    background: var(--black-100);
    color: #fff;
}

/* Qty + Actions */
.pv-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.pv-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
    height: 44px;
    background: #fff;
}
.pv-qty-btn {
    padding: 0 12px;
    height: 44px;
    background: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.pv-qty-btn:hover { background: #f5f5f0; color: #111; }
.pv-qty-val {
    min-width: 36px;
    height: 44px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    outline: none;
    background: #fff;
    color: #111;
    line-height: 44px;
}
/* pv-btn-wish, pv-btn-cart, pv-btn-buy → see pv-action-buttons.css */

/* Nutrition */
.pv-nutrition {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.pv-nutr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.pv-nutr-row:last-child { border-bottom: none; }
.pv-nutr-label { color: #555; }
.pv-nutr-val { font-weight: 600; color: #111; }

/* Accordion */
.pv-accordion {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
    margin-top: 20px;
    margin-bottom: 0;
    gap: 10px;
}
.pv-acc-item {
    border-radius: var(--radius-md);
    padding: 24px;
    background: var(--black-10);
}
.pv-acc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #222;
    user-select: none;
}
.pv-acc-head i { font-size: 12px; color: #888; transition: transform 0.2s; }
.pv-acc-item.open .pv-acc-head i { transform: rotate(90deg); }
.pv-acc-body {
    display: none;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    padding: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    background: white;
}
.pv-acc-item.open .pv-acc-body { display: block; }

/* ===== REVIEWS SECTION ===== */
.pv-reviews {
    margin-top: 24px;
    border: 1px solid var(--black-10);
    border-radius: var(--radius-sm, 4px);
    /*padding: 16px;*/
    background: #fafaf8;
}
.pv-reviews-title {
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 500;
    /*margin-bottom: 12px;*/
    color: #222;
}
.pv-review-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--black-10);
    margin-bottom: 16px;
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}
.pv-review-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    /*margin-bottom: 12px;*/
    border-bottom: 1px dashed var(--black-30);
}
.pv-review-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #b0a898;
    letter-spacing: 0;
    text-transform: uppercase;
}
.pv-review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv-review-body { flex: 1; }
.pv-review-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.pv-review-meta strong { color: #333; font-weight: 600; }
.pv-review-text { font-size: 13px; color: #444; line-height: 1.6; }
.pv-review-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 22px;
    background: #e0e0d8;
}
.pv-review-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.pv-review-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 10px;
    border: 1px solid #e74c3c;
    border-radius: 20px;
    background: transparent;
    color: #e74c3c;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.02em;
}
.pv-review-delete:hover { background: #e74c3c; color: #fff; }
.pv-review-delete:disabled { opacity: 0.5; cursor: not-allowed; }

/* Review image lightbox */
.pv-img-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.pv-img-lightbox.active { display: flex; }
.pv-img-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    object-fit: contain;
}
.pv-img-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

/* Review form */
.pv-review-form {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--black-10);
}
.pv-review-form-main {
    display: flex;
    align-items: stretch;
    gap: 12px;
}
.pv-review-form-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.pv-review-form-fields textarea {
    width: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    padding: 8px 12px;
    resize: none;
    min-height: 52px;
}
.pv-review-form-fields textarea::placeholder { color: #bbb; }
.pv-form-field-box {
    border: 1px solid var(--black-10);
    border-radius: var(--radius-sm);
    background: var(--black-5);
    transition: border-color 0.15s;
}
.pv-form-field-box:focus-within { border-color: #aaa; background: #fff; }

.pv-review-form-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pv-review-form-stars-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    flex: 1;
    height: 100%;
    min-height: 38px;
}

/* Star rating */
.pv-review-form-stars { display: flex; gap: 1px; }
.pv-star { font-size: 20px; color: #ddd; cursor: pointer; transition: color 0.12s, transform 0.1s; user-select: none; line-height: 1; display: inline-block; }
.pv-star:hover { transform: scale(1.2); }
.pv-star.active { color: #f5a623; }
.pv-star.hover { color: #f9c74f; }
.pv-star.active.hover { color: #f5a623; }
.pv-star-label {
    font-size: 13px;
    color: #bbb;
    flex: 1;
    transition: color 0.15s;
    white-space: nowrap;
}
.pv-star-label.selected { color: #f5a623; font-weight: 600; }

.pv-review-submit-btn { white-space: nowrap; flex-shrink: 0; }

/* Review message */
.pv-review-msg {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: none;
}
.pv-review-msg.error { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6c6; }
.pv-review-msg.success { background: #f0fff4; color: #27ae60; border: 1px solid #b2dfdb; }

/* Review list item meta */
.pv-review-stars-row { display: inline-flex; gap: 1px; margin: 0 6px; vertical-align: middle; }
.pv-review-star { font-size: 13px; color: #ddd; }
.pv-review-star.filled { color: #f5a623; }
.pv-review-date { font-size: 12px; color: #bbb; margin-left: 6px; }

/* Review image upload */
.pv-review-img-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 96px;
    min-height: 96px;
    font-size: 11px;
    color: #aaa;
    cursor: pointer;
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    background: var(--black-5);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    user-select: none;
    overflow: hidden;
    flex-shrink: 0;
    align-self: stretch;
}
.pv-review-img-label i { font-size: 24px; }
.pv-review-img-label:hover { border-color: #999; color: #666; background: #f0f0ec; }

/* Review sign-in prompt */
.pv-review-signin-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid var(--black-10);
    font-size: 14px;
    color: #888;
}
.pv-review-signin-icon { font-size: 16px; color: #bbb; }
.pv-review-signin-prompt a { color: #333; font-weight: 600; text-decoration: underline; }
.pv-review-signin-prompt a:hover { color: #000; }

/* Review empty state */
.pv-review-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
}
.pv-review-empty-icon {
    font-size: 40px;
    color: #ddd;
}
.pv-review-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #999;
}
.pv-review-empty-sub {
    font-size: 13px;
    color: #bbb;
}

/* ===== RELATED PRODUCTS ===== */
.pv-related {
    padding: 40px 0 48px;
}
.pv-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 24px;
}
.pv-related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
@media (max-width: 1200px) { .pv-related-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .pv-related-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .pv-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ===== MOBILE ADJUSTMENTS ===== */
/* .pv-actions responsive → see pv-action-buttons.css */
@media (max-width: 600px) {
    .pv-nutrition { grid-template-columns: 1fr; }
    .pv-price { font-size: 24px; }
}
