/* ============================================
   ESCAKEKAS — Product Page Styles
   ============================================ */

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    padding: 20px 0;
    margin-top: var(--header-h);
    background: var(--bg-soft);
    border-bottom: 1px solid rgba(45, 27, 105, .06);
}
.breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-lighter);
    flex-wrap: wrap;
}
.breadcrumb__list li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--text-lighter);
}
.breadcrumb__list a {
    color: var(--text-light);
    transition: color var(--transition);
}
.breadcrumb__list a:hover { color: var(--purple); }
.breadcrumb__list li[aria-current="page"] {
    color: var(--text);
    font-weight: 500;
}

/* ---------- PRODUCT SECTION ---------- */
html, body {
    overflow-x: hidden;
}
.product {
    padding: 60px 0 80px;
}
.product__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 100%;
}
.product__info {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ---------- GALLERY ---------- */
.product__gallery {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}
/* Mobile swipe gallery — hidden on desktop */
.gallery__swipe {
    display: none;
}
.gallery__swipe-dots {
    display: none;
}
.gallery__main {
    margin-bottom: 16px;
}
.gallery__main-img {
    position: relative;
    background: linear-gradient(135deg, #f0ebff 0%, #e8f5ff 100%);
    border-radius: var(--radius-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}
.gallery__placeholder {
    font-size: 10rem;
    transition: transform .5s ease;
}
.gallery__main-img:hover .gallery__placeholder {
    transform: scale(1.08);
}
.gallery__zoom-btn {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
    opacity: 0;
}
.gallery__main-img:hover .gallery__zoom-btn { opacity: 1; }
.gallery__zoom-btn:hover { background: #fff; color: var(--purple); }

.product__badge {
    position: absolute;
    top: 16px; left: 16px;
    padding: 6px 16px;
    background: var(--purple);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* Thumbnails */
.gallery__thumbs {
    display: flex;
    gap: 12px;
}
.gallery__thumb {
    width: 80px; height: 80px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f0ebff 0%, #e8f5ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}
.gallery__thumb.active,
.gallery__thumb:hover {
    border-color: var(--purple);
    box-shadow: 0 4px 12px rgba(74, 44, 138, .15);
}
.gallery__thumb--video {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 100%);
    position: relative;
}
.gallery__thumb-play {
    color: #fff;
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.gallery__main-img--video {
    cursor: default;
    position: relative;
    overflow: hidden;
}
.gallery__main-img--video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: inherit;
    overflow: hidden;
}

/* ---------- PRODUCT INFO ---------- */
.product__category {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cyan);
    margin-bottom: 8px;
}
.product__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

/* Rating */
.product__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.stars { color: #f5a623; font-size: 1rem; }
.rating-count {
    font-size: .85rem;
    color: var(--text-light);
}
.rating-divider {
    color: var(--text-lighter);
    font-size: .85rem;
}
.in-stock {
    font-size: .85rem;
    color: #2eb872;
    font-weight: 500;
}

/* Price */
.product__price-box {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
}
.product__price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple);
}
.product__price-old {
    font-size: 1.1rem;
    color: var(--text-lighter);
    text-decoration: line-through;
}
.product__tax {
    font-size: .8rem;
    color: var(--text-lighter);
}

/* Description */
.product__description {
    margin-bottom: 28px;
}
.product__description p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Details grid */
.product__details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}
.detail-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}
.detail-icon { font-size: 1.4rem; }
.detail-item strong {
    display: block;
    font-size: .8rem;
    color: var(--text);
}
.detail-item span {
    font-size: .8rem;
    color: var(--text-light);
}

/* Color options */
.product__option {
    margin-bottom: 28px;
}
.option-label {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.color-options {
    display: flex;
    gap: 10px;
}
.color-swatch {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.color-swatch.active {
    border-color: var(--purple);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--purple);
}
.color-swatch:hover { transform: scale(1.15); }

/* Quantity & Add to cart */
.product__actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid rgba(45, 27, 105, .1);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.qty-btn {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-light);
    transition: var(--transition);
}
.qty-btn:hover { background: var(--bg-soft); color: var(--purple); }
.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: none;
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.add-to-cart-btn {
    flex: 1;
    gap: 10px;
}
.add-to-cart-btn svg { flex-shrink: 0; }

/* Wishlist */
.wishlist-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--text-light);
    padding: 10px 0;
    margin-bottom: 28px;
    transition: var(--transition);
}
.wishlist-btn:hover { color: #e44; }
.wishlist-btn:hover svg { fill: #e44; stroke: #e44; }

/* Guarantees */
.product__guarantees {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
}
.guarantee {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .85rem;
    color: var(--text-light);
}
.guarantee svg { flex-shrink: 0; color: var(--purple); }

/* ---------- TABS ---------- */
.product-tabs {
    padding: 0 0 80px;
}
.tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(45, 27, 105, .08);
    margin-bottom: 40px;
    overflow-x: auto;
}
.tab-btn {
    padding: 16px 28px;
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    white-space: nowrap;
    transition: color var(--transition);
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition);
}
.tab-btn.active { color: var(--purple); font-weight: 600; }
.tab-btn.active::after { opacity: 1; }
.tab-btn:hover { color: var(--purple); }

