/* ══════════════════════════════════════
   LaFortune — Single Product Page
   Mockup v3 Design
   ══════════════════════════════════════ */

/* ── Breadcrumb ── */
.sp-breadcrumb {
    max-width: var(--lf-max-w, 1400px);
    margin: 0 auto;
    padding: 20px var(--lf-gutter) 0;
    font-family: var(--lf-font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--lf-ink-50);
}

.sp-breadcrumb a {
    color: var(--lf-ink-50);
    text-decoration: none;
    transition: color 0.2s;
}

.sp-breadcrumb a:hover { color: var(--lf-gold); }
.sp-bread-sep { margin: 0 8px; opacity: 0.4; }
.sp-bread-current { color: var(--lf-ink); }

/* ── Page layout ── */
.sp-page {
    background: #fff;
    padding-bottom: 0;
}

/* ── Main Grid: 55 / 45 ── */
.sp-grid {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 48px;
    max-width: var(--lf-max-w, 1400px);
    margin: 0 auto;
    padding: 32px var(--lf-gutter) 60px;
    align-items: start;
}

/* ══ GALLERY ══ */
.sp-gallery {
    position: sticky;
    top: 24px;
    display: flex;
    gap: 12px;
}

/* Vertical thumbnails */
.sp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.sp-thumb {
    width: 72px;
    height: 90px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--lf-ivory);
    padding: 0;
    transition: border-color 0.2s;
}

.sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-thumb.active,
.sp-thumb:hover {
    border-color: var(--lf-gold);
}

/* Main image */
.sp-main-img {
    flex: 1;
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 6px;
    background: var(--lf-ivory);
    cursor: crosshair;
}

.sp-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.sp-main-img:hover img {
    transform: scale(1.06);
}

/* Badges */
.sp-badge {
    position: absolute;
    padding: 5px 14px;
    font-family: var(--lf-font-body);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 3;
}

.sp-badge-new {
    top: 16px;
    left: 16px;
    background: var(--lf-ink);
    color: var(--lf-ivory);
}

.sp-badge-sale {
    top: 16px;
    right: 16px;
    background: var(--lf-copper);
    color: #fff;
}

/* Wishlist */
.sp-wishlist {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    color: var(--lf-ink);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s, transform 0.3s, color 0.2s;
}

.sp-main-img:hover .sp-wishlist {
    opacity: 1;
    transform: translateY(0);
}

.sp-wishlist:hover { color: var(--lf-copper); }

/* Mobile thumbnails */
.sp-thumbs-mobile {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 4px;
    scrollbar-width: none;
}

.sp-thumbs-mobile::-webkit-scrollbar { display: none; }

.sp-thumb-m {
    width: 64px;
    height: 80px;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--lf-ivory);
    padding: 0;
    transition: border-color 0.2s;
}

.sp-thumb-m img { width: 100%; height: 100%; object-fit: cover; }
.sp-thumb-m.active { border-color: var(--lf-gold); }

/* ══ SUMMARY ══ */
.sp-summary {
    padding-top: 8px;
}

/* Category */
.sp-category {
    display: inline-block;
    font-family: var(--lf-font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 0.88rem;
    color: var(--lf-gold);
    text-decoration: none;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.sp-category:hover { color: var(--lf-copper); }

/* Title */
.sp-title {
    font-family: var(--lf-font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--lf-ink);
    margin: 0 0 16px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

/* Price */
.sp-price {
    font-family: var(--lf-font-body);
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--lf-gold);
    margin-bottom: 20px;
}

.sp-price del {
    color: var(--lf-copper);
    font-weight: 300;
    font-size: 1rem;
    margin-right: 8px;
}

.sp-price ins {
    text-decoration: none;
    color: var(--lf-gold);
}

/* Gold separator */
.sp-gold-sep {
    width: 40px;
    height: 1px;
    background: var(--lf-gold);
    margin-bottom: 20px;
}

/* Short description */
.sp-short-desc {
    font-family: var(--lf-font-body);
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--lf-ink-80);
    margin-bottom: 28px;
}

.sp-short-desc p { margin: 0 0 8px; }

/* ── Cart Form ── */
.sp-cart-form {
    margin-bottom: 28px;
}

/* WC Variations table override */
.sp-cart-form .variations {
    margin-bottom: 20px;
    width: 100%;
}

.sp-cart-form .variations td {
    padding: 8px 0;
    vertical-align: top;
}

.sp-cart-form .variations .label label {
    font-family: var(--lf-font-body);
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lf-ink-80);
}

.sp-cart-form .variations select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(28,26,22,0.15);
    border-radius: 4px;
    font-family: var(--lf-font-body);
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--lf-ink);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
}

/* Variation swatches plugin overrides */
.sp-cart-form .cfvsw-swatches-container {
    gap: 8px;
}

.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
}

