/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #e63946;
  --red-dark: #c1121f;
  --red-light: #fff0f1;
  --navy: #1d3557;
  --green: #2d6a4f;
  --gold: #f4a261;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-400: #ced4da;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --white: #ffffff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.13);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: .2s ease;
}
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--gray-800); background: var(--gray-100); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; cursor: pointer; border: 2px solid transparent; transition: all var(--transition); }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--red); }
.btn-white:hover { background: var(--red-light); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); }
.full-width { width: 100%; text-align: center; }

/* ===== TOP BAR ===== */
.top-bar { background: var(--navy); color: rgba(255,255,255,.85); font-size: 12px; padding: 6px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: rgba(255,255,255,.85); transition: color var(--transition); }
.top-bar a:hover { color: #fff; }

/* ===== HEADER ===== */
.header { background: #fff; box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 16px; }

.logo { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.logo-main { color: var(--red); }
.logo-dot { color: var(--navy); font-size: 20px; }

.search-bar { flex: 1; display: flex; border: 2px solid var(--gray-200); border-radius: 8px; overflow: hidden; transition: border-color var(--transition); }
.search-bar:focus-within { border-color: var(--red); }
.search-category { border: none; border-right: 1px solid var(--gray-200); padding: 0 12px; font-size: 12px; color: var(--gray-600); background: var(--gray-50); cursor: pointer; outline: none; font-family: inherit; }
.search-input { flex: 1; border: none; padding: 10px 14px; font-size: 14px; outline: none; font-family: inherit; }
.search-btn { background: var(--red); border: none; padding: 0 16px; color: #fff; cursor: pointer; transition: background var(--transition); }
.search-btn:hover { background: var(--red-dark); }

.header-actions { display: flex; gap: 4px; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--gray-800); transition: all var(--transition); font-size: 11px; font-weight: 500; position: relative; }
.action-btn:hover { background: var(--gray-100); color: var(--red); }
.cart-count { position: absolute; top: 4px; right: 6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sign-in-btn { background: var(--red); color: #fff !important; padding: 8px 16px; }
.sign-in-btn:hover { background: var(--red-dark) !important; color: #fff !important; }

/* ===== NAV ===== */
.main-nav { background: var(--navy); }
.nav-inner { display: flex; align-items: center; gap: 0; }
.nav-all-btn { background: var(--red); color: #fff; border: none; padding: 12px 20px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; font-family: inherit; transition: background var(--transition); }
.nav-all-btn:hover { background: var(--red-dark); }
.nav-links { display: flex; align-items: center; }
.nav-links li a { display: block; padding: 12px 14px; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; transition: all var(--transition); }
.nav-links li a:hover, .nav-links li a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-links li a.flash-sale { color: #ffd700; font-weight: 600; }
.nav-links li a.flash-sale:hover { color: #fff; }

/* ===== MEGA MENU ===== */
.mega-menu { display: none; background: #fff; border-top: 1px solid var(--gray-200); box-shadow: var(--shadow-lg); position: absolute; width: 100%; z-index: 999; }
.mega-menu.open { display: block; }
.mega-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 28px 16px; }
.mega-col h4 { font-size: 13px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.mega-col ul li { margin-bottom: 6px; }
.mega-col ul li a { font-size: 13px; color: var(--gray-600); transition: color var(--transition); }
.mega-col ul li a:hover { color: var(--red); padding-left: 4px; }

/* ===== HERO ===== */
.hero { position: relative; overflow: hidden; }
.hero-slider { position: relative; }
.hero-slide { display: none; padding: 60px 0; min-height: 360px; }
.hero-slide.active { display: block; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-text { flex: 1; color: #fff; }
.hero-tag { display: inline-block; background: rgba(255,255,255,.2); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hero-text h1 { font-family: 'Playfair Display', serif; font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero-sub { font-size: 16px; opacity: .9; margin-bottom: 28px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img { flex-shrink: 0; }
.hero-visual { font-size: 120px; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(0,0,0,.2)); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: transparent; cursor: pointer; transition: all var(--transition); }
.dot.active { background: #fff; width: 28px; border-radius: 5px; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.25); border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: background var(--transition); }
.hero-arrow:hover { background: rgba(255,255,255,.45); }
.hero-arrow.left { left: 16px; }
.hero-arrow.right { right: 16px; }

/* ===== CATEGORY PILLS ===== */
.categories-strip { background: #fff; padding: 16px 0; border-bottom: 1px solid var(--gray-200); }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.cat-pills::-webkit-scrollbar { height: 3px; }
.cat-pills::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
.cat-pill { flex-shrink: 0; display: inline-block; padding: 8px 16px; background: var(--gray-100); border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--gray-800); transition: all var(--transition); border: 1px solid var(--gray-200); }
.cat-pill:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

/* ===== PROMO ROW ===== */
.promo-row { padding: 24px 0; }
.promo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.promo-card { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-radius: var(--radius); font-weight: 600; }
.promo-card h3 { font-size: 18px; margin: 6px 0; }
.promo-label { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.promo-link { font-size: 13px; opacity: .9; transition: opacity var(--transition); }
.promo-link:hover { opacity: 1; }
.promo-emoji { font-size: 52px; }
.promo-red { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; }
.promo-blue { background: linear-gradient(135deg, #1d3557, #457b9d); color: #fff; }
.promo-green { background: linear-gradient(135deg, #2d6a4f, #1b4332); color: #fff; }

/* ===== SECTIONS ===== */
.products-section, .dual-section { padding: 32px 0; background: #fff; margin-bottom: 12px; }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title { font-size: 20px; font-weight: 700; color: var(--navy); flex: 1; min-width: 180px; }
.see-all { font-size: 13px; color: var(--red); font-weight: 600; margin-left: auto; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab { padding: 5px 14px; border: 1px solid var(--gray-300,#dee2e6); border-radius: 20px; background: transparent; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--gray-600); font-family: inherit; transition: all var(--transition); }
.filter-tab:hover, .filter-tab.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== FLASH SALE ===== */
.flash-sale-section { background: #fff; padding: 32px 0; margin-bottom: 12px; }
.countdown { display: flex; align-items: center; gap: 4px; }
.cd-box { background: var(--red); color: #fff; padding: 6px 10px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.cd-box span { font-size: 20px; font-weight: 700; line-height: 1; }
.cd-box small { font-size: 10px; opacity: .8; }
.cd-sep { font-size: 20px; font-weight: 700; color: var(--red); }

/* ===== PRODUCTS GRID ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.products-grid.grid-2 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ===== PRODUCT CARD ===== */
.product-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; transition: all var(--transition); cursor: pointer; position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card:hover .card-actions { opacity: 1; }
.card-thumb { position: relative; background: var(--gray-50); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-thumb-emoji { font-size: 80px; transition: transform .3s ease; }
.product-card:hover .card-thumb-emoji { transform: scale(1.1); }
.card-badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.card-badge.badge-new { background: var(--green); }
.card-badge.badge-hot { background: #f4a261; }
.card-actions { position: absolute; bottom: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity var(--transition); }
.card-act-btn { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); font-size: 16px; transition: all var(--transition); }
.card-act-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.card-body { padding: 12px; }
.card-cat { font-size: 11px; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.card-name { font-size: 13px; font-weight: 600; color: var(--gray-800); line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.stars { color: #ffd700; font-size: 12px; }
.rating-count { font-size: 11px; color: var(--gray-600); }
.card-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-current { font-size: 16px; font-weight: 700; color: var(--red); }
.price-original { font-size: 12px; color: var(--gray-600); text-decoration: line-through; }
.price-discount { font-size: 11px; font-weight: 700; color: var(--green); }
.card-footer { padding: 10px 12px; border-top: 1px solid var(--gray-200); }
.add-to-cart { width: 100%; padding: 8px; background: var(--red); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background var(--transition); }
.add-to-cart:hover { background: var(--red-dark); }

/* ===== DUAL SECTION ===== */
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.dual-col {}

/* ===== BANNER AD ===== */
.banner-ad { padding: 24px 0; }
.banner-ad-card { background: linear-gradient(135deg, #f4a261, #e76f51); border-radius: var(--radius); padding: 40px; display: flex; align-items: center; justify-content: space-between; }
.ba-text { color: #fff; }
.ba-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: .85; margin-bottom: 8px; }
.ba-text h2 { font-family: 'Playfair Display', serif; font-size: 28px; margin-bottom: 8px; }
.ba-text p { opacity: .9; margin-bottom: 20px; }
.ba-visual { font-size: 72px; letter-spacing: 8px; }

/* ===== FEATURES ROW ===== */
.features-row { background: #fff; padding: 32px 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); margin-bottom: 12px; }
.features-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.feature-item { display: flex; align-items: flex-start; gap: 14px; }
.feature-icon { font-size: 36px; flex-shrink: 0; }
.feature-item h4 { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.feature-item p { font-size: 12px; color: var(--gray-600); }

/* ===== NEWSLETTER ===== */
.newsletter { background: var(--navy); padding: 48px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.newsletter h2 { font-family: 'Playfair Display', serif; font-size: 26px; color: #fff; margin-bottom: 6px; }
.newsletter p { color: rgba(255,255,255,.75); font-size: 14px; }
.newsletter-form { display: flex; gap: 10px; flex: 1; min-width: 280px; }
.newsletter-form input { flex: 1; padding: 12px 16px; border: none; border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; outline: none; }
.newsletter-form input:focus { box-shadow: 0 0 0 2px var(--red); }

/* ===== FOOTER ===== */
.footer { background: var(--gray-800); color: rgba(255,255,255,.8); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--red); }
.footer-desc { font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.social-links { display: flex; gap: 8px; }
.social-btn { width: 34px; height: 34px; background: rgba(255,255,255,.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; transition: background var(--transition); }
.social-btn:hover { background: var(--red); }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,.7); transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }
.footer-col p { font-size: 13px; margin-bottom: 6px; }
.payment-icons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pay-icon { padding: 4px 10px; background: rgba(255,255,255,.15); border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.5); }

/* ===== CART SIDEBAR ===== */
.cart-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1100; }
.cart-overlay.open { display: block; }
.cart-sidebar { position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: #fff; z-index: 1101; transition: right .3s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.cart-sidebar.open { right: 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--gray-200); }
.cart-header h3 { font-size: 16px; font-weight: 700; }
.close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-600); padding: 4px; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; padding: 48px 24px; }
.cart-empty p:first-child { font-size: 48px; }
.cart-empty p { font-size: 14px; color: var(--gray-600); margin-bottom: 16px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.ci-thumb { width: 60px; height: 60px; background: var(--gray-100); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.ci-info { flex: 1; }
.ci-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ci-price { font-size: 14px; font-weight: 700; color: var(--red); }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ci-qty button { width: 24px; height: 24px; border: 1px solid var(--gray-400); border-radius: 4px; background: none; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ci-qty span { font-size: 13px; font-weight: 600; }
.ci-remove { background: none; border: none; color: var(--gray-600); cursor: pointer; font-size: 16px; padding: 4px; }
.ci-remove:hover { color: var(--red); }
.cart-footer { padding: 16px; border-top: 1px solid var(--gray-200); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; margin-bottom: 14px; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--gray-800); color: #fff; padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: 500; z-index: 2000; transition: transform .3s ease, opacity .3s ease; opacity: 0; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== BACK TO TOP ===== */
.back-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; background: var(--red); color: #fff; border: none; border-radius: 50%; font-size: 18px; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; transition: all var(--transition); z-index: 999; }
.back-top.visible { opacity: 1; }
.back-top:hover { background: var(--red-dark); transform: translateY(-2px); }

/* ===== SKELETON LOADING ===== */
.skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: 6px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .search-bar { order: 3; flex-basis: 100%; }
  .hero-text h1 { font-size: 28px; }
  .promo-grid { grid-template-columns: 1fr; }
  .dual-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mega-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-content { flex-direction: column; text-align: center; }
  .hero-visual { font-size: 72px; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; }
  .ba-visual { display: none; }
  .products-grid { grid-template-columns: repeat(2,1fr); }
}
