/* =============================================
   product-detail.css
   Tiệm Hoa Xinh — Mobile-first product page
   ============================================= */

/* ---- CSS Variables ---- */
:root {
    --pink:        #e8748a;
    --pink-dark:   #d45c74;
    --pink-light:  #fce8ec;
    --pink-soft:   #fff0f3;
    --pink-outline:#f7c5cf;
    --gold:        #f59e0b;
    --gray-50:     #fafafa;
    --gray-100:    #f4f4f5;
    --gray-200:    #e4e4e7;
    --gray-400:    #a1a1aa;
    --gray-500:    #71717a;
    --gray-700:    #3f3f46;
    --gray-900:    #18181b;
    --white:       #ffffff;
    --font:        'Be Vietnam Pro', sans-serif;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,.12);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.16);
    --transition:  0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

img { max-width: 100%; height: auto; display: block; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

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

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
    padding: 10px 0;
    font-size: clamp(11px, 3vw, 13px);
    color: var(--gray-500);
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}
.breadcrumb .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--pink); }
.breadcrumb-sep { color: var(--gray-400); font-size: 12px; }
.breadcrumb-current { color: var(--pink); font-weight: 500; }

/* =============================================
   PRODUCT SECTION
   ============================================= */
.product-section { padding: 16px 0 0; }

.product-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- Gallery ---- */
.product-gallery-wrap { width: 100%; }

.gallery-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Thumbnails — left column */
.gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    width: clamp(52px, 14vw, 72px);
}

.thumb-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color var(--transition);
    padding: 0;
}
.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.thumb-btn.active,
.thumb-btn:hover { border-color: var(--pink); }

/* Hidden thumbnails beyond limit */
.thumb-hidden { display: none; }

/* "Xem thêm" thumbnail button */
.thumb-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7f0f4;
    border: 2px dashed #e8748a;
    gap: 2px;
    cursor: pointer;
}
.thumb-more-btn:hover { background: #fce8ef; border-style: solid; }
.thumb-more-count {
    font-size: 15px;
    font-weight: 700;
    color: #e8748a;
    line-height: 1;
}
.thumb-more-label {
    font-size: 10px;
    color: #c05272;
    line-height: 1.3;
    text-align: center;
}

/* Video thumb */
.thumb-video { position: relative; }
.thumb-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: rgba(0,0,0,.35);
    border-radius: 6px;
    pointer-events: none;
}

/* TikTok thumb */
.thumb-tiktok { background: #010101; }
.thumb-tiktok-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Main image */
.gallery-main {
    flex: 1;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-50);
}

.gallery-zoom-btn {
    display: block;
    width: 100%;
    padding: 0;
    position: relative;
    cursor: zoom-in;
}
.gallery-zoom-btn img {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-zoom-btn:hover img { transform: scale(1.03); }

.zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,.85);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    opacity: 0;
    transition: opacity var(--transition);
}
.gallery-zoom-btn:hover .zoom-hint { opacity: 1; }

.gallery-watermark {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255,255,255,.7);
    pointer-events: none;
    letter-spacing: .5px;
}

/* Trust badges */
.gallery-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}
.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    font-size: clamp(9px, 2.5vw, 11px);
    color: var(--gray-500);
    font-weight: 500;
}
.trust-item svg { flex-shrink: 0; }

/* ---- Product Info ---- */
.product-info { width: 100%; }

/* Badges */
.product-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.badge-primary { background: var(--pink); color: white; }
.badge-outline  { border: 1.5px solid var(--pink); color: var(--pink); background: transparent; }

/* Title */
.product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.product-title {
    font-size: clamp(16px, 4.5vw, 22px);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
    flex: 1;
}

.btn-wishlist {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--pink-outline);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 2px;
}
.btn-wishlist:hover,
.btn-wishlist.active { background: var(--pink-soft); border-color: var(--pink); }
.btn-wishlist.active svg { fill: var(--pink); }

/* Rating */
.product-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 13px;
}
.rating-score { font-weight: 700; color: var(--gray-700); }
.stars { display: flex; gap: 1px; }
.stars-lg { gap: 2px; }
.rating-count { color: var(--gray-500); }
.product-sku { margin-left: auto; color: var(--gray-500); font-size: 12px; }

/* Price */
.product-price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.price-current {
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 800;
    color: var(--pink);
    letter-spacing: -.5px;
}
.price-old {
    font-size: clamp(13px, 3.5vw, 15px);
    color: var(--gray-400);
    text-decoration: line-through;
}
.price-badge {
    background: #ff4d6d;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Short description */
.product-short-desc {
    font-size: clamp(13px, 3.5vw, 14px);
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 18px;
}

/* Option groups */
.product-option-group {
    margin-bottom: 16px;
}
.option-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    color: var(--gray-700);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Fix float collapse: custom.css set float:left trên .mausac_detail khiến
   .product-option-group phía sau trôi lên đè lên variant buttons */
.mausac_detail {
    float: none !important;
    overflow: hidden;    /* tạo BFC để chứa floated children cũ */
    width: 100%;
    margin-bottom: 16px;
}

/* Override custom.css variant button styles để match design system */
.mausac_detail ul.ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.mausac_detail ul.ul li {
    float: none;
    margin: 0;
    padding: 8px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition);
    user-select: none;
    list-style: none;
}
.mausac_detail ul.ul li:hover {
    border-color: var(--pink);
    color: var(--pink);
}
.mausac_detail ul.ul li.active {
    border-color: var(--pink) !important;
    background: var(--pink-soft) !important;
    color: var(--pink) !important;
    font-weight: 700;
}
.mausac_detail ul.ul.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.mausac_detail label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    color: var(--gray-700);
    margin-bottom: 8px;
    text-transform: uppercase;
    float: none;
}
.mausac_detail {
    margin-bottom: 16px;
}

/* Size buttons */
.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.size-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all var(--transition);
    cursor: pointer;
}
.size-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}
.size-sub {
    font-size: 11px;
    color: var(--gray-400);
}
.size-btn.active,
.size-btn:hover {
    border-color: var(--pink);
    background: var(--pink-soft);
}
.size-btn.active .size-name { color: var(--pink); }

/* Dropdown select */
.select-wrap {
    position: relative;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 46px;
    transition: border-color var(--transition);
}
.select-wrap:focus-within { border-color: var(--pink); }
.select-icon { flex-shrink: 0; margin-right: 10px; }
.select-wrap select {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font);
    font-size: 14px;
    color: var(--gray-700);
    appearance: none;
    cursor: pointer;
}
.select-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: var(--gray-400);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.service-item:hover,
.service-item:has(input:checked) {
    border-color: var(--pink);
    background: var(--pink-soft);
}
.service-item input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.service-check {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-item:has(input:checked) .service-check {
    background: var(--pink);
    border-color: var(--pink);
}
.service-item:has(input:checked) .service-check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}
.service-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.service-text {
    font-size: clamp(11px, 3vw, 13px);
    color: var(--gray-700);
    line-height: 1.3;
}

/* Quantity */
.qty-row { display: flex; align-items: center; gap: 16px; }
.qty-row .option-label { margin-bottom: 0; white-space: nowrap; }
.qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 40px;
}
.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    color: var(--gray-700);
    transition: background var(--transition);
    flex-shrink: 0;
}
.qty-btn:hover { background: var(--pink-light); color: var(--pink); }
.qty-control input {
    width: 48px;
    height: 100%;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-left: 1.5px solid var(--gray-200);
    border-right: 1.5px solid var(--gray-200);
    outline: none;
    font-family: var(--font);
    color: var(--gray-900);
}

/* CTA buttons */
.product-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.btn-cart {
    width: 100%;
    height: 52px;
    background: var(--pink);
    color: white;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background var(--transition), transform 0.15s;
    position: relative;
    overflow: hidden;
}
.btn-cart::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}
.btn-cart:hover { background: var(--pink-dark); transform: translateY(-1px); }
.btn-cart:active { transform: translateY(0); }

