/* ==========================================================================
   TravelPlott Shop — dedicated stylesheet
   Loaded ALONGSIDE the existing style.css (for shared tokens: colors, font,
   header/footer, buttons) - this file only adds shop-specific components.
   Include on shop pages as:
     <link rel="stylesheet" href="css/style.css?v=2">
     <link rel="stylesheet" href="css/shop.css?v=1">
   ========================================================================== */

/* ---------- Shop hero ---------- */
.shop-hero{
  background: linear-gradient(120deg, var(--teal-dark), var(--teal) 65%, #0aa79b);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  margin: 24px auto 0;
  position: relative;
  overflow: hidden;
}
.shop-hero::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(180px 180px at 88% 20%, rgba(255,214,140,.25), transparent 70%);
  pointer-events:none;
}
.shop-hero h1{ font-size: clamp(26px, 3.4vw, 38px); margin:0 0 8px; letter-spacing:-0.01em; position:relative; }
.shop-hero p{ font-size:16px; opacity:.92; margin:0; max-width:520px; position:relative; }

/* ---------- Category pills ---------- */
.category-rail{
  display:flex; gap:10px; overflow-x:auto; padding: 20px 0 8px;
  scrollbar-width: thin;
}
.category-rail::-webkit-scrollbar{ height:6px; }
.category-rail::-webkit-scrollbar-thumb{ background: var(--line); border-radius:99px; }
.category-pill{
  white-space:nowrap; padding: 10px 18px; border-radius:999px;
  border:1px solid var(--line); background:#fff; font-weight:600; font-size:14px;
  color: var(--ink-soft); cursor:pointer; transition: all .18s ease; flex:none;
}
.category-pill:hover{ border-color: var(--teal); color: var(--teal-dark); }
.category-pill.active{ background: var(--teal); border-color: var(--teal); color:#fff; box-shadow: 0 4px 14px rgba(0,114,106,.25); }

/* ---------- Product grid ---------- */
.product-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:22px; margin: 24px 0 56px;
}
.product-card{
  background:#fff; border:1px solid var(--line); border-radius: var(--radius-md);
  overflow:hidden; display:flex; flex-direction:column;
  transition: transform .2s ease, box-shadow .2s ease;
  position:relative;
}
.product-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .thumb{
  aspect-ratio: 1/1; background: var(--mist); position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
}
.product-card .thumb img{ width:100%; height:100%; object-fit:cover; transition: transform .35s ease; }
.product-card:hover .thumb img{ transform: scale(1.06); }
.product-card .thumb .placeholder-icon{ color: var(--line); width:64px; height:64px; }
.stock-badge{
  position:absolute; top:12px; left:12px; z-index:2;
  padding: 4px 11px; border-radius:999px; font-size:11px; font-weight:700;
  letter-spacing:.02em; text-transform:uppercase;
}
.stock-badge.in_stock{ background:#E7F6ED; color:#1C7C3F; }
.stock-badge.low_stock{ background:#FFF3DE; color:#9A6300; }
.stock-badge.out_of_stock{ background:#F1F1F1; color:#767676; }
.product-card .body{ padding:16px; display:flex; flex-direction:column; gap:6px; flex:1; }
.product-card .cat-tag{ font-size:11.5px; color: var(--teal); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.product-card .p-name{
  font-size:15.5px; font-weight:400; color: var(--ink); line-height:1.35; cursor:pointer;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; text-overflow:ellipsis; min-height:2.7em;
}
.product-card .p-name:hover{ color: var(--teal-dark); }
.product-card .p-price{ font-size:18px; font-weight:700; color: var(--ink); margin-top:2px; }
.product-card .p-footer{ margin-top:auto; padding-top:12px; display:flex; align-items:center; gap:8px; }

/* Quantity stepper */
.qty-stepper{ display:flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; flex:none; }
.qty-stepper button{
  width:32px; height:36px; border:none; background:#fff; color: var(--ink); font-size:16px; font-weight:600;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.qty-stepper button:hover{ background: var(--mist); }
.qty-stepper button:disabled{ opacity:.35; cursor:not-allowed; }
.qty-stepper .qty-value{ width:32px; text-align:center; font-size:14px; font-weight:600; }

.add-to-cart-btn{
  flex:1; height:36px; border-radius:10px; border:none; background: var(--teal); color:#fff;
  font-weight:600; font-size:13.5px; cursor:pointer; transition: background .15s ease, transform .1s ease;
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.add-to-cart-btn:hover{ background: var(--teal-dark); }
.add-to-cart-btn:active{ transform: scale(.97); }
.add-to-cart-btn:disabled{ background: var(--line); color: var(--ink-soft); cursor:not-allowed; }
.add-to-cart-btn.added{ background:#1C7C3F; }

.empty-state{
  text-align:center; padding: 64px 24px; color: var(--ink-soft);
  border:1px dashed var(--line); border-radius: var(--radius-md); margin: 24px 0;
}
.empty-state svg{ margin-bottom:14px; color: var(--line); }
.empty-state h3{ color: var(--ink); font-size:17px; margin:0 0 6px; }

/* ---------- Floating cart button ---------- */
.cart-fab{
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width:60px; height:60px; border-radius:50%; background: var(--teal); color:#fff;
  border:none; cursor:pointer; box-shadow: 0 10px 28px rgba(0,114,106,.35);
  display:flex; align-items:center; justify-content:center;
  transition: transform .2s ease;
}
.cart-fab:hover{ transform: scale(1.06); }
.cart-fab .count{
  position:absolute; top:-4px; right:-4px; background: var(--amber); color:#1a1200;
  width:22px; height:22px; border-radius:50%; font-size:11.5px; font-weight:800;
  display:flex; align-items:center; justify-content:center; border:2px solid #fff;
}
.cart-fab.pulse{ animation: cartPulse .4s ease; }
@keyframes cartPulse{ 0%{ transform:scale(1); } 40%{ transform:scale(1.18); } 100%{ transform:scale(1); } }

/* ---------- Cart drawer ---------- */
.cart-overlay{
  position:fixed; inset:0; background: rgba(10,20,18,.4); z-index: 98;
  opacity:0; visibility:hidden; transition: opacity .25s ease, visibility .25s ease;
}
.cart-overlay.open{ opacity:1; visibility:visible; }
.cart-drawer{
  position:fixed; top:0; right:0; bottom:0; width: 100%; max-width:420px;
  background:#fff; z-index:99; box-shadow: -12px 0 40px rgba(0,0,0,.15);
  display:flex; flex-direction:column; transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.cart-drawer.open{ transform: translateX(0); }
.cart-drawer-header{ padding:20px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.cart-drawer-header h2{ font-size:18px; margin:0; }
.cart-drawer-header button{ background:none; border:none; cursor:pointer; color: var(--ink-soft); padding:4px; }
.cart-drawer-body{ flex:1; overflow-y:auto; padding: 14px 22px; }
.cart-line{ display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.cart-line .thumb{ width:64px; height:64px; border-radius:10px; background: var(--mist); flex:none; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.cart-line .thumb img{ width:100%; height:100%; object-fit:cover; }
.cart-line .info{ flex:1; min-width:0; }
.cart-line .info .name{ font-size:14px; font-weight:600; margin-bottom:2px; }
.cart-line .info .unit-price{ font-size:12.5px; color: var(--ink-soft); margin-bottom:8px; }
.cart-line .line-actions{ display:flex; align-items:center; gap:10px; }
.cart-line .remove-btn{ background:none; border:none; color: var(--ink-soft); cursor:pointer; font-size:12.5px; text-decoration:underline; margin-left:auto; }
.cart-line .remove-btn:hover{ color:#B23A3A; }
.cart-line .line-subtotal{ font-size:14px; font-weight:700; white-space:nowrap; align-self:flex-start; }
.cart-empty{ text-align:center; padding: 60px 20px; color: var(--ink-soft); }
.cart-empty svg{ margin-bottom:14px; color: var(--line); }
.cart-drawer-footer{ border-top:1px solid var(--line); padding: 18px 22px 22px; }
.cart-subtotal-row{ display:flex; justify-content:space-between; font-size:15px; font-weight:700; margin-bottom:14px; }
.cart-note{ font-size:12px; color: var(--ink-soft); margin-top:10px; text-align:center; }

/* ---------- Toast notifications ---------- */
.toast{
  position:fixed; bottom: 24px; left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color:#fff; padding: 12px 22px; border-radius:999px;
  font-size:13.5px; font-weight:600; z-index: 200; opacity:0; visibility:hidden;
  transition: all .25s ease; display:flex; align-items:center; gap:8px;
  box-shadow: var(--shadow-md);
}
.toast.show{ opacity:1; visibility:visible; transform: translateX(-50%) translateY(0); }
.toast .tick{ color:#4ADE80; }

/* ---------- Checkout page ---------- */
.checkout-grid{ display:grid; grid-template-columns: 1fr 400px; gap:40px; align-items:start; }
.checkout-summary{ background:#fff; border:1px solid var(--line); border-radius: var(--radius-md); padding:24px; position:sticky; top:96px; }
.checkout-summary h2{ font-size:17px; margin:0 0 16px; }
.checkout-line{ display:flex; justify-content:space-between; gap:10px; font-size:13.5px; padding:10px 0; border-bottom:1px solid var(--line); }
.checkout-line .qty{ color: var(--ink-soft); }
.checkout-total-row{ display:flex; justify-content:space-between; font-size:17px; font-weight:700; padding-top:16px; }
.checkout-form .field{ margin-bottom:16px; }
.checkout-form label{ display:block; font-size:13px; font-weight:600; margin-bottom:6px; }
.checkout-form input, .checkout-form textarea{
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px;
  font-family:inherit; font-size:14.5px; background: var(--mist);
}
.checkout-form input:focus, .checkout-form textarea:focus{ outline:2px solid var(--teal); outline-offset:1px; background:#fff; }
.checkout-error{ background:#FBE9E9; color:#B23A3A; font-size:13px; padding:10px 14px; border-radius:10px; margin-bottom:16px; display:none; }

/* ---------- Product quick-view carousel ---------- */
.qv-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:34px; height:34px; border-radius:50%; border:none; background:rgba(255,255,255,.9);
  color: var(--ink); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-sm);
}
.qv-arrow:hover{ background:#fff; }
.qv-prev{ left:10px; }
.qv-next{ right:10px; }
.qv-dots{ position:absolute; bottom:10px; left:50%; transform:translateX(-50%); z-index:2; display:flex; gap:6px; }
.qv-dot{ width:7px; height:7px; border-radius:50%; border:none; background:rgba(255,255,255,.6); cursor:pointer; padding:0; }
.qv-dot.active{ background:#fff; width:18px; border-radius:4px; transition: width .2s ease; }

/* ---------- Search box ---------- */
.shop-search{ position:relative; margin: 20px 0 6px; max-width:360px; }
.shop-search input{
  width:100%; padding:11px 14px 11px 40px; border:1px solid var(--line); border-radius:10px;
  font-family:inherit; font-size:14px; background:#fff;
}
.shop-search input:focus{ outline:2px solid var(--teal); outline-offset:1px; }
.shop-search svg{ position:absolute; left:13px; top:50%; transform:translateY(-50%); color: var(--ink-soft); pointer-events:none; }
.shop-search .clear-search-btn{
  position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:none;
  color: var(--ink-soft); cursor:pointer; font-size:15px; display:none;
}

/* ---------- Order status page ---------- */
.order-status-card{ max-width:480px; margin: 40px auto; background:#fff; border-radius: var(--radius-lg); padding:32px; box-shadow: var(--shadow-md); text-align:center; }
.order-status-icon{ width:60px; height:60px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.order-status-icon.success{ background:#E7F6ED; color:#1C7C3F; }
.order-status-icon.pending{ background:#FFF3DE; color:#9A6300; }
.order-status-icon.error{ background:#FBE9E9; color:#B23A3A; }
.order-receipt{ text-align:left; margin: 20px 0; }
.order-receipt .row{ display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px dashed var(--line); font-size:13.5px; }
.order-receipt .row:last-child{ border-bottom:none; font-weight:700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .checkout-grid{ grid-template-columns: 1fr; }
  .checkout-summary{ position:static; order:-1; }
}
@media (max-width: 640px){
  .shop-hero{ padding:32px 22px; min-height:220px; }
  .product-grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:14px; }
  .product-card .p-price{ font-size:16px; }
  .cart-drawer{ max-width:100%; }
  .product-card .p-footer{ flex-direction:column; align-items:stretch; gap:8px; }
  .qty-stepper{ align-self:stretch; justify-content:center; }
  .add-to-cart-btn{ width:100%; white-space:nowrap; }
}
