﻿:root {
    /* Color Palette - Elabstore Purple & Yellow */
    --cloud-dancer: #FAF5FF;
    --soft-beige: #EDE9FE;
    --warm-sand: #DDD6FE;
    
    /* Text Colors */
    --text-primary: #2E1065;
    --text-secondary: #4C1D95;
    --text-muted: #7C3AED;
    
    /* CTA & Accent Colors */
    --hyper-coral: #F59E0B;
    --coral-hover: #D97706;
    --accent-green: #8B5CF6;
    --accent-gold: #FCD34D;
    --ramadhan-green: #7C3AED;
    
    /* UI Colors */
    --border-light: #C4B5FD;
    --shadow-color: rgba(124, 58, 237, 0.1);
    --overlay: rgba(0, 0, 0, 0.5);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cloud-dancer);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--ramadhan-green) 0%, #4C1D95 100%);
    padding: var(--spacing-sm) 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.navbar-brand::before {
    content: "";
    font-size: 1.5rem;
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    list-style: none;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.navbar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--hyper-coral);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95) 0%, rgba(76, 29, 149, 0.95) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,200 600,300 T1200,300 L1200,600 L0,600 Z" fill="%237C3AED" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    color: var(--soft-beige);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--hyper-coral);
    color: white;
}

.btn-primary:hover {
    background-color: var(--coral-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background-color: var(--accent-green);
    color: white;
}

.btn-secondary:hover {
    background-color: #3db3ab;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--text-primary);
    color: white;
}

/* Icon-only add-to-cart button styling */
.add-to-cart-btn {
    background-color: #FFD400; /* brighter yellow */
    color: #000;
    padding: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0; /* hide text nodes if any */
    flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.add-to-cart-btn .icon { line-height: 1; display: inline-block; }
.add-to-cart-btn .icon svg { width:16px; height:16px; display:block; }

/* Make the Detail (outline) button match add-to-cart height and fill available space */
.product-actions > div .btn-outline {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    flex: 1 1 auto;
}

/* Accessible text hidden visually */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: var(--soft-beige);
}

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color: var(--hyper-coral);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: var(--spacing-md);
}

.product-category {
    color: var(--accent-green);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xs);
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hyper-coral);
}

.price-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.product-actions .btn {
    flex: 1;
    padding: 0.625rem;
    font-size: 0.875rem;
}

/* Cart */
.cart-item {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    gap: var(--spacing-md);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: var(--soft-beige);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.cart-item-price {
    color: var(--hyper-coral);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background-color: var(--hyper-coral);
    color: white;
    border-color: var(--hyper-coral);
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
}

/* Form */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Card */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: var(--spacing-md);
}

.card-header {
    border-bottom: 2px solid var(--soft-beige);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: var(--soft-beige);
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer p {
    color: var(--soft-beige);
    margin-bottom: var(--spacing-xs);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-links a {
    color: var(--accent-green);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--hyper-coral);
}

/* Alert */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design - Mobile First */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-md);
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-xs);
    }
    
    .navbar-menu a {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .categories {
        padding: var(--spacing-lg) 0;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .category-card {
        padding: var(--spacing-md);
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .product-card {
        padding: var(--spacing-sm);
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-details {
        padding: var(--spacing-sm);
    }
    
    .cart-summary {
        position: static;
        margin-top: var(--spacing-md);
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card {
        padding: var(--spacing-xs);
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-title {
        font-size: 0.85rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--soft-beige);
    border-top: 3px solid var(--hyper-coral);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-lg) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ramadhan Decorative Elements */
.ramadhan-pattern {
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(45, 106, 79, 0.05) 10px, rgba(45, 106, 79, 0.05) 20px);
}

.star-decoration::before {
    content: "✨";
    margin-right: 0.5rem;
}

.moon-decoration::before {
    content: "🌙";
    margin-right: 0.5rem;
}
