/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #f4f6f8;
    color: #333;
    padding-bottom: 40px;
html, body {
    overscroll-behavior-y: none;
}
/* Custom Scrollbar Hide */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;  /* IE & Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ==========================================
   HEADER & MARQUEE
   ========================================== */
.store-header {
    background: #ff4757;
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-circle {
    width: 38px;
    height: 38px;
    background: white;
    color: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-header-icon {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-header-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cart-badge {
    background: #2ed573;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 6px;
}

/* Marquee Text Running */
.marquee-wrapper {
    background: #ffeaa7;
    color: #d63031;
    font-size: 0.8rem;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: inset 0 -1px 3px rgba(0,0,0,0.05);
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 18s linear infinite;
    font-weight: 600;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* ==========================================
   MAIN CONTAINER & SEARCH
   ========================================== */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    font-size: 0.9rem;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #ff4757;
}

/* ==========================================
   KATALOG GRID & CATEGORIES
   ========================================== */
.category-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media(min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media(min-width: 800px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   MODAL FIX & STICKY FOOTER BUTTONS
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    display: flex !important;
    flex-direction: column !important;
    max-height: 88vh !important;
    overflow: hidden !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1rem;
    color: #2d3748;
}

.btn-close-modal {
    background: #edf2f7;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    color: #718096;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Isi Modal Bisa Di-scroll */
.modal-body,
.modal-content > div:nth-child(2) {
    overflow-y: auto !important;
    flex: 1 !important;
    padding: 16px !important;
}

/* Kunci Tombol Paling Bawah Biar Nempel & Melayang (Sticky Footer) */
.modal-footer,
.modal-content > div:last-child {
    position: sticky !important;
    bottom: 0 !important;
    background: #ffffff !important;
    padding: 12px 16px !important;
    border-top: 1px solid #edf2f7 !important;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.06) !important;
    z-index: 9999 !important;
    margin: 0 !important;
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(45, 55, 72, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}
