/*
 * Product Detail Page Styles — Premium two-column editorial layout
 */

.wishly-product-detail {
    padding: var(--w-space-10) 0 var(--w-space-24);
}

/* ── Two-column layout: 55 / 45 split ─────────────────────────── */
.wishly-product-detail__layout {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: var(--w-space-16);
    align-items: start;
}

/* ── Image column ──────────────────────────────────────────────── */
.wishly-product-detail__image-col {
    position: sticky;
    top: calc(var(--w-header-height) + var(--w-space-6));
}

.wishly-product-detail__image {
    aspect-ratio: 4 / 5;
    background: var(--w-gradient-card);
    border-radius: var(--w-radius-3xl);
    border: 1px solid var(--w-border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(124,58,237,0.12),
        0 32px 64px rgba(0,0,0,0.4),
        0 0 80px rgba(124,58,237,0.1);
}

.wishly-product-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}

.wishly-product-detail__image:hover img {
    transform: scale(1.04);
}

/* Rarity glow overlay on image */
.wishly-product-detail__image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.5) 0%,
        transparent 50%
    );
}

/* Wish count pill overlaid on bottom of image */
.wishly-product-detail__image-badge {
    position: absolute;
    bottom: var(--w-space-4);
    left: var(--w-space-4);
    z-index: 2;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--w-radius-full);
    padding: var(--w-space-2) var(--w-space-4);
    font-size: var(--w-text-sm);
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: var(--w-space-2);
}

/* ── Info column ───────────────────────────────────────────────── */
.wishly-product-detail__info {
    display: flex;
    flex-direction: column;
    gap: var(--w-space-6);
    padding-top: var(--w-space-2);
}

/* ── Top meta: badge + category ────────────────────────────────── */
.wishly-product-detail__meta {
    display: flex;
    align-items: center;
    gap: var(--w-space-3);
    flex-wrap: wrap;
}

.wishly-product-detail__category-tag {
    font-size: var(--w-text-sm);
    color: var(--w-text-tertiary);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Product name ───────────────────────────────────────────────── */
.wishly-product-detail__name {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--w-text-primary);
    margin: 0;
}

/* ── Description ────────────────────────────────────────────────── */
.wishly-product-detail__description {
    font-size: var(--w-text-base);
    color: var(--w-text-secondary);
    line-height: var(--w-leading-relaxed);
    margin: 0;
}

/* ── Inline stats row ───────────────────────────────────────────── */
.wishly-product-detail__stats-row {
    display: flex;
    gap: var(--w-space-3);
    flex-wrap: wrap;
}

.wishly-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--w-space-3) var(--w-space-5);
    background: var(--w-bg-card);
    border: 1px solid var(--w-border-primary);
    border-radius: var(--w-radius-xl);
    gap: var(--w-space-1);
    flex: 1;
    min-width: 80px;
}

.wishly-stat-chip__value {
    font-size: var(--w-text-xl);
    font-weight: 800;
    line-height: 1;
}

.wishly-stat-chip__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--w-text-tertiary);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Rewards (XP / Coins / Journey) ────────────────────────────── */
.wishly-product-detail__rewards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--w-space-3);
}

.wishly-reward-preview {
    padding: var(--w-space-4);
    background: var(--w-bg-card);
    border: 1px solid var(--w-border-primary);
    border-radius: var(--w-radius-xl);
    text-align: center;
}

.wishly-reward-preview__value {
    font-size: var(--w-text-2xl);
    font-weight: 800;
}

.wishly-reward-preview__label {
    font-size: 10px;
    color: var(--w-text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--w-tracking-wider);
    margin-top: var(--w-space-1);
    font-weight: 600;
}

/* ── Journey preview card ───────────────────────────────────────── */
.wishly-journey-preview {
    padding: var(--w-space-5) var(--w-space-6);
    background: var(--w-bg-card);
    border: 1px solid var(--w-border-primary);
    border-radius: var(--w-radius-2xl);
}