.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-color.selected,
.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-color:hover {
    border-color: var(--lf-gold);
    transform: scale(1.1);
}

.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-text {
    padding: 8px 18px;
    border: 1px solid rgba(28,26,22,0.15);
    border-radius: 4px;
    font-family: var(--lf-font-body);
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--lf-ink-80);
    transition: all 0.2s;
}

.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-text.selected,
.sp-cart-form .cfvsw-swatches-container .cfvsw-swatch-text:hover {
    border-color: var(--lf-gold);
    color: var(--lf-gold);
    background: var(--lf-gold-20);
}

/* Quantity selector */
.sp-cart-form .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--lf-gold);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
}

.sp-cart-form .quantity .qty {
    width: 48px;
    height: 44px;
    text-align: center;
    border: none;
    font-family: var(--lf-font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--lf-ink);
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
}

.sp-cart-form .quantity .qty::-webkit-inner-spin-button,
.sp-cart-form .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quantity +/- buttons (added by JS) */
.sp-qty-btn {
    width: 36px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--lf-ink-80);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: var(--lf-font-body);
}

.sp-qty-btn:hover {
    background: var(--lf-gold-20);
    color: var(--lf-gold);
}

/* Add to cart button */
.sp-cart-form .single_add_to_cart_button,
.sp-cart-form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--lf-ink);
    color: var(--lf-ivory);
    border: none;
    border-radius: 4px;
    font-family: var(--lf-font-body);
    font-weight: 400;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 12px;
}

.sp-cart-form .single_add_to_cart_button:hover {
    background: var(--lf-gold);
    color: #fff;
}

.sp-cart-form .single_add_to_cart_button.added {
    background: #16a34a;
}

.sp-cart-form .single_add_to_cart_button.added::after {
    content: ' ✓';
}

/* WC price display in variation form */
.sp-cart-form .woocommerce-variation-price {
    margin-bottom: 16px;
}

.sp-cart-form .woocommerce-variation-price .price {
    font-family: var(--lf-font-body);
    font-size: 1.15rem;
    color: var(--lf-gold);
}

/* Reset link */
.sp-cart-form .reset_variations {
    font-family: var(--lf-font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--lf-ink-50);
}

/* ── Trust Badges ── */
.sp-trust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    border-top: 1px solid rgba(28,26,22,0.06);
    border-bottom: 1px solid rgba(28,26,22,0.06);
    margin-bottom: 24px;
}

.sp-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--lf-font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--lf-ink-80);
}

.sp-trust-item svg {
    flex-shrink: 0;
    color: var(--lf-gold);
    stroke: var(--lf-gold);
}

.sp-trust-dot {
    color: var(--lf-gold-40);
    font-size: 0.6rem;
}

/* ── Accordions ── */
.sp-accordions {
    margin-bottom: 0;
}

.sp-accordion {
    border-bottom: 1px solid rgba(28,26,22,0.08);
}

.sp-accordion:last-child {
    border-bottom: none;
}

.sp-accordion-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--lf-font-display);
    font-weight: 400;
    font-size: 1rem;
    color: var(--lf-ink);
    letter-spacing: 0.02em;
    text-align: left;
}

.sp-accordion-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--lf-ink-50);
}

.sp-accordion-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.sp-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
}

.sp-accordion-body.open {
    max-height: 500px;
    padding: 0 0 20px;
}

.sp-accordion-body p {
    font-family: var(--lf-font-body);
    font-weight: 300;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--lf-ink-80);
    margin: 0 0 8px;
}

.sp-accordion-body p:last-child { margin-bottom: 0; }

/* ── Related Products ── */
.sp-related {
    background: #EDE8DF;
    padding: 60px var(--lf-gutter);
}

.sp-related .related.products > h2 {
    font-family: var(--lf-font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--lf-ink);
    text-align: center;
    margin: 0 0 32px;
    letter-spacing: 0.02em;
}

.sp-related .related.products ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: var(--lf-max-w, 1400px);
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

/* Hide default WC elements */
.sp-page .woocommerce-product-gallery,
.sp-page .onsale {
    display: none !important;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
    .sp-grid {
        grid-template-columns: 50fr 50fr;
        gap: 32px;
    }

    .sp-related .related.products ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sp-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px var(--lf-gutter) 40px;
    }

    .sp-gallery {
        position: static;
        flex-direction: column;
    }

    .sp-thumbs {
        display: none;
    }

    .sp-thumbs-mobile {
        display: flex;
    }

    .sp-related .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .sp-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sp-trust-dot { display: none; }
}

@media (max-width: 480px) {
    .sp-title {
        font-size: 1.4rem;
    }

    .sp-related .related.products ul.products {
        grid-template-columns: 1fr 1fr;
    }

    .sp-breadcrumb {
        font-size: 0.72rem;
    }
}
