/* --- CSS DARI HTML ANDA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: #f9f9f9;
    color: #333;
}
.container {
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
}
.product-section {
    padding: 20px 0;
}
.product-container {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.product-image {
    flex: 1;
    padding: 20px;
    background-color: #fdfdfd;
}
.product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}
.product-details {
    flex: 1;
    padding: 30px;
}
.product-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}
.product-price {
    font-size: 24px;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 20px;
}
.product-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
}
.product-info {
    margin-bottom: 20px;
}
.info-item {
    display: flex;
    font-size: 16px;
    margin-bottom: 8px;
}
.info-label {
    font-weight: 600;
    width: 100px;
    color: #333;
}
.stock {
    color: #28a745;
    font-weight: 600;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 16px;
}

/* --- CSS BARU UNTUK UKURAN --- */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.size-option {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.size-option:hover {
    background-color: #f0f0f0;
}
.size-option.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.size-option.disabled {
    background-color: #f9f9f9;
    color: #ccc;
    cursor: not-allowed;
    text-decoration: line-through;
}
.stock-info {
    font-size: 14px;
    color: #e74c3c;
    margin-top: 5px;
    display: block;
    height: 1em; /* Cadangkan ruang agar layout tidak lompat */
}
/* --- AKHIR CSS BARU --- */

.quantity-selector {
    display: flex;
    align-items: center;
}
.quantity-input {
    width: 60px;
    text-align: center;
    font-size: 16px;
    padding: 8px;
    border: 1px solid #ddd;
    margin: 0 5px;
    -moz-appearance: textfield; /* Firefox */
}
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-btn {
    width: 35px;
    height: 35px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}
.buy-button {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.buy-button:hover {
    background-color: #218838;
}
.buy-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}
.buy-button i {
    margin-right: 10px;
}

/* Keranjang */
.cart-icon-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100;
}
.cart-icon-container i {
    font-size: 20px;
    color: #333;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}
.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-title {
    font-size: 24px;
    margin-bottom: 20px;
}
#cart-items-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}
.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Sembunyikan gambar di dalam keranjang */
.cart-item-img {
    display: none !important;
}
.cart-item-img { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; margin-right: 10px; }
.cart-item-details { flex-grow: 1; }
.cart-item-title { font-weight: 600; }
.cart-item-info { font-size: 14px; color: #777; }
.cart-item-price { font-weight: 600; margin-left: 10px; }
.cart-item-remove { background: #e74c3c; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; }

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
}
.confirm-button {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}
.confirm-button i { margin-right: 10px; }

/* Payment Modal */
.payment-summary { text-align: center; margin-bottom: 15px; }
.qris-code { text-align: center; margin-bottom: 15px; }
.qris-code img { max-width: 250px; }
.payment-instructions { margin-bottom: 20px; }
.payment-instructions h3 { margin-bottom: 10px; }
.payment-instructions ol { padding-left: 20px; }
.payment-instructions li { margin-bottom: 5px; }
#confirm-payment { background-color: #25D366; }

/* Responsive */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
    }
    .product-details {
        padding: 20px;
    }
}