@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
  --brown:#70452D;
  --terracotta:#A84C32;
  --beige:#D9B77E;
  --cream:#F7F0E4;
  --olive:#526746;
  --dark:#30241D;
  --white:#fff;
  --muted:#82776E;
  --border:#E9DFD1;
  --shadow:0 8px 25px rgba(65,43,28,.08);
}

*{margin:0;padding:0;box-sizing:border-box}

body{
  font-family:'DM Sans',sans-serif;
  background:#FBF9F5;
  color:var(--dark);
}

button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
img{max-width:100%}

.app{min-height:100vh}

/* HEADER */

.header{
  background:var(--white);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:20;
}

.header-content{
  max-width:1400px;
  margin:auto;
  padding:13px 5%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--brown);
}

.logo-icon{
  width:45px;
  height:45px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:var(--cream);
  font-size:25px;
}

.logo h2{
  font-family:'Playfair Display',serif;
  font-size:21px;
}

.logo small{color:var(--muted);font-size:11px}

.header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.btn{
  border:none;
  padding:11px 17px;
  border-radius:10px;
  font-weight:700;
  transition:.2s;
}

.btn:hover{transform:translateY(-2px)}
.btn-primary{background:var(--terracotta);color:white}
.btn-secondary{background:var(--cream);color:var(--brown)}
.btn-green{background:var(--olive);color:white}
.btn-outline{background:transparent;border:1px solid var(--border);color:var(--brown)}
.btn-danger{background:#FCE9E5;color:#A83225}
.btn-small{padding:8px 12px;font-size:12px}

.cart-button{position:relative}
.cart-count{
  position:absolute;
  top:-7px;
  right:-7px;
  background:var(--olive);
  color:white;
  border-radius:50%;
  min-width:20px;
  height:20px;
  display:grid;
  place-items:center;
  font-size:11px;
}

/* NAV */

.nav{
  background:var(--white);
  display:flex;
  justify-content:center;
  gap:8px;
  padding:0 15px 12px;
  flex-wrap:wrap;
}

.nav button{
  border:0;
  background:transparent;
  padding:9px 14px;
  color:var(--muted);
  border-radius:9px;
  font-weight:600;
  font-size:13px;
}

.nav button.active,.nav button:hover{
  color:var(--terracotta);
  background:var(--cream);
}

/* MAIN */

.container{
  max-width:1300px;
  padding:30px 5%;
  margin:auto;
}

.section{display:none}
.section.active{display:block}

.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:22px;
}

.section-heading h2{
  font-family:'Playfair Display',serif;
  font-size:27px;
}

.subtitle{color:var(--muted);font-size:14px;margin-top:5px}

/* HERO */

.hero{
  background:linear-gradient(90deg,rgba(39,27,20,.88),rgba(39,27,20,.24)),
  url('https://images.unsplash.com/photo-1547592180-85f173990554?w=1500') center/cover;
  border-radius:22px;
  min-height:360px;
  display:flex;
  align-items:center;
  padding:50px;
  color:white;
  margin-bottom:35px;
}

.hero-content{max-width:550px}
.hero-tag{
  background:rgba(217,183,126,.22);
  color:#F5D9AA;
  padding:8px 13px;
  border-radius:20px;
  display:inline-block;
  font-size:12px;
  font-weight:700;
  margin-bottom:18px;
}

.hero h1{
  font-family:'Playfair Display',serif;
  font-size:clamp(35px,5vw,57px);
  line-height:1.1;
  margin-bottom:15px;
}

.hero p{line-height:1.7;color:#F4E9DD;margin-bottom:23px}

/* INFO */

.info-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:15px;
  margin-bottom:35px;
}

.info-card{
  background:white;
  border:1px solid var(--border);
  border-radius:15px;
  padding:20px;
  display:flex;
  align-items:center;
  gap:15px;
}

.info-icon{
  width:45px;height:45px;
  background:var(--cream);
  border-radius:13px;
  display:grid;place-items:center;
  font-size:22px;
}

