*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #e8445a;
  --primary-dark: #c73249;
  --bg: #f8f8f8;
  --white: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 12px;
}
body { font-family: 'Jost', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* NAVBAR */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 2rem; height: 64px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-logo {
  display: flex; align-items: center; white-space: nowrap;
}
.logo-img {
  height: 40px; width: auto; object-fit: contain;
}
.logo-aa {
  background: var(--primary); color: #fff;
  padding: 1px 7px; border-radius: 6px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: .04em;
  margin-right: 3px;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  padding: 4px 0; border-bottom: 2px solid transparent; transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); border-color: var(--primary); }
.nav-search {
  flex: 1; max-width: 360px; display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 24px; padding: 0 1rem; gap: .5rem;
}
.nav-search input { border: none; background: transparent; outline: none; font-size: .9rem; width: 100%; padding: 8px 0; }
.nav-search i { color: var(--muted); font-size: .9rem; }
.nav-actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav-actions i { font-size: 1.1rem; cursor: pointer; color: var(--muted); transition: color .2s; }
.nav-actions i:hover { color: var(--primary); }
.cart-icon { position: relative; cursor: pointer; }
.cart-icon i { font-size: 1.2rem; color: var(--text); }
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* HERO */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4rem 2rem; background: linear-gradient(135deg, #fff0f3 0%, #fff8f0 100%);
  min-height: 420px; overflow: hidden;
}
.hero-content { max-width: 480px; }
.hero-sub {
  font-size: .8rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.1;
  color: var(--text); margin-bottom: 1rem;
}
.hero-content h1 em { color: var(--primary); font-style: italic; }
.hero-desc { color: var(--muted); font-size: .95rem; margin-bottom: 1.75rem; line-height: 1.6; }
.hero-visual { display: flex; gap: 1rem; align-items: center; }
.hero-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow); text-align: center; width: 150px;
}
.hero-card img { border-radius: 8px; height: 120px; object-fit: cover; width: 100%; margin-bottom: .5rem; }
.hero-card p { font-size: .8rem; font-weight: 500; }
.hero-card span { font-size: .85rem; color: var(--primary); font-weight: 600; }
.hero-card-stack { display: flex; flex-direction: column; gap: .75rem; }
.hero-card-stack .hero-card { width: 130px; }

