@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&family=Playfair+Display:wght@400&display=swap');

* {
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header Spacer */
.header-spacer {
    background: #000;
    height: 100px;
    width: 100%;
    position: relative;
    z-index: 0;
}

/* Footer Spacer */
.footer-spacer {
    background: #000;
    height: 60px;
    width: 100%;
    position: relative;
    z-index: 0;
}

/* Product Detail Main */
.product-detail-main {
    padding: 40px 0;
    background: #ffffff;
    min-height: calc(100vh - 120px);
}

/* ────────────────────────────────────────────────
   Split screen 50:50 utama
───────────────────────────────────────────────── */
.product-detail-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.split-left,
.split-right {
    width: 100%;
    min-height: 1px;
}

/* Image Gallery */
.image-gallery {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;           /* bisa diganti 4/5 atau 1/1 sesuai selera */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    user-select: none;
    touch-action: pan-y;
}

.main-product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.discount-badge-large {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #000;
    color: white;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 10;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border: 2px solid #000;
}

.image-controls {
    display: none;
}

/* Product Info */
.product-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

/* Product Name */
.product-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.product-name:hover {
    color: #000;
    transform: scale(1.02);
}

/* Product Price */
.product-price {
    margin-bottom: 30px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.final-price-large {
    font-size: 1.6rem;
    font-weight: 300;
    color: #1a1a1a;
    letter-spacing: 2px;
}

.original-price-large {
    font-size: 1rem;
    font-weight: 300;
    color: #999;
    text-decoration: line-through;
    letter-spacing: 1px;
}

.discount-saving {
    background: #000;
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Size Selector */
.size-selector {
    margin-bottom: 30px;
}

.size-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.size-btn {
    padding: 12px 24px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
    text-align: center;
}

.size-btn:hover:not(.sold-out) {
    background: #000;
    color: #fff;
    border-color: #000;
}

.size-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.size-btn.sold-out {
    background: #fff;
    color: #000;
    border-color: #000;
    cursor: not-allowed;
    opacity: 0.7;
}

.sold-out-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: bold;
    color: #000;
}

/* Product Description */
.product-description {
    width: 100%;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-description h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4a4a;
    white-space: pre-wrap;
}

/* Add to Cart */
.add-to-cart-section {
    margin-top: auto;   /* mendorong tombol ke bawah jika konten pendek */
    width: 100%;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.add-to-cart-btn, .buy-now-btn {
    padding: 15px 35px;
    border: none;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    background: #000;
    color: #fff;
}

.add-to-cart-btn:hover:not(:disabled),
.buy-now-btn:hover:not(:disabled) {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    transform: scale(1.02);
}

.add-to-cart-btn:disabled, .buy-now-btn:disabled {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Notification */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background: #000;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    max-width: 90%;
    min-width: 200px;
}

.notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ────────────────────────────────────────────────
   DESKTOP - Split 50:50 (≥992px)
───────────────────────────────────────────────── */
@media (min-width: 992px) {

    .product-detail-main {
        padding: 0;
    }

    .product-detail-row {
        height: calc(100vh - 100px);   /* sesuai header-spacer */
        min-height: 700px;
    }

    .split-left,
    .split-right {
        width: 50%;
        height: 100%;
    }

    .image-gallery {
        padding: 60px 40px 60px 80px;
    }

    .main-image-container {
        aspect-ratio: 4 / 5;           /* atau 3/4 – sesuaikan rasa */
        max-height: 85vh;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
    }

    .product-info {
        padding: 60px 80px 60px 40px;
        background: #fff;
    }

    /* Garis pemisah tipis (opsional – bisa dihapus) */
    .product-detail-row::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 1px;
        height: 100%;
        background: rgba(0,0,0,0.08);
        z-index: 5;
        pointer-events: none;
    }

    .thumbnail-gallery {
        margin-top: 30px;
    }

    .add-to-cart-section {
        margin-top: 40px;
    }
}

/* TABLET & MOBILE */
@media (max-width: 991.98px) {

    .product-detail-main {
        padding: 20px 0;
    }

    .product-detail-row {
        height: auto !important;
    }

    .split-left,
    .split-right {
        width: 100%;
        height: auto !important;
    }

    .image-gallery {
        padding: 0 15px 30px !important;
        min-height: 60vh;
    }

    .product-info {
        padding: 20px 20px 40px !important;
    }

    .main-image-container {
        aspect-ratio: 1 / 1;
    }

    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .add-to-cart-btn, .buy-now-btn {
        padding: 14px;
    }
}

@media (max-width: 576px) {

    .product-name {
        font-size: 1.5rem;
        letter-spacing: 1.5px;
    }

    .final-price-large {
        font-size: 1.4rem;
    }

    .size-btn {
        padding: 10px 20px;
        min-width: 55px;
        font-size: 0.95rem;
    }

    .product-description {
        padding: 12px;
    }

    .notification {
        padding: 15px 25px;
        font-size: 1rem;
    }
}