.tab-panel {
    display: none;
    animation: fadeInUp .4s ease;
}
.tab-panel.active { display: block; }

/* Tab: Description */

/* Tab: Video */
.tab-video__wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}
.tab-video__wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    border: none;
}
.tab-video__wrapper blockquote {
    margin: 0 auto !important;
}

.tab-description h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 16px;
}
.tab-description h4 {
    font-size: 1rem;
    margin: 24px 0 12px;
}
.tab-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 12px;
}
.tab-description ul {
    margin: 0 0 16px 20px;
    list-style: disc;
}
.tab-description li {
    color: var(--text-light);
    line-height: 1.8;
    padding-left: 4px;
}

/* Tab: Details table */
.tab-details-table table {
    width: 100%;
    border-collapse: collapse;
}
.tab-details-table tr {
    border-bottom: 1px solid rgba(45, 27, 105, .06);
}
.tab-details-table th,
.tab-details-table td {
    padding: 14px 16px;
    text-align: left;
    font-size: .9rem;
}
.tab-details-table th {
    width: 200px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-soft);
}
.tab-details-table td {
    color: var(--text-light);
}

/* Tab: Shipping */
.shipping-option {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.shipping-icon { font-size: 2rem; }
.shipping-option h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.shipping-option p {
    font-size: .9rem;
    color: var(--text-light);
}
.shipping-note {
    margin-top: 20px;
    font-size: .85rem;
    color: var(--text-lighter);
    font-style: italic;
}

/* Tab: Reviews */
.reviews__summary {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 32px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
}
.reviews__score {
    text-align: center;
}
.score-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--purple);
    display: block;
}
.score-stars {
    color: #f5a623;
    font-size: 1.2rem;
    margin: 4px 0;
}
.score-count {
    font-size: .85rem;
    color: var(--text-light);
}
.reviews__bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .85rem;
    color: var(--text-light);
}
.bar-row > span:first-child { width: 30px; text-align: right; }
.bar-row > span:last-child { width: 24px; }
.bar {
    flex: 1;
    height: 8px;
    background: rgba(45, 27, 105, .08);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Individual reviews */
.reviews__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.review {
    padding: 28px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}
.review__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.review__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}
.review__header strong { display: block; }
.review__date {
    font-size: .8rem;
    color: var(--text-lighter);
}
.review__stars {
    margin-left: auto;
    color: #f5a623;
    font-size: .9rem;
}
.review__text {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 12px;
}
.review__verified {
    font-size: .8rem;
    color: #2eb872;
    font-weight: 500;
}

/* ---------- RELATED PRODUCTS ---------- */
.related {
    padding: 80px 0 100px;
    background: var(--bg-soft);
}
.related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.related .product-card__name a {
    transition: color var(--transition);
}
.related .product-card__name a:hover {
    color: var(--purple);
}
.related__dots {
    display: none;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox__content {
    max-width: 80vw;
    max-height: 80vh;
    font-size: 15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(.9);
    transition: transform .4s ease;
}
.lightbox.active .lightbox__content {
    transform: scale(1);
}
.lightbox__close {
    position: absolute;
    top: 24px; right: 24px;
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transition: var(--transition);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .2); }
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