.btn-buynow {
    width: 100%;
    height: 52px;
    background: white;
    color: var(--pink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    border-radius: var(--radius-md);
    border: 2px solid var(--pink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    transition: all var(--transition);
}
.btn-buynow small {
    font-size: 11px;
    font-weight: 400;
    color: var(--gray-500);
    letter-spacing: 0;
}
.btn-buynow:hover { background: var(--pink-soft); }

/* =============================================
   BENEFITS BAR
   ============================================= */
.benefits-bar {
    margin: 20px 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 0;
}
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.benefit-item svg { flex-shrink: 0; margin-top: 2px; }
.benefit-item div { display: flex; flex-direction: column; gap: 2px; }
.benefit-item strong {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.benefit-item span {
    font-size: clamp(10px, 2.8vw, 12px);
    color: var(--gray-500);
    line-height: 1.4;
}

/* =============================================
   REVIEWS + BOUGHT SECTION
   ============================================= */
.reviews-bought-section { padding: 0 0 24px; }
.reviews-bought-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section-title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 10px;
    border-bottom: 2px solid var(--gray-100);
}

/* Reviews */
.reviews-panel { }
.reviews-panel:only-child { margin: 0 auto; width: 100%; max-width: 560px; }
.reviews-summary {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.review-score-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    gap: 4px;
}
.score-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--gray-900);
    line-height: 1;
    letter-spacing: -2px;
}
.score-of { font-size: 20px; color: var(--gray-400); margin-top: -8px; }
.score-total { font-size: 12px; color: var(--gray-400); text-align: center; }

.review-bars { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 6px; }
.review-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bar-star { font-size: 12px; color: var(--gray-500); width: 8px; text-align: right; }
.bar-track {
    flex: 1;
    height: 8px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 99px;
    transition: width 1s ease;
}
.bar-count { font-size: 12px; color: var(--gray-400); width: 24px; text-align: right; }

/* Review items */
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-item {
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
}
.review-item--hidden { display: none; }
.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.reviewer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pink);
    color: white;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.reviewer-info { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; flex-wrap: wrap; }
.reviewer-name { font-weight: 600; font-size: 12px; color: var(--gray-900); }
.verified-badge {
    font-size: 10px;
    background: #e6f7ee;
    color: #16a34a;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 600;
}
.review-stars-inline { display: flex; gap: 1px; align-items: center; }
.review-date { margin-left: auto; font-size: 10px; color: var(--gray-400); white-space: nowrap; }
.review-stars { display: flex; gap: 1px; margin-bottom: 4px; }
.review-comment {
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn-reviews-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.btn-reviews-toggle:hover { background: var(--gray-50); color: var(--pink); }

/* =============================================
   REVIEWS DRAWER
   ============================================= */
.rv-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    visibility: hidden;
}
.rv-drawer.open {
    pointer-events: auto;
    visibility: visible;
}
.rv-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .28s ease;
}
.rv-drawer.open .rv-drawer__backdrop { opacity: 1; }

/* Panel: slides up from bottom on mobile, slides in from right on desktop */
.rv-drawer__panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 88dvh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.32,1,.28,1);
    will-change: transform;
    overflow: hidden;
}
.rv-drawer.open .rv-drawer__panel { transform: translateY(0); }

.rv-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}
.rv-drawer__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 15px;
    color: var(--gray-900);
}
.rv-drawer__count {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 400;
}
.rv-drawer__close {
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
    flex-shrink: 0;
    transition: background .15s;
}
.rv-drawer__close:hover { background: var(--gray-200); }

.rv-drawer__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px 18px 20px;
}
.rv-drawer__list { display: flex; flex-direction: column; gap: 12px; }

/* Individual review card inside drawer */
.rv-review-item {
    padding: 12px 14px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}
.rv-review-item__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.rv-review-item__info { flex: 1; min-width: 0; }
.rv-review-item__name { font-weight: 600; font-size: 13px; color: var(--gray-900); display: block; }
.rv-review-item__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.rv-review-item__stars { display: flex; gap: 1px; }
.rv-review-item__date { font-size: 11px; color: var(--gray-400); }
.rv-review-item__comment { font-size: 13px; color: var(--gray-700); line-height: 1.6; margin: 0; }

