/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Style Umum */
body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.heading {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.8rem;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    border-radius: 2px;
}

.heading span {
    background: linear-gradient(90deg, #0f6751, #41a17c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(-10deg);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    transition: all 0.3s ease;
}

.logo:hover h1 {
    color: #2dbda5;
}

.logo h1 span {
    background: linear-gradient(90deg, #0f6751, #41a17c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li {
    margin-left: 25px;
    position: relative;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.navbar ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    transition: width 0.3s ease;
}

.navbar ul li a:hover:after {
    width: 100%;
}

.navbar ul li a:hover {
    color: #2dbda5;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f9f9f9;
    padding: 15px 0;
    background: linear-gradient(90deg, #f8f9fa, #f1f3f5);
}

.breadcrumb ul {
    display: flex;
    list-style: none;
}

.breadcrumb ul li {
    margin-right: 10px;
    font-size: 0.9rem;
    position: relative;
}

.breadcrumb ul li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: #999;
}

.breadcrumb ul li a {
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.breadcrumb ul li a:hover {
    color: #2dbda5;
    transform: translateY(-2px);
}

/* Kategori Produk */
.cat-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-category-btn {
    padding: 10px 25px;
    background: #f5f5f5;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cat-category-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    transition: width 0.3s ease;
    z-index: -1;
    border-radius: 30px;
}

.cat-category-btn.active, 
.cat-category-btn:hover {
    color: white;
}

.cat-category-btn.active:before, 
.cat-category-btn:hover:before {
    width: 100%;
}

/* Produk */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-box {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0, 1);
    position: relative;
}

.product-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-box .image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-box .image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px; /* opsional: buat tampilan lebih halus */
    display: block;
}


.product-box:hover .image img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.product-box .content {
    padding: 20px;
    position: relative;
}

.product-box .content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

.product-box:hover .content h3 {
    color: #2dbda5;
}

.product-box .stars {
    color: #ffc107;
    margin-bottom: 10px;
    font-size: 16px;
}

.product-box .stars span {
    color: #777;
    font-size: 13px;
    margin-left: 5px;
}

.product-box .price {
    font-weight: bold;
    color: #333;
    font-size: 18px;
    margin-top: 10px;
}

.product-box .price span {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 5px;
}

/* Ribbon for Special Items */
.product-box .ribbon {
    position: absolute;
    top: 10px;
    right: -30px;
    background: linear-gradient(45deg, #0f6751, #41a17c);
    color: white;
    padding: 5px 30px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Tombol Detail */
.detail-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    margin-top: 15px;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.detail-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    transition: width 0.3s ease;
    z-index: -1;
}

.detail-btn:hover:before {
    width: 100%;
}

.detail-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(255, 107, 0, 0.3);
}

/* Modal Detail Produk */
.product-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.detail-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.product-detail-modal.active .detail-content {
    transform: scale(1);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Untuk memastikan konten modal tetap rapi */
.detail-info {
    position: relative;
}

.close-detail {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

/* Responsive modal */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-images img {
        max-height: 300px;
        object-fit: contain;
    }
}

.close-detail {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-detail:hover {
    color: #2dbda5;
    background: #f5f5f5;
    transform: rotate(90deg);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.detail-images img {
    width: 100%;
    height: auto;
    max-width: 400px; /* opsional: batas maksimal lebar */
    display: block;
    margin: 0 auto;
    object-fit: contain;
}


.main-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.thumbnail-container {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover, .thumbnail.active {
    border-color: #2dbda5;
    transform: scale(1.05);
}

.detail-info h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.rating {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 18px;
}

.rating-count {
    color: #777;
    font-size: 14px;
    margin-left: 10px;
}

.detail-price {
    font-size: 28px;
    color: #2dbda5;
    font-weight: bold;
    margin: 20px 0;
}

.detail-price span {
    font-size: 18px;
    color: #777;
    font-weight: normal;
    text-decoration: line-through;
    margin-left: 10px;
}

.discount-badge {
    display: inline-block;
    background: #2dbda5;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 14px;
    margin-left: 10px;
    font-weight: bold;
}

.detail-specs {
    margin: 25px 0;
}

.detail-specs h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.detail-specs ul {
    list-style-type: none;
    padding: 0;
}

.detail-specs li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
    display: flex;
}

.detail-specs li:last-child {
    border-bottom: none;
}

.detail-specs strong {
    color: #555;
    min-width: 150px;
    display: inline-block;
}

.advantages {
    list-style-type: none;
    margin: 20px 0;
}

.advantages li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.advantages li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2dbda5;
    font-weight: bold;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px 0 0 5px;
}

.quantity-selector button:last-of-type {
    border-radius: 0 5px 5px 0;
}

.quantity-selector button:hover {
    background: #e0e0e0;
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #eee;
    border-left: none;
    border-right: none;
    font-size: 16px;
}

/* Tombol Pesan */
.btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-cart:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0f6751, #41a17c);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-cart:hover:before {
    width: 100%;
}

.btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.3);
}

.btn-cart i {
    margin-right: 10px;
    font-size: 20px;
}

/* Floating Action Button */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0f6751, #41a17c);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.product-box {
    animation: fadeIn 0.5s ease forwards;
}

/*Footer*/
.copyright {
    background-color: #2e6f6a; /* Warna latar belakang gelap */
    color: #ccc;            /* Warna teks abu-abu terang */
    text-align: center;     /* Pusatkan teks */
    font-size: 1.4rem;      /* Ukuran teks */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Garis atas tipis */
    letter-spacing: 0.5px;
}

.copyright p {
    margin: 0;
    color: #aaa;
    transition: color 0.3s ease;
}

.copyright p:hover {
    color: #fff; /* Efek saat hover */
}

/* Delay animations for grid items */
.product-box:nth-child(1) { animation-delay: 0.1s; }
.product-box:nth-child(2) { animation-delay: 0.2s; }
.product-box:nth-child(3) { animation-delay: 0.3s; }
.product-box:nth-child(4) { animation-delay: 0.4s; }
.product-box:nth-child(5) { animation-delay: 0.5s; }
.product-box:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 992px) {
    .detail-grid {
        gap: 30px;
    }
    
    .main-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        padding: 15px;
    }

    .navbar ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar ul li {
        margin: 5px 10px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        margin: 20px auto;
        padding: 25px;
    }
    
    .main-image {
        height: 250px;
    }
    
    .heading {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .product-container {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding: 20px;
    }
    
    .detail-info h2 {
        font-size: 26px;
    }
    
    .detail-price {
        font-size: 24px;
    }
    
    .btn-cart {
        padding: 12px 0;
        font-size: 16px;
    }
    
    .heading {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo img {
        height: 40px;
    }
}