.wishly-journey-preview__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--w-text-tertiary);
    margin-bottom: var(--w-space-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wishly-journey-preview__detail {
    display: flex;
    align-items: flex-start;
    gap: var(--w-space-3);
    padding: var(--w-space-2) 0;
    font-size: var(--w-text-sm);
    color: var(--w-text-secondary);
    line-height: var(--w-leading-relaxed);
}

.wishly-journey-preview__detail + .wishly-journey-preview__detail {
    border-top: 1px solid var(--w-border-primary);
}

.wishly-journey-preview__detail svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}

/* ── Specifications ─────────────────────────────────────────────── */
.wishly-product-detail__specs {
    padding: var(--w-space-5) var(--w-space-6);
    background: var(--w-bg-secondary);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-2xl);
}

.wishly-product-detail__specs-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--w-text-tertiary);
    margin-bottom: var(--w-space-4);
}

.wishly-product-detail__specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--w-space-3);
}

.wishly-spec-item {
    display: flex;
    flex-direction: column;
    gap: var(--w-space-1);
    padding: var(--w-space-3);
    background: var(--w-bg-tertiary);
    border-radius: var(--w-radius-lg);
    border: 1px solid var(--w-border);
}

.wishly-spec-item__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--w-text-tertiary);
    font-weight: 600;
}

.wishly-spec-item__value {
    font-size: var(--w-text-sm);
    color: var(--w-text-primary);
    font-weight: 600;
}

/* ── CTA area ───────────────────────────────────────────────────── */
.wishly-product-detail__action {
    display: flex;
    flex-direction: column;
    gap: var(--w-space-3);
}

.wishly-product-detail__cta-note {
    display: flex;
    align-items: center;
    gap: var(--w-space-2);
    font-size: var(--w-text-sm);
    color: var(--w-text-tertiary);
    justify-content: center;
}

/* ── Comments ───────────────────────────────────────────────────── */
.wishly-product-detail__comments {
    padding-top: var(--w-space-6);
    border-top: 1px solid var(--w-border);
}

.wishly-product-detail__comments-title {
    font-size: var(--w-text-lg);
    font-weight: 700;
    margin-bottom: var(--w-space-4);
    color: var(--w-text-primary);
}

.wishly-comment {
    padding: var(--w-space-4);
    border-bottom: 1px solid var(--w-border);
}

.wishly-comment:last-child {
    border-bottom: none;
}

.wishly-comment-form {
    margin-top: var(--w-space-6);
    padding: var(--w-space-5);
    background: var(--w-bg-secondary);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-xl);
}

.wishly-comment-form__rating .wishly-star {
    color: #f59e0b;
    transition: transform var(--w-transition-fast);
}

.wishly-comment-form__rating .wishly-star:hover {
    transform: scale(1.2);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .wishly-product-detail__layout {
        grid-template-columns: 1fr;
        gap: var(--w-space-8);
    }

    .wishly-product-detail__image-col {
        position: static;
    }

    .wishly-product-detail__image {
        aspect-ratio: 4 / 3;
    }

    .wishly-product-detail__name {
        font-size: var(--w-text-3xl);
    }
}

@media (max-width: 640px) {
    .wishly-product-detail__rewards {
        grid-template-columns: repeat(3, 1fr);
    }

    .wishly-product-detail__stats-row {
        gap: var(--w-space-2);
    }

    .wishly-product-detail__specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Discover page (web product) extras ────────────────────────── */

/* Card <a> used as card anchor — reset link chrome. */
.wishly-product-card-wrap a.wishly-product-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Notice box shown on the discover page */
.wlk-discover-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--w-space-3);
    padding: var(--w-space-4) var(--w-space-5);
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--w-radius-xl);
    font-size: var(--w-text-sm);
    color: var(--w-text-secondary);
    line-height: var(--w-leading-relaxed);
}

.wlk-discover-notice__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Discover image wrapper — applies the rarity gradient on the discover page
   even when there is no rarity class available. */
.wlk-discover-image-wrap {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
