/* GLOBAL STYLES */
:root {
    --primary: #2563eb; --primary-dark: #1e40af; --accent: #f59e0b; --danger: #ef4444;
    --dark: #0f172a; --light: #f8fafc; --white: #ffffff; --gray: #64748b;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
body { font-family: 'Poppins', 'Padauk', sans-serif; background-color: var(--light); color: var(--dark); margin: 0; padding-bottom: 80px; }
a { text-decoration: none; }

/* HEADER */
.header-main { background: var(--primary); padding: 15px 20px; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.top-row { display: flex; justify-content: center; align-items: center; margin-bottom: 12px; position: relative; }
.brand-logo { color: var(--white); font-size: 1.5rem; font-weight: 800; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.search-container { position: relative; }
.search-input { width: 100%; padding: 12px 20px; padding-left: 45px; border-radius: 30px; border: none; font-family: 'Padauk'; box-sizing: border-box; outline:none; }
.search-btn { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); color: var(--gray); background: none; border: none; padding: 10px; cursor: pointer; }

/* HERO SLIDER */
.hero-section { padding: 15px; }
.slider-container { display: flex; overflow-x: auto; gap: 10px; scrollbar-width: none; border-radius: 15px; }
.slider-item { min-width: 100%; height: 180px; border-radius: 15px; background-color: var(--primary); display: flex; align-items: center; justify-content: space-between; padding: 20px; box-sizing: border-box; color: white; position: relative; overflow: hidden; }

/* SERVICES SCROLL */
.services-section { padding: 15px 15px 5px 15px; }
.section-title { font-weight: 700; font-size: 1rem; margin-bottom: 10px; color: var(--dark); }
.h-scroll { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.scroll-item { min-width: 80px; text-align: center; text-decoration: none; color: var(--gray); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.icon-box { width: 60px; height: 60px; background: white; border-radius: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.item-label { font-size: 0.75rem; font-weight: 500; }

/* FLASH SALE */
.flash-container { background: linear-gradient(to right, #fff1f2, #fff); padding: 15px 0; margin-bottom: 10px; }
.flash-header { padding: 0 15px 10px 15px; display: flex; gap: 10px; align-items: center; }
.timer-badge { background: var(--danger); color: white; padding: 2px 8px; border-radius: 5px; font-weight: bold; font-size: 0.8rem; }
.flash-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 15px; scrollbar-width: none; }
.flash-card { min-width: 140px; background: var(--white); border-radius: 12px; padding: 10px; border: 1px solid #fecaca; }

/* PRODUCT GRID & LIST */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 15px; }
.product-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative; }
.p-image-box { height: 160px; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f1f5f9; }
.p-image-box img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.p-details { padding: 12px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.p-brand { font-size: 0.7rem; color: var(--gray); text-transform: uppercase; }
.p-name { font-weight: 600; font-size: 0.9rem; margin: 4px 0; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-price { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.p-old-price { color: var(--danger); text-decoration: line-through; font-size: 0.8rem; margin-left: 5px; opacity: 0.7; }
.btn-buy { background: var(--primary); color: white; border: none; width: 100%; padding: 8px; border-radius: 8px; margin-top: 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-align: center; }
.badge-promo { position: absolute; top: 10px; left: 10px; background: var(--danger); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; z-index: 2; }

/* PRODUCT LIST VIEW */
.product-list { display: flex; flex-direction: column; gap: 10px; padding: 0 15px; }
.list-card { background: white; border-radius: 12px; padding: 10px; display: flex; gap: 15px; box-shadow: var(--shadow); text-decoration: none; color: inherit; align-items: center; }
.list-img { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; border: 1px solid #f1f5f9; }
.list-info { flex-grow: 1; }

/* TOOLBAR & PAGINATION */
.toolbar { padding: 15px; background: white; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.85rem; }
.view-btn { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 5px; color: var(--gray); }
.view-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.custom-select { padding: 5px; border: 1px solid #e2e8f0; border-radius: 5px; }
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; padding: 0 15px; }
.page-link { padding: 8px 14px; background: white; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; color: var(--dark); font-weight: 600; }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }

/* FOOTER & NAV */
.site-footer { background: var(--dark); color: #94a3b8; padding: 30px 20px 100px 20px; font-size: 0.85rem; margin-top: 30px; }
.footer-link { display: block; color: white; margin: 10px 0; text-decoration: none; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.98); padding: 10px 0; display: flex; justify-content: space-around; border-top: 1px solid #e2e8f0; z-index: 900; }
.nav-item { text-align: center; color: var(--gray); text-decoration: none; font-size: 0.7rem; display: flex; flex-direction: column; align-items: center; }
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item i { font-size: 1.3rem; margin-bottom: 4px; }

/* BRAND SECTION */
.brand-section { padding: 10px 15px; background: white; margin-bottom: 10px; }
.brand-scroll { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.brand-item { display: flex; flex-direction: column; align-items: center; min-width: 65px; text-decoration: none; color: var(--gray); gap: 5px; }
.brand-img-box { width: 60px; height: 60px; border-radius: 50%; border: 1px solid #eee; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 5px; box-sizing: border-box; }
.brand-img { width: 100%; height: 100%; object-fit: contain; }
.brand-item.active .brand-img-box { border-color: var(--primary); border-width: 2px; }
.brand-item.active .brand-name { color: var(--primary); font-weight: 700; }
/* ========================================= */
/* PRODUCT DETAIL PAGE CSS */
/* ========================================= */

/* Header/Nav */
.top-nav { background: white; padding: 15px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 99; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.back-btn { font-size: 1.2rem; color: #333; text-decoration: none; }
.home-btn { font-size: 1.2rem; color: #333; text-decoration: none; }

/* Gallery */
.gallery-container { background: white; padding: 20px; text-align: center; position: relative; }
.main-img { width: 100%; height: 280px; object-fit: contain; transition: 0.3s; }
.thumb-list { display: flex; justify-content: center; gap: 10px; margin-top: 15px; overflow-x: auto; }
.thumb { width: 50px; height: 50px; border: 2px solid #eee; border-radius: 8px; object-fit: cover; cursor: pointer; }
.thumb.active { border-color: var(--primary); }

/* Info Box */
.info-box { padding: 20px; background: white; margin-top: 10px; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.03); }
.brand-tag { background: #eff6ff; color: var(--primary); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.promo-tag { background: var(--danger); color: white; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; display: inline-block; margin-left: 5px; }

.p-title { font-size: 1.3rem; font-weight: 700; margin: 10px 0; line-height: 1.4; }
.p-price { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.old-price { font-size: 1rem; color: #94a3b8; text-decoration: line-through; margin-left: 10px; }
.stock-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }

/* Details & Specs */
.details-section { margin-top: 25px; }
.section-head { font-weight: 700; margin-bottom: 10px; font-size: 1rem; border-left: 4px solid var(--primary); padding-left: 10px; color: #334155; }
.text-content { color: #64748b; line-height: 1.7; font-size: 0.95rem; white-space: pre-wrap; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.specs-table td { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.specs-table td:first-child { color: #64748b; width: 40%; }
.specs-table td:last-child { font-weight: 600; color: #334155; }

/* Action Bar */
.action-bar { 
    position: fixed; bottom: 0; left: 0; right: 0; background: white; padding: 15px; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1); display: grid; grid-template-columns: auto 1fr; gap: 10px; z-index: 100; 
}
.icon-btn { 
    width: 50px; height: 50px; background: #f1f5f9; border-radius: 12px; display: flex; 
    align-items: center; justify-content: center; color: var(--primary); text-decoration: none; font-size: 1.2rem; 
}
.buy-btn { 
    background: var(--primary); color: white; border: none; border-radius: 12px; font-weight: bold; font-size: 1rem; 
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; 
}

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: flex-end; }
.modal.open { display: flex; animation: slideUp 0.3s; }
@keyframes slideUp { from {transform: translateY(100%);} to {transform: translateY(0);} }
.modal-content { background: white; width: 100%; max-width: 500px; padding: 25px; border-radius: 20px 20px 0 0; position: relative; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; color: #94a3b8; cursor: pointer; }
.form-input { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 15px; box-sizing: border-box; font-family: 'Padauk'; }

/* Modal Buttons (Side-by-Side) */
.btn-group { display: flex; gap: 10px; margin-top: 10px; }
.viber-btn { flex: 1; background: #7360f2; color: white; padding: 12px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tele-btn { flex: 1; background: #229ED9; color: white; padding: 12px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }