:root{--g:#183822;--g2:#245b33;--c:#f7f6ef;--l:#dfe5de;--t:#17221a;--m:#6d786f}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;color:var(--t);background:var(--c)}a{text-decoration:none;color:inherit}button,input,textarea{font:inherit}
.wrap{width:min(1180px,calc(100% - 32px));margin:auto}header{position:sticky;top:0;z-index:20;background:rgba(247,246,239,.96);border-bottom:1px solid var(--l)}
.header{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font-family:Georgia,serif;font-size:28px;font-weight:700;color:var(--g)}.brand small{display:block;font:12px Inter,system-ui;color:var(--m);margin-top:5px}
nav{display:flex;align-items:center;gap:18px}.btn,.navbtn{border:0;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}.btn{background:var(--g);color:#fff}.secondary{background:#fff;color:var(--g);border:1px solid var(--l)}
.hero{padding:76px 0 58px;background:linear-gradient(130deg,#183822,#2c6d3d);color:#fff}.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:34px;align-items:center}.hero h1{font:700 clamp(42px,7vw,76px)/.98 Georgia,serif;margin:12px 0 18px}.hero p{font-size:18px;line-height:1.7;color:rgba(255,255,255,.86)}.hero-card{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);padding:26px;border-radius:18px}
.section{padding:52px 0}.section h2{font:700 38px Georgia,serif;color:var(--g);margin:0 0 8px}.muted{color:var(--m)}.toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:24px 0}.toolbar input[type=search]{flex:1;min-width:240px;padding:13px;border:1px solid var(--l);border-radius:11px;background:#fff}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.card,.panel,.product-info{background:#fff;border:1px solid var(--l);border-radius:16px}.card{overflow:hidden;display:flex;flex-direction:column}.card-img{aspect-ratio:4/3;background:#edf2ec;display:flex;align-items:center;justify-content:center;color:var(--g);font-weight:800;overflow:hidden}.card-img img,.product-image img{width:100%;height:100%;object-fit:cover}.card-body{padding:16px;display:flex;flex-direction:column;gap:8px;flex:1}.category{font-size:12px;color:var(--m);text-transform:uppercase;letter-spacing:.06em}.price{font-size:21px;font-weight:800;color:var(--g)}.mrp{text-decoration:line-through;color:var(--m);font-size:14px;margin-left:8px}.stock{font-size:13px;color:var(--m)}.card .btn{margin-top:auto;text-align:center}
.product-layout{display:grid;grid-template-columns:1fr 1fr;gap:36px}.product-image{background:#fff;border:1px solid var(--l);border-radius:18px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--g);font-weight:800}.product-info{padding:28px}.qty{width:90px;padding:10px;border:1px solid var(--l);border-radius:10px}
.panel{padding:22px}.cart-row{display:grid;grid-template-columns:1fr auto auto auto;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--l)}.checkout-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:22px}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.field input,.field textarea{padding:12px;border:1px solid var(--l);border-radius:10px}.payment{display:flex;gap:10px;padding:12px;border:1px solid var(--l);border-radius:10px;margin:10px 0}.summary-row{display:flex;justify-content:space-between;gap:20px;padding:9px 0}.summary-row.total{font-size:20px;border-top:1px solid var(--l);margin-top:8px;padding-top:14px}.notice{padding:12px 14px;border-radius:10px;background:#edf6ef;color:#1e5c2c;margin:12px 0}.notice.error{background:#fff0f0;color:#9a1d1d}footer{background:#102617;color:#fff;margin-top:60px}.footer{padding:32px 0;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
@media(max-width:900px){.grid{grid-template-columns:repeat(2,1fr)}.hero-grid,.product-layout,.checkout-grid{grid-template-columns:1fr}}@media(max-width:560px){.grid{grid-template-columns:1fr}.cart-row{grid-template-columns:1fr auto}.hero h1{font-size:44px}}


/* Customer authentication */
.auth-wrap{max-width:620px}.auth-card{padding:28px}.auth-card h2{font:700 36px Georgia,serif;color:var(--g);margin:0 0 8px}.auth-card h3{margin-top:22px}.auth-card .btn{width:100%;margin-top:8px}.auth-card .secondary{background:#fff;color:var(--g);border:1px solid var(--l)}.auth-foot{text-align:center;margin:22px 0 0}.otp-form{margin-top:18px}.small{font-size:13px;line-height:1.5}.field input[readonly]{background:#f2f4ef;color:#556058}.account-details{display:grid;gap:0}.account-details p{display:flex;justify-content:space-between;gap:18px;padding:12px 0;margin:0;border-bottom:1px solid var(--l)}.account-details span{color:var(--m)}.account-actions{display:flex;gap:10px;margin-top:22px}.account-actions .btn{width:auto;flex:1}.payment input{margin-top:3px}nav a[data-auth-link]{font-weight:700;color:var(--g)}


/* Stage 7 - Customer account, order history and password change */
.account-page{max-width:1180px}
.account-head,.account-section-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.account-head h1,.account-section-head h2{margin-bottom:4px}
.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}
.account-orders-panel{margin-top:20px}
.customer-orders-list{display:grid;gap:12px}
.customer-order-card{display:grid;grid-template-columns:1.4fr .8fr 1fr 1fr auto;gap:16px;align-items:center;padding:16px;border:1px solid #dbe5dc;border-radius:16px;background:#fff}
.customer-order-card>div{display:grid;gap:5px}
.customer-order-badge{display:inline-flex;width:max-content;align-items:center;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:700;border:1px solid #d9e2db;background:#f5f8f5;color:#36523d}
.status-paid,.status-delivered{background:#eaf7ee;border-color:#cbe8d2;color:#1d6835}
.status-failed,.status-cancelled{background:#fff0f0;border-color:#f0cdcd;color:#982c2c}
.status-pending{background:#fff8e8;border-color:#f2dfac;color:#795d12}
.status-confirmed,.status-packed,.status-shipped{background:#edf4ff;border-color:#d2e1f7;color:#315f94}
.empty-orders{text-align:center;padding:28px 12px}
.order-modal[hidden]{display:none}
.order-modal{position:fixed;inset:0;z-index:1000;background:rgba(12,25,15,.6);display:grid;place-items:center;padding:20px;overflow:auto}
.order-modal-card{position:relative;width:min(760px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:28px;box-shadow:0 24px 70px rgba(0,0,0,.25)}
.order-modal-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:32px;line-height:1;cursor:pointer;color:#526056}
.order-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0 24px}
.order-summary-grid>div{display:grid;gap:7px;padding:14px;border:1px solid #e0e6e1;border-radius:14px;background:#fafcf9}
.order-summary-grid span:first-child{font-size:13px;color:#68746b}
.order-items{border-top:1px solid #e0e6e1}
.order-item-line{display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid #e0e6e1}
.order-item-line>div:first-child{display:grid;gap:3px}
.order-totals{max-width:380px;margin:18px 0 24px auto}
.order-totals p{display:flex;justify-content:space-between;gap:18px;margin:7px 0}
.order-totals .grand{border-top:1px solid #dfe6e0;padding-top:10px;font-size:1.08rem}
body.modal-open{overflow:hidden}
@media(max-width:900px){
  .account-grid{grid-template-columns:1fr}
  .customer-order-card{grid-template-columns:1fr 1fr}
  .customer-order-card .order-view{grid-column:1/-1}
}
@media(max-width:620px){
  .account-head,.account-section-head{align-items:flex-start;flex-direction:column}
  .customer-order-card{grid-template-columns:1fr}
  .order-summary-grid{grid-template-columns:1fr}
  .order-item-line{grid-template-columns:1fr auto}
  .order-item-line>strong{grid-column:2}
  .order-modal-card{padding:22px 18px}
}


/* Stage 8 - Saved delivery addresses at checkout */
.checkout-address-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:24px 0 12px;
}
.checkout-address-head h3{margin:0 0 4px}
.checkout-address-head p{margin:0}
.checkout-address-head .btn{white-space:nowrap}

.saved-address-list{display:grid;gap:12px;margin-bottom:20px}
.saved-address-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  padding:16px;
  border:1px solid var(--l);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.saved-address-card:hover{border-color:#b8c9bb}
.saved-address-card.selected{
  border-color:var(--g);
  background:#f6faf6;
  box-shadow:0 0 0 2px rgba(24,56,34,.08);
}
.saved-address-radio{padding-top:2px}
.saved-address-radio input{width:18px;height:18px;accent-color:var(--g)}
.saved-address-content{min-width:0}
.saved-address-title{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.saved-address-lines{line-height:1.55;color:#3d4b40}
.default-address-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:700;
  color:#1d6835;
  background:#eaf7ee;
  border:1px solid #cbe8d2;
}
.saved-address-actions{display:flex;gap:14px;margin-top:10px}
.address-link{
  border:0;
  padding:0;
  background:transparent;
  color:var(--g2);
  font-weight:700;
  font-size:13px;
  cursor:pointer;
}
.delete-address{color:#8d2a2a}
.empty-addresses{
  display:grid;
  gap:5px;
  text-align:center;
  padding:24px 16px;
  border:1px dashed #bcc8be;
  border-radius:14px;
  background:#fafcf9;
}

.address-modal[hidden]{display:none}
.address-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(12,25,15,.62);
  overflow:auto;
}
.address-modal-card{
  position:relative;
  width:min(640px,100%);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:20px;
  padding:28px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.address-modal-card h2{
  font:700 32px Georgia,serif;
  color:var(--g);
  margin:0 36px 6px 0;
}
.address-modal-close{
  position:absolute;
  top:10px;
  right:14px;
  border:0;
  background:transparent;
  font-size:34px;
  line-height:1;
  cursor:pointer;
  color:#526056;
}
.address-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field select{
  padding:12px;
  border:1px solid var(--l);
  border-radius:10px;
  background:#fff;
}
.address-default-check{display:flex;align-items:center;gap:8px;margin:4px 0 14px}
.address-default-check input{width:17px;height:17px;accent-color:var(--g)}
.address-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}

@media(max-width:620px){
  .checkout-address-head{flex-direction:column}
  .checkout-address-head .btn{width:100%}
  .address-form-grid{grid-template-columns:1fr}
  .address-modal-card{padding:24px 18px}
  .address-modal-actions{flex-direction:column-reverse}
  .address-modal-actions .btn{width:100%}
}


/* Stage 10 - My Account saved address book */
.account-addresses-panel{
  margin-top:24px;
}
.account-address-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.account-address-card{
  border:1px solid var(--l);
  border-radius:16px;
  padding:18px;
  background:#fff;
}
.account-address-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.account-address-title > div{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.account-address-lines{
  color:#3d4b40;
  line-height:1.55;
}
.account-address-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:16px;
}
.account-address-actions .btn{
  width:auto;
}
@media(max-width:760px){
  .account-address-grid{
    grid-template-columns:1fr;
  }
  .account-address-actions{
    flex-direction:column;
  }
  .account-address-actions .btn{
    width:100%;
  }
}