/* Loader dots */
.rv-drawer__loader {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 8px;
}
.rv-drawer__loader span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--pink);
    animation: rv-bounce .8s infinite alternate;
}
.rv-drawer__loader span:nth-child(2) { animation-delay: .2s; }
.rv-drawer__loader span:nth-child(3) { animation-delay: .4s; }
@keyframes rv-bounce { from { opacity:.3; transform: scale(.75); } to { opacity:1; transform: scale(1); } }

.rv-drawer__end { text-align: center; font-size: 12px; color: var(--gray-400); padding: 16px 0 4px; margin: 0; }

/* Desktop: right-side panel */
@media (min-width: 860px) {
    .rv-drawer__panel {
        left: auto;
        bottom: 0; top: 0;
        width: 400px;
        height: 100%;
        border-radius: 0;
        transform: translateX(100%);
    }
    .rv-drawer.open .rv-drawer__panel { transform: translateX(0); }
}
.link-see-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--pink);
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    transition: gap var(--transition);
}
.link-see-all:hover { gap: 8px; }

/* Bought together — horizontal slider */
.bought-slider-wrap {
    position: relative;
}
.bought-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 2px;
}
.bought-grid::-webkit-scrollbar { display: none; }
.bought-card {
    flex: 0 0 calc(50% - 6px);
    scroll-snap-align: start;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    transition: box-shadow var(--transition);
}
.bought-card:hover { box-shadow: var(--shadow-md); }

.slider-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    flex-shrink: 0;
}
.slider-btn:hover { border-color: var(--pink); color: var(--pink); box-shadow: var(--shadow-md); }
.slider-btn-prev { left: -17px; }
.slider-btn-next { right: -17px; }
.bought-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-50);
}
.bought-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.bought-card:hover .bought-img-wrap img { transform: scale(1.05); }
.card-wishlist {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 1;
}
.card-wishlist:hover { background: var(--pink-soft); }
.card-wishlist.active svg { fill: var(--pink); }

.bought-info { padding: 10px; }
.bought-name {
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bought-price { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.price-current-sm {
    font-size: clamp(13px, 3.5vw, 15px);
    font-weight: 700;
    color: var(--pink);
}
.price-old-sm {
    font-size: clamp(10px, 2.8vw, 12px);
    color: var(--gray-400);
    text-decoration: line-through;
}
.btn-add-small {
    width: 100%;
    height: 34px;
    border: 1.5px solid var(--pink);
    border-radius: var(--radius-sm);
    color: var(--pink);
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 600;
    font-family: var(--font);
    transition: all var(--transition);
}
.btn-add-small:hover { background: var(--pink); color: white; }

/* =============================================
   RELATED PRODUCTS
   ============================================= */
.related-section { padding: 0 0 100px; }

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}
.section-title-row .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.slider-nav-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.slider-nav-btn {
    width: 32px;
    height: 32px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all var(--transition);
}
.slider-nav-btn:hover { border-color: var(--pink); color: var(--pink); box-shadow: var(--shadow-sm); }

.related-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 2px;
}
.related-grid::-webkit-scrollbar { display: none; }

.product-card {
    flex: 0 0 calc(50% - 6px);
    scroll-snap-align: start;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    transition: box-shadow var(--transition), transform var(--transition);
    opacity: 0;
    transform: translateY(20px);
}
.product-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s, border-color 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-md); }

.card-img-link { display: block; }
.card-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-50);
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-body { padding: 10px; }
.card-name {
    font-size: clamp(11px, 3vw, 16px);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-price { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* =============================================
   CONTENT PRODUCT SECTION
   ============================================= */
.content-products-section {
    padding: 0 0 48px;
}
.content-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.content-product-item {
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.content-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gray-900);
    padding: 14px 20px;
    margin: 0;
    border-bottom: 2px solid var(--pink-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--pink);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Collapsible wrapper */
.content-body-wrap {
    position: relative;
    overflow: hidden;
    max-height: 260px;
    transition: max-height .45s cubic-bezier(.4,0,.2,1);
}
.content-body-wrap.expanded {
    max-height: 9999px;
    transition: max-height .6s cubic-bezier(.4,0,.2,1);
}
.content-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    transition: opacity .3s;
}
.content-body-wrap.expanded .content-fade { opacity: 0; }

.btn-content-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 20px;
    border-top: 1px solid var(--gray-100);
    color: var(--pink);
    font-size: 13px;
    font-weight: 600;
    background: var(--pink-soft);
    cursor: pointer;
    transition: background .15s;
}
.btn-content-toggle:hover { background: var(--pink-light); }
.btn-content-icon {
    flex-shrink: 0;
    transition: transform .3s ease;
}
.btn-content-toggle.open .btn-content-icon { transform: rotate(180deg); }

