:root{
  --brand-orange:#f4a51e;
  --brand-red:#e5533d;
  --brand-purple:#7b5ce0;
  --text-dark:#2b2b2b;
  --text-muted:#767676;
  --bg-light:#f6f6f8;
  --border:#e7e7ea;
  --radius:10px;
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:"Segoe UI",Arial,sans-serif;
  color:var(--text-dark);
  background:#fff;
}
a{text-decoration:none;color:inherit;}
ul{list-style:none;margin:0;padding:0;}
button{cursor:pointer;font-family:inherit;}

.container{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px;
}

/* Topbar */
.topbar{
  background:var(--text-dark);
  color:#ddd;
  font-size:13px;
}
.topbar-inner{
  display:flex;
  justify-content:space-between;
  padding:6px 20px;
  flex-wrap:wrap;
  gap:4px;
}
.topbar a{color:#ddd;}

/* Header */
.header{
  background:#fff;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:50;
}
.header-inner{
  display:flex;
  align-items:center;
  gap:24px;
  padding:14px 20px;
  flex-wrap:wrap;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.logo-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.logo-text strong{
  font-size:20px;
  letter-spacing:1px;
  background:linear-gradient(90deg,var(--brand-orange),var(--brand-red),var(--brand-purple));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.logo-text small{
  font-size:11px;
  color:var(--text-muted);
  letter-spacing:2px;
}

.search-box{
  flex:1;
  min-width:220px;
  display:flex;
  border:2px solid var(--brand-orange);
  border-radius:24px;
  overflow:hidden;
}
.search-box input{
  flex:1;
  border:none;
  padding:10px 16px;
  outline:none;
  font-size:14px;
}
.search-box button{
  background:var(--brand-orange);
  border:none;
  color:#fff;
  padding:0 18px;
  font-size:15px;
}

.header-icons{display:flex;align-items:center;gap:10px;}
.icon-btn{
  background:var(--bg-light);
  border:1px solid var(--border);
  border-radius:20px;
  padding:8px 16px;
  font-size:15px;
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
}
.cart-count{
  background:var(--brand-red);
  color:#fff;
  border-radius:50%;
  min-width:18px;
  height:18px;
  font-size:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
}

.navbar{
  background:var(--bg-light);
  border-top:1px solid var(--border);
}
.navbar ul{
  display:flex;
  gap:26px;
  padding:10px 0;
  flex-wrap:wrap;
}
.navbar a{
  font-size:14px;
  font-weight:600;
  color:#444;
}
.navbar a:hover{color:var(--brand-red);}

/* Category strip */
.category-strip{
  display:flex;
  justify-content:center;
  gap:34px;
  flex-wrap:wrap;
  padding:26px 20px 10px;
}
.cat-pill{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  color:#444;
  width:88px;
  text-align:center;
}
.cat-circle{
  width:64px;
  height:64px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--brand-orange),var(--brand-red));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}
.cat-pill:hover .cat-circle{transform:translateY(-3px);transition:.2s;}

/* Hero */
.hero{padding:20px 20px 10px;}
.hero-banner{
  background:linear-gradient(120deg,var(--brand-red),var(--brand-purple));
  border-radius:16px;
  color:#fff;
  padding:56px 40px;
  text-align:center;
}
.hero-banner h1{
  margin:0 0 14px;
  font-size:34px;
  line-height:1.25;
}
.hero-banner p{
  margin:0 0 22px;
  font-size:15px;
  opacity:.92;
}
.hero-btn{
  display:inline-block;
  background:#fff;
  color:var(--brand-red);
  font-weight:700;
  padding:12px 28px;
  border-radius:24px;
}

/* Products */
.products-section{padding:34px 20px;}
.section-title{
  font-size:22px;
  margin:0 0 20px;
  padding-bottom:10px;
  border-bottom:3px solid var(--brand-orange);
  display:inline-block;
}
.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:20px;
  margin-top:16px;
}
.product-card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
  position:relative;
  transition:box-shadow .2s,transform .2s;
}
.product-card:hover{
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  transform:translateY(-3px);
}
.product-card img{
  width:100%;
  aspect-ratio:4/5;
  object-fit:cover;
  display:block;
  background:var(--bg-light);
}
.discount-badge{
  position:absolute;
  top:10px;left:10px;
  background:var(--brand-red);
  color:#fff;
  font-size:12px;
  font-weight:700;
  padding:4px 8px;
  border-radius:6px;
  z-index:2;
}
.product-info{padding:12px 14px 14px;display:flex;flex-direction:column;gap:5px;flex:1;}
.product-name{font-size:14px;font-weight:600;min-height:36px;}
.product-rating{display:flex;align-items:center;gap:6px;font-size:12px;}
.stars{color:#f4a51e;letter-spacing:1px;font-size:13px;}
.rating-count{color:var(--text-muted);}
.product-price-row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;}
.old-price{color:var(--text-muted);font-size:12px;text-decoration:line-through;}
.product-price{color:var(--brand-red);font-weight:700;font-size:16px;}
.free-shipping{color:#1a9c5b;font-size:11px;font-weight:700;}
.add-cart-btn{
  margin-top:auto;
  background:var(--text-dark);
  color:#fff;
  border:none;
  border-radius:8px;
  padding:9px 0;
  font-size:13px;
  font-weight:600;
}
.add-cart-btn:hover{background:var(--brand-red);}
.add-cart-btn:disabled{background:#bbb;cursor:not-allowed;}

/* Footer */
.footer{
  background:var(--text-dark);
  color:#ccc;
  margin-top:30px;
}
.footer-inner{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:30px;
  padding:40px 20px;
}
.footer-col h3{color:#fff;margin:0 0 12px;font-size:16px;}
.footer-col p{margin:6px 0;font-size:13px;}
.footer-col a:hover{color:var(--brand-orange);}
.footer-bottom{
  text-align:center;
  padding:14px;
  font-size:12px;
  border-top:1px solid #444;
}

/* Product card as clickable */
.product-card{cursor:pointer;}

/* Product detail modal */
.product-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.5);
  opacity:0;pointer-events:none;
  transition:opacity .2s;
  z-index:110;
}
.product-overlay.open{opacity:1;pointer-events:auto;}

.product-modal{
  position:fixed;
  top:50%;left:50%;
  transform:translate(-50%,-50%) scale(.96);
  width:900px;
  max-width:94vw;
  max-height:88vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s, transform .2s;
  z-index:120;
}
.product-modal.open{
  opacity:1;
  pointer-events:auto;
  transform:translate(-50%,-50%) scale(1);
}
.product-modal-close{
  position:absolute;
  top:12px;
  right:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:50%;
  width:34px;height:34px;
  font-size:15px;
  z-index:2;
}
.product-modal-body{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
  padding:36px;
  overflow-y:auto;
}
.product-gallery img#modalMainImage{
  width:100%;
  aspect-ratio:4/5;
  object-fit:cover;
  border-radius:12px;
  display:block;
}
.product-thumbs{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.product-thumbs img{
  width:64px;
  height:80px;
  object-fit:cover;
  border-radius:8px;
  cursor:pointer;
  border:2px solid transparent;
  opacity:.7;
}
.product-thumbs img.active{
  border-color:var(--brand-red);
  opacity:1;
}
.product-modal-info{
  display:flex;
  flex-direction:column;
  padding-top:10px;
}
.product-modal-breadcrumb{
  color:var(--text-muted);
  font-size:12px;
  margin-bottom:8px;
}
.product-modal-info h2{margin:0 0 10px;font-size:22px;}
.product-modal-rating{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  margin-bottom:14px;
}
.product-modal-rating .stars{font-size:16px;}
.product-modal-price-row{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:6px;
}
.product-modal-price-row .old-price{font-size:15px;}
.product-modal-price{
  font-size:26px;
  font-weight:700;
  color:var(--brand-red);
}
.product-modal-info .free-shipping{font-size:13px;margin-bottom:16px;}
.product-modal-desc{
  font-size:14px;
  color:#555;
  line-height:1.6;
  margin:0 0 20px;
}
.option-label{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--text-muted);
  margin-bottom:8px;
}
.product-modal-sizes{margin-bottom:20px;}
.size-options{display:flex;flex-wrap:wrap;gap:8px;}
.size-option{
  min-width:44px;
  padding:8px 10px;
  text-align:center;
  border:1.5px solid var(--border);
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  background:#fff;
}
.size-option:hover{border-color:var(--brand-orange);}
.size-option.selected{
  border-color:var(--brand-red);
  background:var(--brand-red);
  color:#fff;
}
.product-modal-qty{margin-bottom:16px;}
.qty-stepper{
  display:inline-flex;
  align-items:center;
  border:1.5px solid var(--border);
  border-radius:8px;
  overflow:hidden;
}
.qty-stepper button{
  width:36px;height:36px;
  background:var(--bg-light);
  border:none;
  font-size:16px;
}
.qty-stepper span{
  min-width:36px;
  text-align:center;
  font-weight:600;
  font-size:14px;
}
.product-modal-stock{
  font-size:13px;
  color:#1a9c5b;
  font-weight:600;
  margin-bottom:14px;
}
.product-modal-info .add-cart-btn{
  padding:14px 0;
  font-size:15px;
  border-radius:10px;
}