/* ---------- ADDED TO CART NOTIFICATION ---------- */
.cart-notification {
    position: fixed;
    top: calc(var(--header-h) + 16px);
    right: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1500;
    transform: translateX(120%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    max-width: 360px;
}
.cart-notification.show {
    transform: translateX(0);
}
.cart-notification__icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #d4ffd8, #b8f5c0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.cart-notification__text strong { display: block; margin-bottom: 2px; }
.cart-notification__text span { font-size: .85rem; color: var(--text-light); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .product__inner { grid-template-columns: 1fr; gap: 40px; }
    .product__gallery { position: static; }
    .related__grid { grid-template-columns: repeat(2, 1fr); }
    .reviews__summary { grid-template-columns: 1fr; text-align: center; }
    .related { position: relative; }
}

@media (max-width: 768px) {
    .product { padding: 32px 0 60px; }
    /* Hide desktop gallery, show swipe */
    .gallery__main { display: none; }
    .gallery__thumbs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        margin-top: 10px;
    }
    .gallery__thumbs::-webkit-scrollbar { display: none; }
    .gallery__thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        font-size: 1.6rem;
    }
    .gallery__swipe {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: var(--radius-lg);
        aspect-ratio: 1;
    }
    .gallery__swipe::-webkit-scrollbar { display: none; }
    .gallery__swipe-slide {
        flex: 0 0 100%;
        scroll-snap-align: start;
        position: relative;
        aspect-ratio: 1;
        overflow: hidden;
        border-radius: var(--radius-lg);
    }
    .gallery__swipe-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .gallery__swipe-slide--video {
        background: #000;
        position: relative;
        overflow: hidden;
    }
    .gallery__video-expand {
        position: absolute;
        bottom: 12px;
        right: 12px;
        z-index: 5;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: rgba(0,0,0,.55);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        backdrop-filter: blur(4px);
        transition: background .2s;
    }
    .gallery__video-expand:active {
        background: rgba(0,0,0,.8);
    }
    .gallery__swipe-slide--video iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none;
        border-radius: inherit;
        overflow: hidden;
    }
    .gallery__swipe-dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 10px;
    }
    .gallery__swipe-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: none;
        background: var(--text-light);
        opacity: .3;
        cursor: pointer;
        padding: 0;
        transition: opacity .3s, transform .3s, background .3s;
    }
    .gallery__swipe-dot.active {
        opacity: 1;
        background: var(--purple);
        transform: scale(1.3);
    }
    .gallery__swipe-dot--video {
        position: relative;
    }
    .product__details-grid { grid-template-columns: repeat(2, 1fr); }
    .product__actions { flex-direction: column; }
    .add-to-cart-btn { width: 100%; }
    .tabs__nav { gap: 0; }
    .tab-btn { padding: 12px 16px; font-size: .85rem; }
    .tab-details-table { overflow-x: auto; }
    .tab-details-table th { width: 120px; }
    .reviews__summary { padding: 20px; }
    .review { padding: 20px; }
    .shipping-option { flex-direction: column; text-align: center; padding: 20px; }
    .related__grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding-bottom: 16px;
        scrollbar-width: none;
    }
    .related__grid::-webkit-scrollbar { display: none; }
    .related__grid > .product-card {
        flex: 0 0 75vw;
        max-width: 75vw;
        scroll-snap-align: center;
    }
    .related__dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }
    .related__dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: none;
        background: var(--text-light);
        opacity: .35;
        cursor: pointer;
        padding: 0;
        transition: opacity .3s, transform .3s;
    }
    .related__dot.active {
        opacity: 1;
        background: var(--purple);
        transform: scale(1.3);
    }
    .gallery__thumb { width: 64px; height: 64px; font-size: 1.8rem; }
    .tab-details-table th { width: 140px; }
}

@media (max-width: 480px) {
    .gallery__thumbs { gap: 8px; }
    .gallery__thumb { width: 56px; height: 56px; }
    .product__price { font-size: 1.6rem; }
}

/* ---------- FLOATING BOTTOM BAR (MOBILE) ---------- */
.product-sticky-bar {
    display: none;
}
@media (max-width: 768px) {
    .product-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 16px;
        background: #fff;
        box-shadow: 0 -2px 16px rgba(0,0,0,.12);
        transform: translateY(100%);
        transition: transform .35s ease;
    }
    .product-sticky-bar.visible {
        transform: translateY(0);
    }
    .product-sticky-bar__fav {
        flex: 0 0 auto;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 2px solid var(--purple, #7c3aed);
        background: #fff;
        color: var(--purple, #7c3aed);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background .25s, color .25s;
    }
    .product-sticky-bar__fav.active {
        background: var(--purple, #7c3aed);
        color: #fff;
    }
    .product-sticky-bar__fav.active svg {
        fill: #fff;
        stroke: #fff;
    }
    .product-sticky-bar__cart {
        flex: 1;
        height: 48px;
        border: none;
        border-radius: 12px;
        background: var(--purple, #7c3aed);
        color: #fff;
        font-size: .95rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: background .25s;
    }
    .product-sticky-bar__cart:active {
        background: var(--purple-dark, #5b21b6);
    }
    .product-sticky-bar__cart:disabled {
        opacity: .5;
        cursor: not-allowed;
    }
    .footer {
        padding-bottom: 72px;
    }
}
