/* style.css */

/* --- RESET & FONT DASAR --- */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8; /* Latar belakang body agar tidak terlalu putih */
}

a {
    text-decoration: none;
    color: #007bff; /* Warna link default */
}

a:hover {
    color: #0056b3;
}

/* --- MAIN NAVIGATION --- */
.main-navigation {
    background-color: #ffffff;
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-wrap: wrap; /* Izinkan elemen wrap ke baris baru di layar kecil */
}

/* LOGO dan NAV LINKS: Penataan di .nav-left */
.nav-left {
    display: flex;
    align-items: center;
    gap: 30px; /* Jarak antara logo dan daftar link navigasi */
}

.main-navigation .logo {
    font-size: 28px; /* Ukuran ikon logo */
    color: #EE4D2D; /* Warna ikon logo */
    padding: 0;
    margin: 0;
    line-height: 1; /* Pastikan ikon tidak punya ruang ekstra */
}

/* Navigasi Link (Kategori, Blog, dll.) */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; /* Jarak antar link */
}

.nav-links li a {
    text-decoration: none;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #EE4D2D; /* Warna hover (Merah Shopee) */
}

/* Bagian Kanan Navigasi (Search, Cart, Account) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Jarak antar elemen di bagian kanan */
}

/* Search Bar */
.search-bar {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    max-width: 300px; /* Batasi lebar search bar di desktop */
    width: 100%;
}

.search-bar input[type="search"] {
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    flex-grow: 1;
    outline: none; /* Hilangkan outline default browser */
}

.search-bar button {
    background-color: #f5f5f5;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px; /* Ukuran ikon Font Awesome */
    color: #555555;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #eeeeee;
}

/* Ikon Keranjang & Akun */
.cart-icon,
.account-link {
    text-decoration: none;
    color: #333333;
    font-size: 20px; /* Ukuran ikon Font Awesome */
    display: flex;
    align-items: center;
    gap: 5px; /* Jarak antara ikon dan teks (untuk Akun) */
    font-weight: normal;
}

.cart-icon .cart-count {
    background-color: #EE4D2D;
    color: #fff;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px 6px;
    position: relative;
    top: -8px; /* Atur posisi badge */
    right: 5px;
    line-height: 1;
    min-width: 18px; /* Agar tetap bulat meski angka 0 */
    text-align: center;
}


/* --- PRODUCT PAGE LAYOUT --- */
.product-page-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr; /* Default untuk mobile */
    gap: 40px;
}

/* Grid untuk desktop */
@media (min-width: 992px) { /* breakpoint untuk desktop/laptop */
    .product-page-container {
        grid-template-columns: 1fr 2fr; /* Galeri (1 bagian), Detail (2 bagian) */
    }
}
@media (min-width: 768px) and (max-width: 991px) { /* breakpoint untuk tablet */
    .product-page-container {
        grid-template-columns: 1fr; /* Bisa jadi 1 kolom atau 2 kolom yang lebih sempit */
    }
}


/* --- PRODUCT GALLERY --- */
.product-gallery {
    /* Atur gaya untuk container galeri */
}
.main-image {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.main-image img {
    width: 100%;
    height: auto;
    display: block;
}
.thumbnail-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto; /* Untuk thumbnail yang banyak di mobile */
    padding-bottom: 10px; /* Agar scrollbar tidak mepet */
}
.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0; /* Agar thumbnail tidak menyusut */
}
.thumbnail-images img:hover,
.thumbnail-images img.active-thumbnail { /* Class untuk thumbnail aktif (dengan JS) */
    border-color: #EE4D2D;
    box-shadow: 0 0 0 2px #EE4D2D;
}


