/* Import font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset dasar dan tipografi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Shared Styles (dari style.css) --- */
/* Gaya-gaya ini diduplikasi di sini untuk penggunaan mandiri. Dalam proyek yang lebih besar,
   Anda mungkin memiliki satu stylesheet utama untuk elemen-elemen umum ini. */

:root {
    --primary-color: #20c997; /* Teal */
    --primary-dark-color: #1a9c78; /* Teal lebih gelap */
    --secondary-color: #ffffff; /* Putih */
    --text-color: #333333; /* Abu-abu gelap */
    --light-gray: #f5f5f5; /* Abu-abu terang */
    --medium-gray: #6b7280; /* Abu-abu sedang untuk teks */
    --dark-gray: #4b5563; /* Abu-abu gelap untuk judul */
    --footer-bg: #2d3748; /* Abu-abu lebih gelap untuk footer */
    --red-color: #ef4444; /* Merah untuk badge diskon */
}

.header {
    background-color: var(--secondary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 100px;
}

.nav-desktop ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-desktop a {
    text-decoration: none;
    color: var(--medium-gray);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-desktop a:hover {
    color: var(--primary-color);
}

.header-icons {
    display: flex;
    gap: 16px;
}

.header-icons .icon {
    color: var(--medium-gray);
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.header-icons .icon:hover {
    color: var(--primary-color);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 8px;
}

.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.nav-mobile.active {
    display: block;
}

.nav-mobile ul {
    list-style: none;
    padding: 10px 20px;
}

.nav-mobile li {
    margin-bottom: 10px;
}

.nav-mobile a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    display: block;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.nav-mobile a:hover {
    color: var(--primary-color);
}

.nav-mobile a i {
    margin-right: 10px;
}

.footer {
    background-color: var(--footer-bg);
    color: var(--medium-gray);
    padding: 60px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.footer-column p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-column ul li a {
    text-decoration: none;
    color: var(--medium-gray);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--medium-gray);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.social-icon:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: #a0aec0;
}

/* --- Cart Section Specific Styles --- */
.cart-section {
    padding: 50px 0;
    background-color: var(--light-gray);
}

.back-button-wrapper {
    margin-bottom: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 9999px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-button i {
    margin-right: 8px;
}

.back-button:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.cart-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 40px;
    text-align: center;
}

.cart-content-wrapper {
    display: flex;
    gap: 30px;
}

.cart-items-panel {
    flex: 2; /* Mengambil 2 bagian dari ruang fleksibel */
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; /* Garis pemisah antar item */
}

.cart-item:last-of-type {
    border-bottom: none; /* Hapus border di item terakhir sebelum kupon */
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item img {
    width: 100px; /* Ukuran gambar produk di keranjang */
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details {
    flex-grow: 1; /* Ambil ruang sebanyak mungkin */
}

.item-name {
    font-size: 1.125rem; /* ~18px */
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.item-size {
    font-size: 0.9375rem; /* ~15px */
    color: var(--medium-gray);
    margin-bottom: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: fit-content;
    overflow: hidden;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-value {
    padding: 8px 15px;
    font-size: 1rem;
    font-weight: 600;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.item-price {
    font-size: 1.25rem; /* ~20px */
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    white-space: nowrap; /* Pastikan harga tidak pecah baris */
}

.item-price s {
    font-size: 0.9375rem; /* ~15px */
    font-weight: 400;
    color: var(--medium-gray);
    margin-left: 8px;
}

/* Coupon Section */
.coupon-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee; /* Garis pemisah dari item */
}

.coupon-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.coupon-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 201, 151, 0.2);
}

.apply-coupon-button {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.apply-coupon-button:hover {
    background-color: var(--primary-dark-color);
}

.coupon-hint {
    font-size: 0.875rem; /* ~14px */
    color: var(--medium-gray);
    margin-top: 10px;
    text-align: left;
    width: 100%; /* Ambil lebar penuh di bawah input/button */
}


.order-summary-panel {
    flex: 1; /* Mengambil 1 bagian dari ruang fleksibel */
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: fit-content; /* Sesuaikan tinggi dengan konten */
}

.summary-title {
    font-size: 1.5rem; /* ~24px */
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--medium-gray);
    margin-bottom: 10px;
}

.summary-item span:first-child {
    flex-grow: 1;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem; /* ~20px */
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 25px;
}

.checkout-button {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 15px 25px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.checkout-button:hover {
    background-color: var(--primary-dark-color);
    transform: translateY(-2px);
}

/* --- Responsive Design --- */

/* Tablet (Max-width 768px) */
@media (max-width: 768px) {
    .header-icons,
    .nav-desktop {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .header-container {
        padding: 0 20px;
    }

    .nav-mobile.active {
        display: block;
    }

    .nav-mobile ul {
        padding: 10px 20px;
    }

    .nav-mobile li {
        margin-bottom: 10px;
    }

    .nav-mobile a {
        padding: 10px 0;
    }

    .cart-section {
        padding: 40px 0;
    }

    .cart-content-wrapper {
        flex-direction: column; /* Stack panels vertically */
        gap: 20px;
    }

    .cart-items-panel,
    .order-summary-panel {
        padding: 25px;
    }

    .cart-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .cart-item {
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: center; /* Center items when wrapped */
        text-align: center;
    }

    .cart-item img {
        width: 80px;
        height: 80px;
        margin-right: 0; /* Remove margin for centering */
        margin-bottom: 10px;
    }

    .item-details {
        text-align: center;
        flex-basis: 100%; /* Take full width when wrapped */
    }

    .item-size {
        margin-bottom: 5px;
    }

    .quantity-control {
        margin: 0 auto 10px auto; /* Center quantity control */
    }

    .item-price {
        flex-basis: 100%; /* Take full width for price */
        text-align: center;
    }

    .coupon-section {
        flex-direction: column; /* Stack coupon input and button */
        gap: 10px;
        align-items: flex-start; /* Align elements to start */
    }

    .coupon-input,
    .apply-coupon-button {
        width: 100%; /* Full width */
    }

    .summary-title {
        font-size: 1.3rem;
    }

    .checkout-button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Footer adjustments */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-column ul {
        padding: 0;
    }

    .footer-column ul li {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }
}

/* Handphone (Max-width 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .cart-section {
        padding: 30px 0;
    }

    .back-button-wrapper {
        margin-bottom: 20px;
    }

    .back-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .cart-title {
        font-size: 1.75rem;
        margin-bottom: 25px;
    }

    .cart-items-panel,
    .order-summary-panel {
        padding: 20px;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
    }

    .item-name {
        font-size: 1rem;
    }

    .item-size {
        font-size: 0.875rem;
    }

    .quantity-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .quantity-value {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .item-price {
        font-size: 1rem;
    }

    .item-price s {
        font-size: 0.8rem;
    }

    .coupon-section {
        margin-top: 20px;
        padding-top: 15px;
    }

    .coupon-input,
    .apply-coupon-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .coupon-hint {
        font-size: 0.8rem;
    }

    .summary-title {
        font-size: 1.2rem;
    }

    .summary-item {
        font-size: 0.9rem;
    }

    .summary-total {
        font-size: 1.1rem;
    }

    .checkout-button {
        padding: 10px 15px;
        font-size: 1rem;
    }

    /* Footer adjustments */
    .footer {
        padding: 40px 0 15px;
    }

    .footer-column h3 {
        font-size: 1.125rem;
        margin-bottom: 15px;
    }

    .footer-column p,
    .footer-column ul li,
    .footer-bottom p {
        font-size: 0.875rem;
    }
}