/* BUTTONS */
.btn-primary {
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  padding: .75rem 1.75rem; font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: background .2s, transform .1s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-primary.full { width: 100%; justify-content: center; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: .75rem 1.5rem; font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: border-color .2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* CATEGORIES */
.categories {
  display: flex; gap: .75rem; padding: 1.5rem 2rem;
  overflow-x: auto; scrollbar-width: none; align-items: center;
}
.categories::-webkit-scrollbar { display: none; }
.cat-pill {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 24px; padding: .45rem 1.1rem;
  font-size: .85rem; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all .2s;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); }
.cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* SORT BAR */
.sort-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 2rem 1rem; flex-wrap: wrap; gap: .5rem;
}
.sort-bar p { font-size: .85rem; color: var(--muted); }
.sort-bar select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: .4rem .75rem; font-size: .85rem; background: var(--white);
  cursor: pointer; outline: none;
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem; padding: 0 2rem 3rem;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
.product-img-wrap { position: relative; overflow: hidden; background: #fdf2f4; }
.product-img-wrap img { width: 100%; height: 200px; object-fit: cover; transition: transform .35s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em;
}
.product-badge.new { background: #10b981; }
.product-badge.sale { background: var(--primary); }
.product-wishlist {
  position: absolute; top: 10px; right: 10px;
  background: var(--white); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: color .2s; font-size: .9rem; color: var(--muted);
}
.product-wishlist:hover, .product-wishlist.active { color: var(--primary); }
.product-info { padding: .9rem 1rem 1rem; }
.product-brand { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .2rem; }
.product-name { font-size: .92rem; font-weight: 500; margin-bottom: .4rem; line-height: 1.3; }
.product-rating { display: flex; align-items: center; gap: .3rem; margin-bottom: .6rem; }
.stars { color: #f59e0b; font-size: .75rem; }
.rating-count { font-size: .72rem; color: var(--muted); }
.product-price { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.price-current { font-size: 1rem; font-weight: 600; color: var(--primary); }
.price-original { font-size: .82rem; color: var(--muted); text-decoration: line-through; }
.price-discount { font-size: .75rem; color: #10b981; font-weight: 600; }
.btn-add-cart {
  width: 100%; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; padding: .6rem;
  font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: background .2s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn-add-cart:hover { background: var(--primary-dark); }

/* CART DRAWER */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 100vw;
  height: 100vh; background: var(--white); z-index: 201;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  transition: right .3s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { right: 0; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 1.1rem; font-weight: 600; }
.cart-header button { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty { text-align: center; padding: 3rem 0; color: var(--muted); }
.cart-empty i { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.cart-item {
  display: flex; gap: .75rem; padding: .75rem 0;
  border-bottom: 1px solid var(--border); align-items: center;
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #fdf2f4; }
.cart-item-info { flex: 1; }
.cart-item-info p { font-size: .88rem; font-weight: 500; margin-bottom: .2rem; }
.cart-item-info span { font-size: .82rem; color: var(--primary); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: .85rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-val { font-size: .85rem; font-weight: 500; min-width: 20px; text-align: center; }
.cart-item-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; padding: 4px; }
.cart-item-remove:hover { color: var(--primary); }
.cart-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 1rem; font-weight: 600; font-size: 1rem; }

/* CHECKOUT MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 300; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.checkout-modal {
  background: var(--white); border-radius: 16px;
  width: 100%; max-width: 540px; max-height: 90vh;
  overflow-y: auto; padding: 2rem; position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.steps { display: flex; align-items: center; margin-bottom: 2rem; }
.step { display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .75rem; color: var(--muted); }
.step span {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600; transition: all .3s;
}
.step.active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done span { background: #10b981; border-color: #10b981; color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 .5rem; margin-bottom: 1rem; }
.step-content h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; }
.step-content.hidden { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .75rem; }
.form-group label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.form-group input {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: .6rem .85rem; font-size: .9rem; outline: none; transition: border-color .2s;
}
.form-group input:focus { border-color: var(--primary); }
.delivery-options { display: flex; gap: .75rem; margin: 1rem 0; }
.delivery-opt {
  flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
  padding: .75rem; cursor: pointer; display: flex; align-items: center; gap: .6rem; transition: border-color .2s;
}
.delivery-opt input { display: none; }
.delivery-opt.selected { border-color: var(--primary); background: #fff5f7; }
.delivery-opt i { color: var(--primary); font-size: 1.1rem; }
.delivery-opt b { font-size: .85rem; display: block; }
.delivery-opt small { font-size: .75rem; color: var(--muted); }
.pay-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.pay-tab {
  flex: 1; border: 1.5px solid var(--border); border-radius: 8px;
  padding: .6rem; font-size: .82rem; cursor: pointer; background: var(--white);
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.pay-tab.active { border-color: var(--primary); background: #fff5f7; color: var(--primary); }
.card-preview {
  background: linear-gradient(135deg, #1a1a2e, #e8445a);
  border-radius: 12px; padding: 1.25rem 1.5rem; color: #fff;
  margin-bottom: 1.25rem; min-height: 120px;
}
.card-chip { width: 32px; height: 24px; background: #f59e0b; border-radius: 4px; margin-bottom: .75rem; }
.card-num { font-size: 1rem; letter-spacing: .15em; margin-bottom: .75rem; }
.card-bottom { display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; }
.qr-payment {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem 0; gap: .75rem;
}
.qr-label { font-size: 1rem; font-weight: 600; color: var(--text); }
.qr-img { width: 220px; height: 220px; object-fit: contain; border: 2px solid var(--border); border-radius: 12px; padding: .5rem; }
.qr-hint { font-size: .8rem; color: var(--muted); text-align: center; display: flex; align-items: center; gap: .4rem; max-width: 280px; line-height: 1.5; }
.qr-hint i { color: var(--primary); flex-shrink: 0; }
.order-summary { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.order-item { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.order-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.order-item-info { flex: 1; font-size: .85rem; }
.order-item-info p { font-weight: 500; }
.order-item-info span { color: var(--muted); font-size: .78rem; }
.order-item-price { font-weight: 600; font-size: .9rem; color: var(--primary); }
.summary-totals { font-size: .9rem; }
.summary-totals div { display: flex; justify-content: space-between; padding: .4rem 0; color: var(--muted); }
.summary-totals .total-row { font-weight: 700; font-size: 1rem; color: var(--text); border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .2rem; }

/* TOAST */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--text); color: #fff; border-radius: 12px;
  padding: 1rem 1.5rem; display: flex; align-items: center; gap: .75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 400;
  transition: transform .4s cubic-bezier(.4,0,.2,1); min-width: 280px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast i { color: #10b981; font-size: 1.3rem; }
.toast b { display: block; font-size: .9rem; }
.toast p { font-size: .8rem; opacity: .75; margin: 0; }

/* FOOTER */
footer { background: var(--text); color: rgba(255,255,255,.7); padding: 2.5rem 2rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo-img { height: 36px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .82rem; line-height: 1.6; max-width: 220px; }
.footer-col h4 { font-size: .85rem; font-weight: 600; color: #fff; margin-bottom: .75rem; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul li a { font-size: .82rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-bottom p { font-size: .78rem; }
.footer-pay { display: flex; gap: .5rem; }
.footer-pay i { font-size: 1.4rem; color: rgba(255,255,255,.5); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; }
  .hero-visual { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; gap: .75rem; }
  .nav-links { display: none; }
  .nav-search { max-width: 180px; }
  .product-grid { padding: 0 1rem 2rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .hero { padding: 2rem 1rem; }
  .categories { padding: 1rem; }
  .sort-bar { padding: .5rem 1rem .75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .checkout-modal { padding: 1.5rem 1rem; }
}