/* --- PRODUCT DETAILS --- */
.product-details {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-title {
    font-size: 28px;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Bintang Rating */
.product-rating .stars,
.review-summary .stars,
.review-rating {
    color: #FFC107; /* Warna kuning emas untuk bintang */
    font-size: 18px; /* Ukuran ikon bintang */
    display: inline-block; /* Agar bintang dan teks sejajar */
    vertical-align: middle;
}

.product-rating .stars i,
.review-summary .stars i,
.review-rating i {
    margin-right: 2px;
}

.product-rating .rating-value {
    font-weight: bold;
    color: #EE4D2D;
    margin-left: 5px;
    vertical-align: middle;
}
.product-rating .review-count {
    color: #555;
    margin-left: 10px;
    font-size: 14px;
    vertical-align: middle;
}

.product-price .current-price {
    font-size: 32px;
    color: #EE4D2D;
    font-weight: bold;
    margin: 20px 0;
    display: block;
}
/* Optional: .product-price .old-price, .discount-badge */

.product-variations {
    margin-bottom: 25px;
}
.variation-group {
    margin-bottom: 15px;
}
.variation-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}
.variation-group select,
.quantity-selector input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}
.quantity-selector {
    margin-top: 15px;
}
.stock-info {
    font-size: 14px;
    color: #888;
    margin-left: 10px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}
.add-to-cart-btn, .buy-now-btn, .visit-store-btn, .follow-store-btn {
    background-color: rgb(238, 77, 45); /* Merah Shopee */
    color: rgb(255, 255, 255);
    padding: 14px 28px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    flex-grow: 1; /* Agar tombol mengisi ruang */
    max-width: 250px; /* Batasi lebar tombol di desktop */
}
.add-to-cart-btn:hover, .buy-now-btn:hover, .visit-store-btn:hover, .follow-store-btn:hover {
    background-color: rgb(200, 60, 30);
    transform: translateY(-2px); /* Efek sedikit melayang */
}
.add-to-cart-btn:active, .buy-now-btn:active, .visit-store-btn:active, .follow-store-btn:active {
    transform: translateY(0); /* Kembali ke posisi semula saat diklik */
}
.add-to-cart-btn:focus, .buy-now-btn:focus, .visit-store-btn:focus, .follow-store-btn:focus {
    outline: 2px solid rgb(0, 123, 255);
    outline-offset: 2px;
}
.add-to-cart-btn:disabled, .buy-now-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.product-description-full {
    background-color: #fff;
    padding: 25px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.product-description-full h2, .product-description-full h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}
.product-description-full ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}
.product-description-full table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.product-description-full table th,
.product-description-full table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
}
.product-description-full table th {
    background-color: #f5f5f5;
    font-weight: bold;
}


/* --- SELLER INFO --- */
.seller-info {
    background-color: #fff;
    padding: 25px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.seller-info h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}
.seller-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.seller-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}
.seller-details h3 {
    margin: 0;
    font-size: 20px;
}
.seller-details h3 a {
    color: #333;
    text-decoration: none;
}
.seller-details h3 a:hover {
    color: #EE4D2D;
}
.seller-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}
.seller-info .visit-store-btn, .seller-info .follow-store-btn {
    display: inline-block;
    margin-right: 10px;
    max-width: fit-content;
}


/* --- CUSTOMER REVIEWS --- */
.customer-reviews {
    background-color: #fff;
    padding: 25px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.customer-reviews h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}
.review-summary {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #555;
}
.review-summary p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.review-summary .rating-value {
    font-weight: bold;
    color: #EE4D2D;
}

.review-list {
    margin-bottom: 20px;
}
.review-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fafafa;
}
.review-item .review-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}
.review-item .review-author {
    font-weight: bold;
    color: #333;
}
.review-item .review-body {
    margin: 10px 0;
    color: #444;
}
.review-item .review-product-variant {
    font-size: 13px;
    color: #777;
    margin-top: 10px;
}
.view-all-reviews-btn {
    background-color: #f0f0f0;
    color: #555;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block; /* Agar tombol mengambil lebar penuh */
    width: fit-content; /* Sesuai konten */
    margin: 0 auto; /* Pusatkan tombol */
}
.view-all-reviews-btn:hover {
    background-color: #e0e0e0;
}


