body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fb;
    color: #1f2533;
    letter-spacing: -0.2px;
}

h2 {
    font-weight: 700;
    font-size: 22px;
    margin: 0 0 8px 0;
}

h3 {
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 4px 0;
}

p {
    font-weight: 400;
    line-height: 1.45;
    color: #4b5563;
    margin: 0;
}

.container {
    width: 92%;
    max-width: 1150px;
    margin: auto;
    padding: 20px 0;
}

.product-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 25px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.product-logo {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}
.product-description {
    max-width: 700px;
}

.product-description h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.product-description p {
    white-space: pre-line;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
    margin-top: 10px;
}


.badge-stats {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    flex-shrink: 0;
}

.badge {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -.3px;
    color: white;
    border: none;
    display: flex;
    align-items: center;
}

.badge.purple { background: linear-gradient(135deg, #1e88e5 0%, #1e88e5 100%); }
.badge.green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.badge.dark { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); }

.section-note {
    background: white;
    border-radius: 10px;
    padding: 12px 18px;
    margin: 18px 0;
    font-size: 15px;
    border-left: 4px solid #6d5dfc;
}

.tab-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tab {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.tab.active {
    background: linear-gradient(135deg, #64b5f6 0%, #1e88e5 100%);
    color: white;
}

.tab:hover:not(.active) {
    background: #d1d5db;
}

.subtitle {
    margin-top: -5px;
    color: #555;
    font-size: 14px;
    margin-bottom: 20px;
}

 
 .card {
    background: white;
    padding: 14px 16px; /* DIKURANGI dari 18px */
    border-radius: 12px; /* DIKURANGI dari 14px */
    box-shadow: 0 3px 10px rgba(0,0,0,.06);
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: auto; /* DIBUAH menjadi auto */
}

 .card:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 93, 252, 0.12);
    border-color: #6d5dfc;
}


.card:hover:not(.disabled) .select-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
}

.card.selected {
    border-color: #6d5dfc;
    background: linear-gradient(135deg, #faf9ff 0%, #f5f3ff 100%);
    box-shadow: 0 6px 20px rgba(109, 93, 252, 0.15);
}

.card.disabled {
    opacity: .55;
    cursor: not-allowed;
}

.card.disabled .select-btn {
    background: #9ca3af;
    cursor: not-allowed;
}
.select-btn {
    margin-top: 10px; /* DIPERKECIL dari 16px */
    padding: 8px; /* DIPERKECIL dari 10px */
    font-size: 12px; /* DIKECILKAN dari 13px */
    gap: 4px; /* DITAMBAHKAN untuk icon lebih rapat */
}

.select-btn .material-icons {
    font-size: 14px; /* DIKECILKAN dari 16px */
    margin-right: 2px; /* DITAMBAHKAN */
}

.selected-indicator {
    margin-top: 8px; /* DIPERKECIL dari 12px */
    padding: 6px; /* DIPERKECIL dari 8px */
    font-size: 12px; /* DIKECILKAN dari 13px */
}

.selected-indicator .material-icons {
    font-size: 14px; /* DIKECILKAN dari 16px */
}

/* Perbaikan jarak teks stock info */
.card > div:nth-child(4) {
    margin-top: 8px; /* DIPERKECIL dari 12px */
    gap: 6px; /* DIPERKECIL dari 8px */
}

.card > div:nth-child(4) > div:first-child {
    font-size: 12px; /* DIKECILKAN dari 13px */
}

/* Jarak untuk badge TERBATAS */
.card > div:nth-child(4) > div:last-child {
    font-size: 10px; /* DIKECILKAN dari 11px */
}

/* Variant Grid - kurangi gap antar card */
.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px; /* DIPERKECIL dari 14px */
}

 .card-status {
    font-size: 11px; /* DIKECILKAN dari 12px */
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px; /* DIPERKECIL dari 8px */
    padding: 4px 8px; /* DIPERKECIL dari 6px 10px */
    border-radius: 6px;
    display: inline-block;
    text-transform: uppercase;
    max-width: 140px; /* DIPERKECIL dari 160px */
}

.card-status.tersedia { 
    background: rgba(34, 197, 94, 0.1); 
    color: #22c55e; 
}

.card-status.habis { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
}

 /* Edit bagian btn-add-field untuk lebih kompak */
