/* =============================================
   SHOPEASY — Store CSS (DM Sans only)
   ============================================= */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A24;
  --accent: #1A1A2E;
  --green: #25D366;
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --border: #EBEBEB;
  --text: #1A1A1A;
  --muted: #6B7280;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-hover: 0 12px 40px rgba(0,0,0,.16);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--text); line-height:1.6; }

/* HEADER */
.header { position:sticky; top:0; z-index:100; background:rgba(255,255,255,.96); backdrop-filter:blur(12px); border-bottom:1px solid var(--border); }
.header-inner { max-width:1200px; margin:0 auto; padding:14px 20px; display:flex; align-items:center; gap:16px; }
.logo { font-weight:800; font-size:1.4rem; color:var(--primary); text-decoration:none; flex:1; letter-spacing:-.3px; }
.nav-links { display:flex; gap:20px; align-items:center; }
.nav-links a { text-decoration:none; color:var(--text); font-weight:500; font-size:.9rem; transition:color .2s; }
.nav-links a:hover { color:var(--primary); }
.btn-nav { background:var(--primary); color:white !important; padding:7px 16px; border-radius:30px; font-weight:600 !important; }
.cart-btn { background:var(--accent); color:white; border:none; padding:10px 18px; border-radius:30px; cursor:pointer; font-size:.9rem; font-weight:600; display:flex; align-items:center; gap:6px; transition:transform .15s; font-family:'DM Sans',sans-serif; }
.cart-btn:hover { transform:scale(1.05); }
.cart-count { background:var(--primary); color:white; border-radius:50%; width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; }
.hamburger { display:none; background:none; border:none; font-size:1.5rem; cursor:pointer; }
.mobile-menu { display:none; flex-direction:column; padding:10px 20px 16px; gap:12px; border-top:1px solid var(--border); }
.mobile-menu a { text-decoration:none; color:var(--text); font-size:1rem; font-weight:500; }
.mobile-menu.open { display:flex; }

