/* BaBa Ji - Custom Styles */
/* Claymorphism + Organic Theme */

:root {
    --primary: #1F6F43;
    --primary-light: #4CAF50;
    --accent-yellow: #F4B400;
    --warm-orange: #F97316;
    --bg-app: #F7FFF9;
    --bg-card: #FFFFFF;
    --bg-admin: #F1F5F9;
    --status-pending: #F59E0B;
    --status-delivery: #3B82F6;
    --status-completed: #16A34A;
    --status-cancelled: #EF4444;
}

/* Claymorphism Card */
.clay-card {
    background: var(--bg-card);
    border-radius: 1.25rem;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.06),
        -4px -4px 12px rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clay-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        10px 10px 20px rgba(0, 0, 0, 0.08),
        -6px -6px 16px rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Gradient Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(31, 111, 67, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(31, 111, 67, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-orange {
    background: linear-gradient(135deg, var(--warm-orange) 0%, #fb923c 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.btn-orange:hover {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-card);
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    box-shadow: 
        0 -4px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    min-width: 3.5rem;
}

.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--primary);
    background: rgba(31, 111, 67, 0.06);
}

.bottom-nav a i {
    font-size: 1.2rem;
    margin-bottom: 0.125rem;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.05),
        -3px -3px 10px rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        8px 8px 18px rgba(0, 0, 0, 0.08),
        -4px -4px 14px rgba(255, 255, 255, 0.8);
}

.product-card .product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f0fdf4;
}

.product-card .product-info {
    padding: 0.75rem;
}

/* Quantity Selector */
.qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    background: #fff;
}

.qty-selector button {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    transition: background 0.15s;
}

.qty-selector button:hover {
    background: #f0fdf4;
}

.qty-selector .qty-value {
    width: 2rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    border-left: 1.5px solid #e5e7eb;
    border-right: 1.5px solid #e5e7eb;
}

/* Badge */
.badge-stock {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Cart drawer */
.cart-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 24rem;
    z-index: 60;
    background: var(--bg-card);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Hero banner */
.hero-banner {
    background: linear-gradient(135deg, #1F6F43 0%, #4CAF50 50%, #66bb6a 100%);
    border-radius: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* Category Card */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: var(--bg-card);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.04), -2px -2px 8px rgba(255,255,255,0.6);
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 14px rgba(0,0,0,0.06), -3px -3px 10px rgba(255,255,255,0.8);
}

.category-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Search bar */
.search-bar {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1.5px solid #e5e7eb;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 2px 16px rgba(76, 175, 80, 0.15);
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

/* Spinner / loading */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out;
}

/* Mobile body padding for bottom nav */
@media (max-width: 768px) {
    body {
        padding-bottom: 5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.auth-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Admin Sidebar */
.admin-sidebar {
    background: linear-gradient(180deg, #1F6F43 0%, #174e33 100%);
    color: white;
    min-height: 100vh;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin: 0.125rem 0.5rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.12);
    color: white;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1F6F43;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    z-index: 80;
    box-shadow: 0 8px 24px rgba(31, 111, 67, 0.3);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Form inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}