.btn-add-field {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #475569;
    padding: 6px 12px; /* DIPERKECIL dari 8px 16px */
    border-radius: 6px; /* DIPERKECIL dari 8px */
    font-size: 13px; /* DIKECILKAN dari 14px/0.9rem */
    transition: all 0.2s;
    margin-right: 6px; /* DIPERKECIL dari 8px */
    margin-bottom: 6px; /* DIPERKECIL dari 8px */
    display: inline-flex;
    align-items: center;
    gap: 4px; /* JARAK icon dan text */
    cursor: pointer;
}

.btn-add-field:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* Tambahkan juga untuk material icons di dalam btn-add-field */
.btn-add-field .material-icons {
    font-size: 14px !important; /* DIKECILKAN dari 16px */
    margin-right: 2px; /* DITAMBAHKAN untuk spacing yang lebih rapat */
}

/* Perbaikan additional field container */
.additional-field {
    margin-bottom: 12px; /* DIPERKECIL dari 1rem (16px) */
    animation: slideDown 0.3s ease;
    padding: 10px; /* DIPERKECIL dari 12px */
    border-radius: 6px; /* DIPERKECIL dari 8px */
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
}

/* Perbaikan form-label di additional field */
.additional-field .form-label {
    font-size: 13px; /* DIKECILKAN dari 14px/0.9rem */
    margin-bottom: 6px; /* DIPERKECIL */
}

/* Perbaikan input di additional field */
.additional-field input {
    padding: 8px; /* DIPERKECIL dari 12px */
    font-size: 13px; /* DIKECILKAN */
    border-radius: 6px; /* DIPERKECIL dari 8px */
}

/* Tombol hapus field */
.btn-remove-field .material-icons {
    font-size: 16px !important; /* DIKECILKAN dari 18px */
}
.card-title {
    font-size: 14px; /* DIKECILKAN dari 15px */
    font-weight: 600;
    letter-spacing: -.2px;
    margin: 4px 0 6px; /* DIPERKECIL margin */
    color: #1f2937;
    padding-right: 45px; /* DIPERKECIL */
    line-height: 1.3; /* DIPERKECIL dari 1.4 */
}

.card-price {
    display: flex;
    align-items: center;
    gap: 6px; /* DIPERKECIL dari 8px */
    margin-top: 6px; /* DIPERKECIL dari 10px */
}

.price {
    font-size: 16px; /* DIKECILKAN dari 18px */
    color: #1f2937;
    font-weight: 700;
}

.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 12px; /* DIKECILKAN dari 13px */
}
.disc {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.select-btn {
    transition: all 0.2s ease;
}

.select-btn:hover:not(.card.disabled .select-btn) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 93, 252, 0.25);
}

/* Modal Styles */
.modal-content {
    border-radius: 14px !important;
    border: none !important;
}

.btn-close-modal {
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #e5e7eb !important;
}

/* Responsive */
@media (max-width: 680px) {
    .product-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .product-logo {
        width: 90px;
        height: 90px;
        margin-bottom: 0;
    }

    .product-description {
        max-width: 100%;
    }

    .badge-stats {
        margin-top: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .variant-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        width: 94%;
        padding: 16px 0;
    }
    
    .card-title {
        padding-right: 40px;
    }
}

@media (max-width: 480px) {
    .product-header {
        padding: 20px;
    }
    
    .section-note {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .tab-selector {
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .tab {
        white-space: nowrap;
    }
}

/* Animation for selection */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.card.selected {
    animation: pulse 0.3s ease;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #64b5f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Type badge animation */
@keyframes badgeFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

.card:hover:not(.disabled) .type-badge-container {
    animation: badgeFloat 1s ease infinite;
}
.type-badge-container {
    position: absolute;
    top: 12px; /* DIPERKECIL dari 14px */
    right: 12px; /* DIPERKECIL dari 14px */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px; /* DIPERKECIL dari 4px */
}

.type-badge-container > div:first-child {
    width: 28px; /* DIPERKECIL dari 32px */
    height: 28px; /* DIPERKECIL dari 32px */
    border-radius: 6px; /* DIPERKECIL dari 8px */
}

.type-badge-container .material-icons {
    font-size: 16px; /* DIKECILKAN dari 18px */
}

.type-badge-container > div:last-child {
    font-size: 9px; /* DIKECILKAN dari 10px */
}
/* Material Icons */
.material-icons {
    vertical-align: middle;
}

/* Fee Info */
.fee-info {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.fee-breakdown {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.fee-total {
    border-top: 1px solid #e2e8f0;
    margin-top: 5px;
    padding-top: 8px;
    font-weight: bold;
}