/* ============================================================
SINGLE-PRODUCT.CSS - Product Detail Page (PDP)
Akila Florist Starter Theme
Location: /assets/css/04-pages/single-product.css

FIXED: Gallery Carousel dengan Auto-Slide & Swiper Pagination
============================================================ */

/* --- 1. BASE PAGE STYLES --- */
.st-single-product-page {
    background: var(--bg-color, #ffffff);
    min-height: 100vh;
}

.st-breadcrumb {
    padding: 20px 0;
    background: var(--bg-light, #f8f9fa);
}

.st-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
}

.st-breadcrumb-list li {
    color: var(--text-muted, #666);
}

.st-breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: var(--text-muted, #999);
}

.st-breadcrumb-list a {
    color: var(--text-color, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.st-breadcrumb-list a:hover {
    color: var(--accent-color, #667eea);
}

/* --- 2. PRODUCT DETAIL GRID --- */
.st-product-detail {
    padding: 40px 0;
}

.st-product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* --- 3. PRODUCT GALLERY (FIXED CAROUSEL) --- */
.st-product-gallery {
    position: sticky;
    top: 100px;
}

.st-main-image {
    position: relative;
    border-radius: var(--border-radius, 12px);
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-light, #f5f5f5);
}

.st-stock-badge,
.st-discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
}

.st-stock-badge.stock-ready {
    background: #10b981;
    color: white;
}

.st-discount-badge {
    left: auto;
    right: 15px;
    background: #ef4444;
    color: white;
}

/* Gallery Carousel Container */
.st-gallery-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: var(--card-aspect-ratio, 3/4);
    overflow: hidden;
    background: var(--bg-light, #f5f5f5);
    border-radius: var(--border-radius, 12px);
}

/* Image Slides Container */
.st-gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.st-gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
/* --- TAMBAHKAN 3 BARIS INI --- */
    will-change: opacity; 
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Active Slide - VISIBLE */
.st-gallery-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Images */
.st-gallery-slide img,
.st-main-image img.img-fluid {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Pagination Dots */
.st-gallery-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.st-pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.st-pagination-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
}

.st-pagination-dot.active {
    background: var(--accent-color, #667eea);
    border-color: var(--accent-color, #667eea);
    transform: scale(1.4);
    width: 12px;
    height: 12px;
}

/* --- 4. PRODUCT INFO --- */
.st-product-info {
    padding: 20px 0;
}

.st-product-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.st-product-category {
    background: var(--bg-light, #f8f9fa);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #666);
    text-decoration: none;
    transition: all 0.3s ease;
}

.st-product-category:hover {
    background: var(--accent-color, #667eea);
    color: white;
}

.st-product-occasions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted, #666);
}

.st-product-occasions a {
    color: var(--accent-color, #667eea);
    text-decoration: none;
}

.st-product-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 10px;
    color: var(--primary-color, #333);
    font-family: var(--font-heading, inherit);
    line-height: 1.2;
}

/* Price CSS Logic */
.st-product-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    flex-wrap: wrap;
}

.st-price-regular.st-price-no-discount,
.st-price-sale {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color, #ef4444);
    text-decoration: none;
}

.st-price-regular:not(.st-price-no-discount) {
    font-size: 1.3rem;
    color: var(--text-muted, #999);
    text-decoration: line-through;
}

.st-price-save {
    font-size: 0.9rem;
    color: #10b981;
    font-weight: 600;
}

/* Description & Info */
.st-product-description,
.st-product-additional {
    margin-bottom: 25px;
}

.st-info-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary-color, #333);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading, inherit);
}

/* Actions */
.st-product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.st-btn-order,
.st-btn-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--border-radius, 12px);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: var(--btn-text-transform, none);
}

.st-btn-order {
    background: #25D366;
    color: white;
}

.st-btn-order:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.st-btn-chat {
    background: var(--primary-color, #667eea);
    color: white;
}

.st-btn-chat:hover {
    background: var(--primary-hover, #5a67d8);
}

/* Delivery Info */
.st-delivery-info {
    background: var(--bg-light, #f8f9fa);
    padding: 20px;
    border-radius: var(--border-radius, 12px);
    margin: 30px 0;
}

.st-delivery-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.st-delivery-item i {
    font-size: 1.5rem;
    color: var(--accent-color, #667eea);
    flex-shrink: 0;
}

.st-delivery-item strong {
    display: block;
    color: var(--text-color, #333);
    font-size: 0.95rem;
}

.st-delivery-item span {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
}

/* Share */
.st-product-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.st-share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light, #f8f9fa);
    border-radius: 50%;
    color: var(--text-color, #333);
    text-decoration: none;
    transition: all 0.3s ease;
}

.st-share-btn:hover {
    background: var(--accent-color, #667eea);
    color: white;
    transform: translateY(-2px);
}

/* --- 5. PRODUCT TABS --- */
.st-product-tabs {
    background: var(--bg-light, #f8f9fa);
    padding: 60px 0;
}

.st-tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
    flex-wrap: wrap;
}

.st-tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted, #666);
    transition: all 0.3s ease;
    font-family: var(--font-body, inherit);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.st-tab-btn:hover {
    color: var(--accent-color, #667eea);
}

.st-tab-btn.active {
    color: var(--accent-color, #667eea);
    border-bottom-color: var(--accent-color, #667eea);
}

.st-tabs-content {
    position: relative;
}

.st-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.st-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product Table */
.st-product-table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius, 12px);
    overflow: hidden;
}

.st-product-table tr {
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.st-product-table tr:last-child {
    border-bottom: none;
}

.st-product-table th,
.st-product-table td {
    padding: 15px 20px;
    text-align: left;
}

.st-product-table th {
    width: 30%;
    background: var(--bg-light, #f8f9fa);
    font-weight: 600;
    color: var(--text-color, #333);
}

/* Delivery Grid */
.st-delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.st-delivery-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius, 12px);
    text-align: center;
    transition: transform 0.3s ease;
}

.st-delivery-card:hover {
    transform: translateY(-5px);
}

.st-delivery-card i {
    font-size: 2.5rem;
    color: var(--accent-color, #667eea);
    margin-bottom: 15px;
}

.st-delivery-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color, #333);
    font-family: var(--font-heading, inherit);
}

.st-delivery-card p {
    color: var(--text-muted, #666);
    font-size: 0.95rem;
    margin: 0;
}

/* --- 6. RELATED PRODUCTS --- */
.st-related-products {
    padding: 60px 0;
}

.st-section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--primary-color, #333);
    font-family: var(--font-heading, inherit);
}

.st-no-related {
    text-align: center;
    color: var(--text-muted, #666);
    padding: 40px;
    background: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius, 12px);
}

/* --- 7. SEO CONTENT --- */
.st-seo-content {
    background: var(--bg-light, #f8f9fa);
    padding: 60px 0;
}

.st-seo-content h2 {
    margin-bottom: 20px;
    font-family: var(--font-heading, inherit);
}

/* --- 8. RESPONSIVE --- */
@media (max-width: 992px) {
    .st-product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .st-product-gallery {
        position: static;
    }

    .st-tabs-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .st-product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .st-price-sale,
    .st-price-regular.st-price-no-discount {
        font-size: 1.5rem;
    }

    .st-gallery-pagination {
        bottom: 15px;
        padding: 6px 10px;
    }

    .st-pagination-dot {
        width: 8px;
        height: 8px;
    }

    .st-pagination-dot.active {
        width: 10px;
        height: 10px;
    }

    .st-tabs-header {
        flex-direction: column;
    }

    .st-tab-btn {
        border-bottom: 2px solid var(--border-color, #e0e0e0);
        border-left: 3px solid transparent;
    }

    .st-tab-btn.active {
        border-left-color: var(--accent-color, #667eea);
        border-bottom-color: transparent;
    }
}

/* --- 9. SKIN-SPECIFIC ADJUSTMENTS --- */
.skin-luxury .st-product-title {
    font-style: italic;
}

.skin-luxury .st-price-sale,
.skin-luxury .st-price-regular.st-price-no-discount {
    color: var(--accent-color, #a58d67);
}

.skin-playful .st-product-detail-grid {
    gap: 40px;
}

.skin-corporate .st-product-table th {
    background: var(--primary-color, #00266f);
    color: white;
}

/* Gallery Drag Cursor */
.st-gallery-carousel {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.st-gallery-carousel:active {
    cursor: grabbing;
}

.st-gallery-carousel img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* ============================================================
CUSTOMER REVIEW SECTION - Portrait Version
============================================================ */
.st-customer-review {
    background: var(--bg-light, #f8f9fa);
    padding: 80px 0; /* Sedikit diperlebar ruangnya */
    margin-top: 40px;
}

.st-customer-review .st-section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    color: var(--primary-color, #333);
    font-family: var(--font-heading, inherit);
}

.st-customer-review .st-section-title i {
    color: var(--accent-color, #667eea);
    margin-right: 12px;
}

.st-review-grid {
    display: grid;
    /* Menyesuaikan min-width kolom agar tidak terlalu lebar saat portrait */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px;
}

.st-review-card {
    background: var(--white, #ffffff);
    border-radius: var(--border-radius, 12px);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color, #ebebeb);
    display: flex;
    flex-direction: column;
}

.st-review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.st-review-image {
    position: relative;
    /* DIRUBAH KE PORTRAIT (3/4 adalah standar foto HP) */
    aspect-ratio: 3 / 4; 
    overflow: hidden;
    background: var(--bg-light, #f5f5f5);
}

.st-review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Tetap cover agar container penuh */
    transition: transform 0.6s ease;
}

.st-review-card:hover .st-review-image img {
    transform: scale(1.08);
}

.st-review-caption {
    padding: 25px;
    background: var(--white, #ffffff);
    flex-grow: 1; /* Memastikan area teks mengisi sisa ruang */
    display: flex;
    flex-direction: column;
}

.st-review-caption::before {
    content: '"';
    font-size: 2.5rem;
    color: var(--accent-color, #667eea);
    line-height: 1;
    margin-bottom: 10px;
    font-family: serif;
    opacity: 0.4;
}

.st-review-caption p {
    margin: 0;
    color: var(--text-color, #444);
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .st-customer-review {
        padding: 60px 0;
    }
    
    .st-review-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .st-review-grid {
        grid-template-columns: 1fr; /* 1 kolom penuh di mobile */
        padding: 0 15px;
    }
}

/* --- Skin-Specific (Tetap Dipertahankan) --- */
.skin-luxury .st-review-card { border-radius: 0; border-width: 1px 0; }
.skin-playful .st-review-card { border-radius: 25px; }
.skin-corporate .st-review-card { border-radius: 4px; box-shadow: none; border: 1px solid #ddd; }