/* HERO */
.hero { background:linear-gradient(135deg,#1A1A2E 0%,#16213E 50%,#0F3460 100%); color:white; padding:60px 20px; display:flex; align-items:center; min-height:360px; position:relative; overflow:hidden; }
.hero-content { max-width:600px; margin:0 auto; position:relative; z-index:2; text-align:center; }
.hero-badge { display:inline-block; background:rgba(255,107,53,.2); border:1px solid rgba(255,107,53,.5); color:#FF9A6C; padding:6px 14px; border-radius:30px; font-size:.85rem; font-weight:600; margin-bottom:16px; }
.hero h1 { font-size:clamp(1.8rem,5vw,2.8rem); font-weight:800; line-height:1.2; margin-bottom:14px; letter-spacing:-.5px; }
.hero h1 em { color:var(--primary); font-style:normal; }
.hero p { color:rgba(255,255,255,.7); font-size:1.05rem; margin-bottom:28px; }
.search-form { display:flex; background:white; border-radius:50px; overflow:hidden; box-shadow:0 8px 30px rgba(0,0,0,.3); max-width:480px; margin:0 auto; }
.search-form input { flex:1; border:none; padding:14px 20px; font-size:1rem; outline:none; font-family:'DM Sans',sans-serif; }
.search-form button { background:var(--primary); color:white; border:none; padding:14px 24px; font-weight:700; cursor:pointer; font-size:.95rem; transition:background .2s; font-family:'DM Sans',sans-serif; }
.search-form button:hover { background:var(--primary-dark); }
.hero-blob { position:absolute; right:-100px; top:-100px; width:500px; height:500px; background:radial-gradient(circle,rgba(255,107,53,.15) 0%,transparent 70%); border-radius:50%; }

/* TRUST BAR */
.trust-bar { display:flex; justify-content:center; background:var(--surface); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.trust-item { padding:14px 24px; font-size:.85rem; font-weight:600; color:var(--muted); border-right:1px solid var(--border); }
.trust-item:last-child { border-right:none; }

/* PRODUCTS */
.products-section { max-width:1200px; margin:0 auto; padding:40px 20px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; }
.section-header h2 { font-size:1.5rem; font-weight:800; letter-spacing:-.3px; }
.section-header span { color:var(--muted); font-size:.9rem; }
.products-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:24px; }
.product-card { background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; cursor:pointer; transition:transform .25s,box-shadow .25s; position:relative; }
.product-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-hover); }
.badge-discount { position:absolute; top:12px; left:12px; z-index:2; background:var(--primary); color:white; padding:4px 10px; border-radius:20px; font-size:.78rem; font-weight:700; }
.product-img { height:220px; background:#F3F4F6; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.product-img img { width:100%; height:100%; object-fit:cover; }
.img-placeholder { font-size:4rem; }
.product-info { padding:18px; }
.product-info h3 { font-size:1rem; font-weight:700; margin-bottom:8px; line-height:1.3; }
.stars { font-size:.85rem; margin-bottom:8px; }
.stars span { color:var(--muted); font-size:.8rem; margin-left:4px; }
.price-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.price { font-size:1.3rem; font-weight:700; color:var(--primary); }
.price-original { font-size:.9rem; color:var(--muted); text-decoration:line-through; }
.bullets { list-style:none; margin-bottom:14px; }
.bullets li { font-size:.8rem; color:var(--muted); padding:2px 0 2px 14px; position:relative; }
.bullets li::before { content:'✓'; position:absolute; left:0; color:var(--primary); font-weight:700; }
.btn-add { width:100%; background:var(--accent); color:white; border:none; padding:12px; border-radius:10px; font-weight:700; cursor:pointer; font-size:.9rem; transition:background .2s,transform .1s; font-family:'DM Sans',sans-serif; }
.btn-add:hover { background:var(--primary); transform:scale(1.02); }

/* MODAL */
.modal-overlay { display:none; position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.6); backdrop-filter:blur(4px); align-items:center; justify-content:center; padding:20px; }
.modal-overlay.open { display:flex; }
.modal-box { background:white; border-radius:20px; width:100%; max-width:760px; max-height:90vh; overflow-y:auto; position:relative; animation:slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(40px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-close { position:absolute; top:16px; right:16px; background:var(--border); border:none; width:36px; height:36px; border-radius:50%; cursor:pointer; font-size:1rem; z-index:1; }
.modal-inner { display:flex; flex-wrap:wrap; }
.modal-img { width:100%; max-width:340px; background:#F3F4F6; min-height:280px; display:flex; align-items:center; justify-content:center; border-radius:20px 0 0 20px; overflow:hidden; }
.modal-img img { width:100%; height:100%; object-fit:cover; }
.modal-img .img-placeholder { font-size:5rem; }
.modal-details { flex:1; padding:28px; min-width:260px; }
.modal-details h2 { font-size:1.3rem; font-weight:800; margin-bottom:12px; letter-spacing:-.3px; }
.modal-details p { color:var(--muted); margin-bottom:16px; font-size:.95rem; }
.modal-bullets { list-style:none; margin-bottom:20px; }
.modal-bullets li { padding:5px 0 5px 20px; position:relative; font-size:.9rem; }
.modal-bullets li::before { content:'✓'; position:absolute; left:0; color:var(--primary); font-weight:700; }
.modal-price { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.modal-price .price { font-size:1.8rem; }
.qty-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.qty-btn { background:var(--border); border:none; width:36px; height:36px; border-radius:8px; cursor:pointer; font-size:1.1rem; font-weight:700; }
.qty-val { font-weight:700; font-size:1.1rem; min-width:30px; text-align:center; }
.btn-primary { background:var(--primary); color:white; border:none; padding:14px 28px; border-radius:12px; font-weight:700; cursor:pointer; font-size:1rem; width:100%; transition:background .2s; font-family:'DM Sans',sans-serif; }
.btn-primary:hover { background:var(--primary-dark); }
.reviews-section { padding:24px 28px; border-top:1px solid var(--border); }
.reviews-section h4 { font-weight:700; margin-bottom:16px; font-size:1.05rem; }
.review-card { background:var(--bg); border-radius:12px; padding:14px; margin-bottom:12px; }
.review-header { display:flex; justify-content:space-between; margin-bottom:6px; }
.review-name { font-weight:600; font-size:.9rem; }
.review-date { color:var(--muted); font-size:.8rem; }
.review-comment { font-size:.9rem; color:var(--muted); }
.review-form { margin-top:16px; }
.review-form textarea { width:100%; border:1px solid var(--border); border-radius:10px; padding:12px; font-family:'DM Sans',sans-serif; font-size:.9rem; resize:vertical; min-height:80px; margin-top:8px; }
.star-select { display:flex; gap:8px; margin-bottom:8px; font-size:1.4rem; cursor:pointer; }
.star-select span { opacity:.3; transition:opacity .15s; }
.star-select span.active { opacity:1; }

/* CART SIDEBAR */
.cart-overlay { display:none; position:fixed; inset:0; z-index:150; background:rgba(0,0,0,.5); }
.cart-overlay.open { display:block; }
.cart-sidebar { position:fixed; right:-420px; top:0; bottom:0; width:380px; max-width:100vw; background:white; z-index:151; transition:right .3s ease; display:flex; flex-direction:column; box-shadow:-8px 0 40px rgba(0,0,0,.15); }
.cart-sidebar.open { right:0; }
.cart-header { padding:20px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); }
.cart-header h3 { font-weight:800; font-size:1.1rem; letter-spacing:-.2px; }
.cart-header button { background:var(--border); border:none; width:32px; height:32px; border-radius:50%; cursor:pointer; }
.cart-items { flex:1; overflow-y:auto; padding:16px; }
.cart-empty { text-align:center; color:var(--muted); padding:40px 0; }
.cart-item { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.cart-item-img { width:60px; height:60px; border-radius:10px; background:#F3F4F6; overflow:hidden; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.cart-item-img img { width:100%; height:100%; object-fit:cover; }
.cart-item-info { flex:1; }
.cart-item-info h4 { font-size:.9rem; font-weight:600; margin-bottom:4px; }
.cart-item-price { color:var(--primary); font-weight:700; font-size:.95rem; }
.cart-item-controls { display:flex; align-items:center; gap:6px; margin-top:6px; }
.cart-item-controls button { background:var(--border); border:none; width:26px; height:26px; border-radius:6px; cursor:pointer; font-weight:700; }
.cart-item-controls span { font-size:.9rem; min-width:20px; text-align:center; }
.cart-item-remove { background:none !important; color:#EF4444; font-size:1rem; }

/* CART FOOTER — Delivery */
.cart-footer { padding:16px; border-top:1px solid var(--border); }
.cart-row { display:flex; justify-content:space-between; font-size:.9rem; padding:3px 0; color:var(--muted); }
.cart-row.total { font-size:1rem; font-weight:700; color:var(--text); margin-top:6px; padding-top:10px; border-top:1px dashed var(--border); }
.cart-row.total span:last-child { color:var(--primary); font-size:1.15rem; }
.delivery-free { color:#059669 !important; font-weight:700; }
.free-delivery-bar-wrap { margin:10px 0 4px; background:#F3F4F6; border-radius:10px; height:6px; overflow:hidden; }
.free-delivery-bar { height:100%; background:var(--primary); border-radius:10px; transition:width .4s; }
.free-delivery-hint { font-size:.75rem; color:var(--muted); margin-bottom:12px; }
.btn-whatsapp { width:100%; background:var(--green); color:white; border:none; padding:16px; border-radius:14px; font-weight:700; font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; font-family:'DM Sans',sans-serif; transition:background .2s,transform .1s; }
.btn-whatsapp:hover { background:#1db856; transform:scale(1.02); }
.whatsapp-note { text-align:center; color:var(--muted); font-size:.8rem; margin-top:8px; }

/* MISC */
.empty-state { text-align:center; padding:60px 20px; }
.empty-state h3 { margin:12px 0 20px; font-weight:700; }
.footer { text-align:center; padding:32px 20px; color:var(--muted); font-size:.85rem; border-top:1px solid var(--border); }
.wa-float { position:fixed; bottom:24px; right:24px; z-index:99; width:56px; height:56px; background:var(--green); border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 20px rgba(37,211,102,.4); animation:pulse 2s infinite; text-decoration:none; }
@keyframes pulse { 0%,100%{box-shadow:0 4px 20px rgba(37,211,102,.4)} 50%{box-shadow:0 4px 30px rgba(37,211,102,.7)} }

/* AUTH */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:40px 20px; background:linear-gradient(135deg,#1A1A2E,#0F3460); }
.auth-box { background:white; border-radius:20px; padding:40px; width:100%; max-width:420px; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.auth-box h1 { font-size:1.7rem; font-weight:800; letter-spacing:-.3px; margin-bottom:6px; text-align:center; }
.auth-box .subtitle { text-align:center; color:var(--muted); margin-bottom:28px; }
.form-group { margin-bottom:18px; }
.form-group label { display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; }
.form-group input,.form-group select,.form-group textarea { width:100%; border:1.5px solid var(--border); border-radius:10px; padding:12px 14px; font-size:1rem; font-family:'DM Sans',sans-serif; transition:border-color .2s; }
.form-group input:focus,.form-group select:focus,.form-group textarea:focus { outline:none; border-color:var(--primary); }
.form-submit { width:100%; background:var(--primary); color:white; border:none; padding:14px; border-radius:12px; font-weight:700; font-size:1rem; cursor:pointer; font-family:'DM Sans',sans-serif; transition:background .2s; margin-top:8px; }
.form-submit:hover { background:var(--primary-dark); }
.auth-link { text-align:center; margin-top:20px; color:var(--muted); font-size:.9rem; }
.auth-link a { color:var(--primary); font-weight:600; }
.alert { padding:12px 16px; border-radius:10px; margin-bottom:20px; font-size:.9rem; }
.alert-error { background:#FEE2E2; color:#DC2626; border:1px solid #FCA5A5; }
.alert-success { background:#D1FAE5; color:#059669; border:1px solid #6EE7B7; }

/* RESPONSIVE */
@media(max-width:768px){
  .nav-links{display:none} .hamburger{display:block}
  .hero{padding:40px 20px}
  .trust-item{padding:10px 16px;font-size:.8rem}
  .products-grid{grid-template-columns:repeat(2,1fr);gap:14px}
  .modal-img{max-width:100%;min-height:200px;border-radius:20px 20px 0 0}
  .cart-sidebar{width:100%}
}
@media(max-width:480px){
  .products-grid{grid-template-columns:1fr 1fr;gap:12px}
  .product-img{height:160px}
  .product-info{padding:12px}
  .product-info h3{font-size:.88rem}
}

/* ---- STICKY CHECKOUT BAR ---- */
.sticky-checkout {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 120;
  background: #1A1A2E;
  color: white;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -6px 30px rgba(0,0,0,.3);
  transform: translateY(110%);
  transition: transform .38s cubic-bezier(.34,1.26,.64,1);
}
.sticky-checkout.visible {
  transform: translateY(0);
}

/* Left tap area — opens cart */
.sticky-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 0;
  transition: background .15s;
  /* reset button styles */
  color: white;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
}
.sticky-left:hover {
  background: rgba(255,255,255,.12);
}
.sticky-left:active {
  background: rgba(255,255,255,.05);
}

/* Cart bag icon with item count badge */
.sticky-bag {
  position: relative;
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.sticky-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--primary);
  color: white;
  font-size: .62rem;
  font-weight: 800;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
}

/* Text info in left area */
.sticky-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sticky-count {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
}
.sticky-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  white-space: nowrap;
  letter-spacing: -.3px;
}
.sticky-delivery-note {
  font-size: .7rem;
  color: #4ADE80;
  font-weight: 600;
  white-space: nowrap;
}

/* Arrow hint */
.sticky-arrow {
  font-size: 1.3rem;
  color: rgba(255,255,255,.3);
  margin-left: auto;
  flex-shrink: 0;
}

/* WhatsApp button on right */
.sticky-btn {
  background: #25D366;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  transition: background .18s, transform .12s;
  flex-shrink: 0;
}
.sticky-btn:hover { background: #1db856; transform: scale(1.03); }
.sticky-btn:active { transform: scale(.96); }

/* Hide WA float when sticky bar is showing */
body.has-sticky-bar .wa-float { display: none; }

/* Pad footer so content isn't hidden behind bar */
body.has-sticky-bar .footer { padding-bottom: 90px; }

/* Bounce animation when item added */
@keyframes stickyBounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-6px); }
  60%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}
.sticky-checkout.bounce { animation: stickyBounce .4s ease; }

@media (max-width: 480px) {
  .sticky-checkout { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); gap: 8px; }
  .sticky-btn { padding: 12px 14px; font-size: .82rem; gap: 5px; }
  .sticky-btn svg { width: 16px; }
  .sticky-total { font-size: .98rem; }
}