.info-card strong{display:block;font-size:14px}
.info-card small{color:var(--muted);font-size:12px}

/* PRODUCTS */

.category-list{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-bottom:20px;
}

.category{
  padding:9px 17px;
  border-radius:30px;
  border:1px solid var(--border);
  background:white;
  color:var(--brown);
  font-size:13px;
  font-weight:600;
}

.category.active,.category:hover{
  background:var(--brown);
  color:white;
}

.search{
  width:100%;
  max-width:350px;
  padding:12px 15px;
  border:1px solid var(--border);
  border-radius:10px;
  outline:none;
  background:white;
}

.search:focus,input:focus,select:focus,textarea:focus{
  border-color:var(--terracotta);
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}

.product-card{
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  transition:.25s;
  position:relative;
}

.product-card:hover{
  transform:translateY(-5px);
  box-shadow:var(--shadow);
}

.product-image{
  height:175px;
  width:100%;
  object-fit:cover;
  background:var(--cream);
}

.product-info{padding:15px}
.product-info h3{font-size:16px;margin-bottom:7px}
.product-info p{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  min-height:37px;
}

.product-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:15px;
}

.price{color:var(--terracotta);font-weight:800;font-size:17px}

.add-button{
  width:37px;height:37px;
  border:none;
  background:var(--terracotta);
  color:white;
  border-radius:10px;
  font-size:22px;
}

.favorite{
  position:absolute;
  top:12px;right:12px;
  width:35px;height:35px;
  border:none;
  border-radius:50%;
  background:white;
  font-size:18px;
}

/* BANNERS */

.promo{
  background:var(--olive);
  color:white;
  padding:28px;
  border-radius:17px;
  margin:30px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}

.promo h3{
  font-family:'Playfair Display',serif;
  font-size:25px;
  margin-bottom:7px;
}

/* FORMS */

.panel{
  background:white;
  border:1px solid var(--border);
  border-radius:17px;
  padding:25px;
  margin-bottom:20px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:15px;
}

.field{display:flex;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}

.field label{font-size:13px;font-weight:700;color:var(--brown)}

.field input,.field select,.field textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--border);
  border-radius:9px;
  outline:none;
  background:#FFFEFC;
}

.field textarea{resize:vertical;min-height:90px}

/* CART */

.cart-item{
  display:flex;
  align-items:center;
  gap:15px;
  padding:15px 0;
  border-bottom:1px solid var(--border);
}

.cart-item img{
  width:75px;height:70px;
  object-fit:cover;
  border-radius:10px;
}

.cart-item-info{flex:1}
.cart-item-info h4{font-size:14px}
.cart-item-info small{color:var(--muted)}

.quantity{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
}

.quantity button{
  border:1px solid var(--border);
  background:white;
  border-radius:6px;
  width:25px;height:25px;
}

.total-line{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  font-size:14px;
}

.total-line.final{
  font-size:20px;
  font-weight:800;
  border-top:1px solid var(--border);
  margin-top:10px;
  padding-top:18px;
}

/* STATUS */

.status{
  display:inline-block;
  padding:6px 11px;
  border-radius:20px;
  background:#F1E8D9;
  color:var(--brown);
  font-size:11px;
  font-weight:800;
}