/* Rich HTML content area */
.content-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-700);
}
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
    color: var(--gray-900);
    font-weight: 700;
    margin: 1.4em 0 .5em;
    line-height: 1.4;
}
.content-body h2 { font-size: 16px; }
.content-body h3 { font-size: 15px; }
.content-body h4 { font-size: 14px; }
.content-body p  { margin: 0 0 .9em; }
.content-body p:last-child { margin-bottom: 0; }
.content-body ul,
.content-body ol {
    margin: 0 0 .9em 1.4em;
    padding: 0;
}
.content-body li { margin-bottom: .35em; }
.content-body strong { color: var(--gray-900); }
.content-body em    { color: var(--gray-700); }
.content-body a {
    color: var(--pink);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.content-body a:hover { color: var(--pink-dark); }
.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 8px 0;
    display: block;
}
.content-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: .9em 0;
}
.content-body th,
.content-body td {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    text-align: left;
    vertical-align: top;
}
.content-body th {
    background: var(--pink-soft);
    color: var(--gray-900);
    font-weight: 600;
}
.content-body tr:nth-child(even) td { background: var(--gray-50); }
.content-body blockquote {
    margin: .9em 0;
    padding: 12px 16px;
    border-left: 3px solid var(--pink);
    background: var(--pink-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--gray-700);
    font-style: italic;
}
.content-body hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1.2em 0;
}

@media (min-width: 860px) {
    .content-products-grid {
        grid-template-columns: 1fr;
    }
    .content-body { padding: 24px 28px; }
    .content-title { padding: 16px 28px; }
}

/* =============================================
   LIGHTBOX (SPA Zoom View)
   ============================================= */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.lightbox-backdrop.open { opacity: 1; pointer-events: auto; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-content {
    max-width: min(90vw, 700px);
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
     border-radius: var(--radius-md);
}
.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.lb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    transition: all var(--transition);
}
.lb-dot.active {
    background: white;
    transform: scale(1.3);
}

/* =============================================
   STICKY MOBILE BAR
   ============================================= */
.sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 10px;
}
.sticky-cart, .sticky-buy {
    flex: 1;
    height: 46px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition);
}
.sticky-cart {
    background: var(--pink-light);
    color: var(--pink);
    border: 1.5px solid var(--pink);
}
.sticky-cart:hover { background: var(--pink); color: white; }
.sticky-buy {
    background: var(--pink);
    color: white;
}
.sticky-buy:hover { background: var(--pink-dark); }

/* =============================================
   VIEW TRANSITIONS API
   ============================================= */
@supports (view-transition-name: none) {
    ::view-transition-old(main-product-image) {
        animation: 0.35s cubic-bezier(0.4, 0, 0.2, 1) both vt-zoom-out;
    }
    ::view-transition-new(main-product-image) {
        animation: 0.35s cubic-bezier(0.4, 0, 0.2, 1) both vt-zoom-in;
    }
    @keyframes vt-zoom-out {
        from { opacity: 1; transform: scale(1); }
        to   { opacity: 0; transform: scale(0.92); }
    }
    @keyframes vt-zoom-in {
        from { opacity: 0; transform: scale(1.08); }
        to   { opacity: 1; transform: scale(1); }
    }
    ::view-transition-old(lightbox-img) {
        animation: 0.4s ease both lb-out;
    }
    ::view-transition-new(lightbox-img) {
        animation: 0.4s ease both lb-in;
    }
    @keyframes lb-out { from { opacity:1; } to { opacity:0; } }
    @keyframes lb-in  { from { opacity:0; transform: scale(0.95); } to { opacity:1; transform: scale(1); } }
}

