/* ============================================
   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 ---------- */
.product {
    padding: 60px 0 80px;
}
.product__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* ---------- GALLERY ---------- */
.product__gallery {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}
.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);
}

/* ---------- 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-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);
}

/* ---------- 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; }
}

@media (max-width: 768px) {
    .product { padding: 32px 0 60px; }
    .product__details-grid { grid-template-columns: 1fr; }
    .product__actions { flex-direction: column; }
    .add-to-cart-btn { width: 100%; }
    .tabs__nav { gap: 0; }
    .tab-btn { padding: 12px 16px; font-size: .85rem; }
    .related__grid { grid-template-columns: 1fr; }
    .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; }
}