.status.green{background:#E6F0E2;color:#41643A}
.status.orange{background:#FFF0DC;color:#A66A20}
.status.red{background:#FCE8E5;color:#A83225}

.order-card{
  background:white;
  padding:20px;
  border-radius:14px;
  border:1px solid var(--border);
  margin-bottom:15px;
}

.order-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

/* TRACKING */

.timeline{
  display:flex;
  justify-content:space-between;
  margin:25px 0;
  gap:5px;
}

.timeline-step{
  text-align:center;
  flex:1;
  font-size:11px;
  color:var(--muted);
}

.timeline-step span{
  width:32px;height:32px;
  display:grid;
  place-items:center;
  background:#EEE8DF;
  border-radius:50%;
  margin:0 auto 8px;
}

.timeline-step.done span{
  background:var(--olive);
  color:white;
}

/* ADMIN */

.admin-top{
  background:var(--brown);
  padding:28px;
  border-radius:18px;
  color:white;
  margin-bottom:25px;
}

.admin-top h2{
  font-family:'Playfair Display',serif;
  font-size:29px;
  margin-bottom:8px;
}

.admin-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:22px;
}

.admin-tabs button{
  border:1px solid var(--border);
  background:white;
  color:var(--brown);
  border-radius:9px;
  padding:10px 14px;
  font-size:12px;
  font-weight:700;
}

.admin-tabs button.active{
  background:var(--brown);
  color:white;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
  margin-bottom:22px;
}

.stat-card{
  padding:20px;
  background:white;
  border:1px solid var(--border);
  border-radius:14px;
}

.stat-card small{color:var(--muted)}
.stat-card h2{font-size:27px;margin:10px 0;color:var(--brown)}

.admin-table{width:100%;border-collapse:collapse;font-size:13px}
.admin-table th,.admin-table td{
  text-align:left;
  padding:14px 10px;
  border-bottom:1px solid var(--border);
}
.admin-table th{color:var(--muted);font-size:11px;text-transform:uppercase}

.table-wrap{overflow-x:auto}

.empty{
  text-align:center;
  padding:45px 15px;
  color:var(--muted);
}

.empty-icon{font-size:42px;margin-bottom:12px}

/* MODAL */

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(30,20,14,.58);
  z-index:100;
  align-items:center;
  justify-content:center;
  padding:15px;
}

.modal.show{display:flex}

.modal-content{
  background:white;
  width:100%;
  max-width:520px;
  max-height:90vh;
  overflow:auto;
  border-radius:18px;
  padding:25px;
  position:relative;
}

.modal-close{
  position:absolute;
  top:15px;right:15px;
  border:none;
  background:var(--cream);
  width:32px;height:32px;
  border-radius:50%;
}

.toast{
  position:fixed;
  bottom:25px;
  right:25px;
  background:var(--dark);
  color:white;
  padding:15px 20px;
  border-radius:10px;
  z-index:200;
  opacity:0;
  transform:translateY(20px);
  transition:.3s;
  pointer-events:none;
  font-size:13px;
}

.toast.show{opacity:1;transform:translateY(0)}

.footer{
  background:#38291F;
  color:white;
  padding:35px 5%;
  margin-top:40px;
}

.footer-content{
  max-width:1300px;
  margin:auto;
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.footer p{font-size:12px;color:#D8C7B7;line-height:1.8}

/* RESPONSIVE */

@media(max-width:1000px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:700px){
  .header-content{padding:12px 4%}
  .logo h2{font-size:17px}
  .logo-icon{width:38px;height:38px}
  .header-actions .btn-secondary{display:none}
  .nav{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap}
  .nav button{white-space:nowrap}
  .container{padding:22px 4%}
  .hero{padding:28px;min-height:340px}
  .hero h1{font-size:37px}
  .info-grid{grid-template-columns:1fr}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .product-image{height:135px}
  .product-info{padding:11px}
  .product-info h3{font-size:14px}
  .product-info p{font-size:11px}
  .price{font-size:14px}
  .section-heading{align-items:flex-start;flex-direction:column}
  .search{max-width:100%}
  .form-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .promo{flex-direction:column;align-items:flex-start}
  .admin-tabs{overflow-x:auto;flex-wrap:nowrap}
  .admin-tabs button{white-space:nowrap}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .stat-card{padding:13px}
  .stat-card h2{font-size:21px}
  .timeline-step{font-size:9px}
  .timeline-step span{width:27px;height:27px}
  .cart-item img{width:60px;height:60px}
}

@media(max-width:380px){
  .product-grid{grid-template-columns:1fr}
  .product-image{height:190px}
}