@media (max-width:768px){
  .product-modal-body{grid-template-columns:1fr;padding:20px;gap:18px;}
  .product-modal{max-height:92vh;}
  .product-thumbs img{width:52px;height:64px;}
}

/* Cart drawer */
.cart-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;pointer-events:none;
  transition:opacity .2s;
  z-index:90;
}
.cart-overlay.open{opacity:1;pointer-events:auto;}

.cart-drawer{
  position:fixed;
  top:0;right:0;
  width:360px;
  max-width:90vw;
  height:100%;
  background:#fff;
  box-shadow:-4px 0 20px rgba(0,0,0,.15);
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .25s;
  z-index:100;
}
.cart-drawer.open{transform:translateX(0);}
.cart-drawer-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 20px;
  border-bottom:1px solid var(--border);
}
.cart-drawer-header button{background:none;border:none;font-size:18px;}
.cart-items{flex:1;overflow-y:auto;padding:10px 20px;}
.cart-item{
  display:flex;
  gap:10px;
  padding:12px 0;
  border-bottom:1px solid var(--border);
}
.cart-item img{width:56px;height:70px;object-fit:cover;border-radius:6px;}
.cart-item-info{flex:1;}
.cart-item-name{font-size:13px;font-weight:600;}
.cart-item-price{font-size:13px;color:var(--brand-red);}
.cart-item-size{color:var(--text-muted);font-weight:400;font-size:12px;}
.cart-item-remove{background:none;border:none;color:#999;font-size:16px;}
.cart-empty{color:var(--text-muted);text-align:center;padding:30px 0;font-size:14px;}
.cart-footer{padding:16px 20px;border-top:1px solid var(--border);}
.cart-total{font-weight:700;margin-bottom:12px;font-size:16px;}
.checkout-btn{
  width:100%;
  background:var(--brand-red);
  color:#fff;
  border:none;
  padding:12px 0;
  border-radius:8px;
  font-weight:700;
}

@media (max-width:640px){
  .footer-inner{grid-template-columns:1fr;}
  .hero-banner h1{font-size:26px;}
}

@media (max-width:768px){
  .topbar-inner{font-size:11px;padding:5px 16px;}
  .header-inner{padding:10px 16px;gap:12px;}
  .logo-text small{display:none;}
  .search-box{order:3;flex-basis:100%;min-width:0;}
  .navbar ul{gap:16px;padding:8px 0;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;}
  .navbar a{white-space:nowrap;}
  .category-strip{gap:18px;padding:20px 16px 6px;}
  .cat-circle{width:52px;height:52px;font-size:22px;}
  .cat-pill{width:70px;font-size:12px;}
  .hero-banner{padding:36px 22px;}
  .hero-banner h1{font-size:22px;}
  .product-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;}
  .products-section{padding:24px 16px;}
}

@media (max-width:420px){
  .product-grid{grid-template-columns:repeat(2,1fr);}
  .product-name{font-size:13px;min-height:32px;}
  .cart-drawer{width:100%;max-width:100vw;}
}
