* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #fff;
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.nav-brand .tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    position: relative;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-icon .badge {
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 1.5rem;
}

/* Promo Banner */
.promo-banner {
    background: var(--warning-color);
    color: white;
    text-align: center;
    padding: 0.75rem 0;
    font-weight: 600;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.product-status.tersedia {
    background: var(--success-color);
    color: white;
}

.product-status.terbatas {
    background: var(--warning-color);
    color: white;
}

.product-status.habis {
    background: var(--danger-color);
    color: white;
}

.product-image {
    padding: 2rem;
    background: var(--light);
    text-align: center;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.product-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.75rem 0;
}

.product-stock {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-icon {
    padding: 0.5rem 0.75rem;
    background: var(--light);
    border: 1px solid var(--border);
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: var(--border);
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Cart */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 80px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h3 {
    margin-bottom: 0.5rem;
}

.cart-item-category {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item-quantity {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quantity-input-small {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
}

.cart-item-subtotal {
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-remove .btn-remove {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.cart-item-remove .btn-remove:hover {
    opacity: 1;
}

.cart-summary {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 2px solid var(--dark);
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.checkout-form {
    background: white;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.required {
    color: var(--danger-color);
}

.checkout-summary {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.order-item-name {
    font-weight: 600;
}

.order-item-qty {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.payment-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
}

.payment-methods {
    list-style: none;
    margin-top: 1rem;
}

.payment-methods li {
    padding: 0.5rem 0;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem auto;
    max-width: 1200px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Success/Failed Pages */
.success-page, .failed-page {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 0;
}

.success-icon, .failed-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.success-page h1 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.failed-page h1 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.order-info-box {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.info-row.total {
    font-weight: 700;
    font-size: 1.25rem;
    border-top: 2px solid var(--dark);
    margin-top: 1rem;
    padding-top: 1rem;
}

.notification-box {
    background: #dbeafe;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
}

.notification-box .note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.success-actions, .failed-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.help-box {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

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

.footer-section li {
    padding: 0.3rem 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.help-section {
    background: var(--light);
    padding: 3rem 0;
    text-align: center;
}

.help-section h2 {
    margin-bottom: 1rem;
}

.help-section p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Wishlist */
.wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.wishlist-remove .btn-remove {
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
}

.wishlist-remove .btn-remove:hover {
    opacity: 1;
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        gap: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
}