/* --- RELATED PRODUCTS --- */
.related-products {
    margin-top: 50px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

.related-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product-card {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    flex: 0 0 calc(25% - 20px); /* 4 kolom di desktop, kurangi gap */
    max-width: calc(25% - 20px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    background-color: #fff;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 180px; /* Tinggi tetap untuk konsistensi */
    object-fit: cover; /* Pastikan gambar mengisi area tanpa terdistorsi */
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    white-space: nowrap; /* Mencegah judul terlalu panjang melipat */
    overflow: hidden;
    text-overflow: ellipsis; /* Tambahkan elipsis jika judul terpotong */
}

.product-card p {
    font-size: 14px;
    font-weight: bold;
    color: #EE4D2D;
    margin-bottom: 10px;
}

.product-card a {
    display: inline-block;
    background-color: #EE4D2D;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.product-card a:hover {
    background-color: #d84524;
}


/* --- FOOTER --- */
footer {
    background-color: #333333;
    color: #ffffff;
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-column h3 {
    color: #EE4D2D;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    text-decoration: none;
    color: #cccccc;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #555555;
    color: #cccccc;
}

.footer-bottom nav a {
    text-decoration: none;
    color: #cccccc;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-bottom nav a:hover {
    color: #ffffff;
}

/* --- RESPONSIVE DESIGN (MEDIA QUERIES) --- */

/* Umum untuk mobile */
@media (max-width: 768px) {
    .main-navigation {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .nav-left {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 10px;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 5px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 5px 0;
    }

    .nav-right {
        width: 100%;
        justify-content: space-around;
        margin-top: 10px;
        margin-bottom: 0;
    }

    .search-bar {
        width: 100%;
        max-width: 100%; /* Lebarkan di mobile */
        margin-bottom: 10px;
    }

    .product-page-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .product-details,
    .product-description-full,
    .seller-info,
    .customer-reviews {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column; /* Tombol aksi menumpuk di mobile */
    }

    .add-to-cart-btn, .buy-now-btn, .visit-store-btn, .follow-store-btn {
        max-width: 100%; /* Tombol memenuhi lebar di mobile */
    }

    .related-products-grid {
        gap: 15px;
    }

    .product-card {
        flex: 0 0 calc(50% - 15px); /* 2 kolom di mobile/tablet */
        max-width: calc(50% - 15px);
        padding: 10px;
    }
    .product-card img {
        height: 150px;
    }

    footer {
        padding: 30px 15px;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .footer-column {
        min-width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .footer-bottom {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .product-card {
        flex: 0 0 calc(100% - 15px); /* 1 kolom di mobile sangat kecil */
        max-width: calc(100% - 15px);
    }
    .product-card img {
        height: 200px;
    }
}

/* style.css */

/* --- Existing Styles for Product Title --- */
.product-title {
    font-size: 28px; /* Pastikan ini sudah ada dan eksplisit */
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

/* --- Existing Styles for Nav Logo (jika Anda pakai <h1> atau ikon besar) --- */
.main-navigation .logo {
    font-size: 28px; /* Pastikan ini sudah ada dan eksplisit untuk ikon logo */
    color: #EE4D2D;
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* --- TAMBAHAN KHUSUS UNTUK MEMASTIKAN H1 DI SEMANTIC ELEMENTS MEMILIKI UKURAN --- */
/* Ini adalah general catch-all untuk mengatasi peringatan */
/* Sesuaikan nilai font-size dengan ukuran yang Anda inginkan untuk masing-masing */
section h1,
article h1,
aside h1,
nav h1 {
    /* Pastikan setiap H1 di dalam elemen ini memiliki ukuran font yang didefinisikan */
    /* Jika Anda sudah mendefinisikannya di class seperti .product-title,
       maka ini bisa menjadi fallback atau pengingat */
    font-size: 28px; /* Sesuaikan dengan desain Anda */
    /* Penting: Pastikan ini tidak mengganggu spesifisitas CSS Anda yang lain.
       Jika sudah ada selector yang lebih spesifik (misal: .product-title), itu akan tetap berlaku. */
}