/* =============================================
   TABLET 640px+
   ============================================= */
@media (min-width: 640px) {
    .benefits-grid { grid-template-columns: repeat(4, 1fr); }
    .bought-card { flex: 0 0 calc(33.333% - 8px); }
    .slider-btn { display: flex; }
    .product-card { flex: 0 0 calc(33.333% - 8px); }
    .gallery-thumbs { width: 80px; }
}

/* =============================================
   DESKTOP 960px+
   ============================================= */
@media (min-width: 960px) {
    .container { padding: 0 24px; }
    .product-section { padding: 24px 0 0; }

    .product-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }
    .product-gallery-wrap {
        width: 580px;
        flex-shrink: 0;
        position: sticky;
        top: 24px;
    }
    .product-info { flex: 1; }

    .gallery-thumbs { width: 72px; }
    .gallery-zoom-btn img { aspect-ratio: 1 / 1.1; }

    .trust-item { font-size: 11px; }

    .reviews-bought-grid {
        flex-direction: row;
        align-items: flex-start;
        background-color: #ffffff;
        padding: 15px;
        border-radius: 10px;
    }
    .reviews-panel { flex: 0 0 560px; }
    .bought-panel { flex: 1; }
    .bought-card { flex: 0 0 calc(33.333% - 8px); }

    .product-card { flex: 0 0 calc(20% - 10px); }

    .product-cta { flex-direction: column; }

    /* Hide sticky bar on desktop — CTAs are visible */
    .sticky-bar { display: none !important; }
}

/* =============================================
   MOBILE — Show sticky bar
   ============================================= */
@media (max-width: 959px) {
    .sticky-bar { display: flex; }
    .related-section { padding-bottom: 80px; }
}

/* =============================================
   UTILITY ANIMATIONS
   ============================================= */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.product-info > * {
    animation: fadeSlideUp 0.4s ease both;
    list-style: none !important;
}
.product-info > *:nth-child(1) { animation-delay: 0.05s; }
.product-info > *:nth-child(2) { animation-delay: 0.10s; }
.product-info > *:nth-child(3) { animation-delay: 0.15s; }
.product-info > *:nth-child(4) { animation-delay: 0.20s; }
.product-info > *:nth-child(5) { animation-delay: 0.25s; }

/* =============================================
   FEEDBACK PHOTOS SLIDER
   ============================================= */
.feedback-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.feedback-grid::-webkit-scrollbar { display: none; }

.feedback-photo-card {
    flex: 0 0 calc(33.333% - 8px);
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    background: var(--gray-100);
    aspect-ratio: 3 / 4;
}
.feedback-photo-card .feedback-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.feedback-photo-card:hover .feedback-thumb { transform: scale(1.05); }
.feedback-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.feedback-photo-card:hover .feedback-overlay { opacity: 1; }

/* Lightbox */
.fb-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.fb-lightbox.is-open { display: flex; }

.fb-lb-img-wrap {
    position: relative;
    max-width: min(90vw, 600px);
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#fbLbImg {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 10px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    display: block;
}
#fbLbImg.is-loading { opacity: 0; }

.fb-lb-loader {
    display: none;
    position: absolute;
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fbSpin 0.7s linear infinite;
}
.fb-lb-loader.is-active { display: block; }
@keyframes fbSpin { to { transform: rotate(360deg); } }

.fb-lb-close {
    position: fixed;
    top: 16px; right: 18px;
    background: rgba(255,255,255,0.15);
    border: none; border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
    z-index: 10001;
}
.fb-lb-close:hover { background: rgba(255,255,255,0.28); }

.fb-lb-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none; border-radius: 50%;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
    z-index: 10001;
}
.fb-lb-nav:hover { background: rgba(255,255,255,0.3); }
.fb-lb-prev { left: 14px; }
.fb-lb-next { right: 14px; }
.fb-lb-nav:disabled { opacity: 0.3; pointer-events: none; }

.fb-lb-counter {
    position: fixed;
    bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    letter-spacing: 0.5px;
}

@media (min-width: 960px) {
    .feedback-photo-card { flex: 0 0 calc(25% - 8px); }
}
