/**
 * TOKOKU - Main Stylesheet
 * Desain Mobile-First, Bersih, Modern & Responsif
 */

:root {
    --primary-color: #00a651;
    --primary-hover: #008f45;
    --primary-light: #e8f8f0;
    --accent-orange: #ff7828;
    --accent-orange-light: #fff3eb;
    --dark-text: #1e293b;
    --muted-text: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --card-radius: 14px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--dark-text);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
}

/* Tombol Tokoku Hijau */
.btn-tokoku {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}
.btn-tokoku:hover, .btn-tokoku:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 166, 81, 0.25);
}

.btn-outline-tokoku {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}
.btn-outline-tokoku:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Card Styling */
.card-tokoku {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-tokoku:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Hero Banner with Custom Background Image
   ========================================================================== */
.tokoku-hero-banner {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background-color: #fef7ee;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.90) 45%, rgba(255, 255, 255, 0.40) 75%, rgba(255, 255, 255, 0.05) 100%), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    min-height: 320px;
}

@media (max-width: 991.98px) {
    .tokoku-hero-banner {
        background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.90) 70%, rgba(255, 255, 255, 0.5) 100%), url('../images/hero-bg.png');
        background-position: center bottom;
        min-height: auto;
    }
}

/* Badge Status Stok */
.badge-stock-in {
    background-color: #dcfce7;
    color: #166534;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
}
.badge-stock-warning {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
}
.badge-stock-out {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.78rem;
}

/* Badge Diskon */
.badge-discount {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 6px;
}

/* Price Display */
.price-current {
    color: #ef4444;
    font-weight: 700;
    font-size: 1.05rem;
}
.price-strike {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 0.82rem;
    margin-right: 4px;
}

/* Admin Sidebar Styling */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1040;
}

.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.admin-sidebar .nav-link {
    color: #475569;
    font-weight: 500;
    padding: 0.65rem 1.25rem;
    margin: 0.2rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.15s ease-in-out;
}

.admin-sidebar .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

.admin-sidebar .nav-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
    padding: 0.75rem 1.5rem 0.25rem;
}

.admin-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: #f8fafc;
}

.admin-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Mobile Admin */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    }
    .admin-sidebar.show {
        left: 0;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1030;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* Bottom Navigation Bar for Mobile */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    body.has-bottom-nav {
        padding-bottom: 70px;
    }
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background-color: #ffffff;
        border-top: 1px solid var(--border-color);
        z-index: 1020;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 500;
        position: relative;
    }
    .mobile-bottom-nav a.active {
        color: var(--primary-color);
        font-weight: 700;
    }
    .mobile-bottom-nav a i {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
    .mobile-bottom-nav .badge-cart {
        position: absolute;
        top: -4px;
        right: 4px;
        background-color: #ef4444;
        color: #ffffff;
        border-radius: 10px;
        font-size: 0.65rem;
        padding: 1px 5px;
    }
}

/* ==========================================================================
   PWA Android Install Bottom Sheet Modal
   ========================================================================== */
.tokoku-pwa-sheet {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    z-index: 1060;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px 20px 28px;
}

.tokoku-pwa-sheet.show {
    bottom: 60px; /* Di atas mobile bottom nav jika ada */
}

@media (min-width: 768px) {
    .tokoku-pwa-sheet {
        border-radius: 20px;
        bottom: -100%;
        right: 24px;
        left: auto;
        transform: none;
        max-width: 380px;
    }
    .tokoku-pwa-sheet.show {
        bottom: 24px;
    }
}

.tokoku-pwa-inner {
    position: relative;
}

.tokoku-pwa-close {
    position: absolute;
    top: -8px;
    right: -4px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.tokoku-pwa-close:hover {
    color: #334155;
}

.tokoku-pwa-icon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px;
}

