/* ============================================================
   SHOP — storefront, product grid, cart badge
   Matches the site tokens defined in main.css
   ============================================================ */

/* Cart icon in the nav */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--forest);
  font-size: 0.65rem;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- HERO ---- */
.shop-hero {
  background: var(--forest);
  color: #fff;
  padding: 90px 0 70px;
  text-align: center;
}
.shop-hero .label {
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}
.shop-hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 14px;
  color: #fff;
}
.shop-hero h1 em {
  color: var(--gold);
  font-style: italic;
}
.shop-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- PRODUCTS SECTION ---- */
.shop-products {
  padding: 60px 0 90px;
  background: var(--paper);
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}
.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 8px 20px;
  border-radius: 30px;
  font-family: var(--body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover {
  border-color: var(--sage);
  color: var(--forest);
}
.filter-chip.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.shop-empty {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
  padding: 40px 0;
}
.shop-empty a {
  color: var(--gold);
  font-weight: 600;
}

/* ---- PRODUCT GRID ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 61, 43, 0.1);
}
.product-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
}
.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #fff 0%, var(--cream) 100%);
  overflow: hidden;
}
.product-image img {
  transition: transform 0.5s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.06);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-size: 2.4rem;
  opacity: 0.5;
}
.product-badge.out {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(44, 44, 44, 0.85);
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
}
.product-info {
  padding: 20px 22px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 600;
}
.product-info h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--forest);
  margin: 6px 0 8px;
}
.product-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
.product-price {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--forest);
  margin-top: auto;
  padding-top: 8px;
}
.btn-add {
  margin: 0 22px 22px;
  padding: 12px;
  background: var(--gold);
  color: var(--forest);
  border: none;
  border-radius: 4px;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add:hover:not(:disabled) {
  background: var(--sage);
  color: #fff;
}
.btn-add:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* ---- ADD-TO-CART TOAST ---- */
.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 120%);
  background: var(--forest);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  transition: transform 0.3s var(--ease);
}
.cart-toast.show {
  transform: translate(-50%, 0);
}
.cart-toast i {
  color: var(--gold);
}
.cart-toast a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .product-info { padding: 16px 16px 8px; }
  .product-info h3 { font-size: 1.2rem; }
  .btn-add { margin: 0 16px 16px; }
}

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail-section {
  padding: 40px 0 90px;
  background: var(--paper);
}
.shop-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: color 0.2s;
}
.shop-back:hover { color: var(--forest); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.product-detail-image {
  aspect-ratio: 1;
  background: var(--cream);
  border-radius: 14px;
  overflow: hidden;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image-placeholder.large { font-size: 5rem; }

.product-detail-info h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--forest);
  margin: 8px 0 12px;
}
.product-detail-price {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
}
.stock-status { font-size: 0.9rem; margin: 0 0 20px; display: flex; align-items: center; gap: 8px; }
.stock-status.in { color: var(--sage); }
.stock-status.out { color: #b4513f; }
.product-detail-desc {
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 28px;
}

.product-buy { display: flex; gap: 16px; align-items: stretch; margin-bottom: 20px; flex-wrap: wrap; }
.qty-picker {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.qty-btn {
  width: 42px;
  height: 100%;
  min-height: 46px;
  border: none;
  background: var(--cream);
  color: var(--forest);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-btn:hover { background: var(--border); }
.qty-picker input,
.ci-qty-input {
  width: 52px;
  text-align: center;
  border: none;
  font-family: var(--body);
  font-size: 1rem;
  -moz-appearance: textfield;
}
.qty-picker input::-webkit-outer-spin-button,
.qty-picker input::-webkit-inner-spin-button,
.ci-qty-input::-webkit-outer-spin-button,
.ci-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-detail-add { padding: 14px 40px; }

.product-ship-note {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-related { margin-top: 80px; }
.product-related h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.8rem;
  color: var(--forest);
  margin-bottom: 28px;
}

/* ============================================================
   CART
   ============================================================ */
.cart-section { padding: 50px 0 90px; background: var(--paper); min-height: 50vh; }
.cart-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--forest);
  margin-bottom: 32px;
}
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty i { font-size: 3rem; color: var(--border); margin-bottom: 20px; display: block; }
.cart-empty p { margin-bottom: 24px; font-size: 1.1rem; }
.cart-empty .btn-primary { display: inline-block; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.ci-image { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; background: var(--cream); }
.ci-image img { width: 100%; height: 100%; object-fit: cover; }
.ci-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--sage); opacity: 0.5; }
.ci-info h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 500; color: var(--forest); margin: 0 0 4px; }
.ci-price { font-size: 0.82rem; color: var(--muted); }
.ci-qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.ci-qty .qty-btn { min-height: 38px; width: 34px; }
.ci-line { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--forest); min-width: 80px; text-align: right; }
.ci-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 8px; transition: color 0.2s; }
.ci-remove:hover { color: #b4513f; }

.cart-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 26px;
  position: sticky;
  top: 20px;
}
.cart-summary h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 500; color: var(--forest); margin: 0 0 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--ink); padding: 10px 0; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: var(--forest); }
.summary-note { font-size: 0.78rem; color: var(--gold); font-weight: 500; padding-bottom: 6px; }
.btn-checkout { display: block; text-align: center; margin-top: 20px; }
.cart-continue { display: block; text-align: center; margin-top: 14px; color: var(--muted); font-size: 0.85rem; }
.cart-continue:hover { color: var(--forest); }

@media (max-width: 820px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 560px) {
  .cart-item { grid-template-columns: 60px 1fr auto; grid-template-areas: "img info remove" "img qty line"; gap: 10px 14px; }
  .ci-image { grid-area: img; width: 60px; height: 60px; }
  .ci-info { grid-area: info; }
  .ci-qty { grid-area: qty; }
  .ci-line { grid-area: line; }
  .ci-remove { grid-area: remove; align-self: start; }
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-section { padding: 40px 0 90px; background: var(--paper); min-height: 50vh; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.checkout-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 30px;
}
.checkout-form h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--forest);
  margin: 0 0 18px;
}
.checkout-form h2:not(:first-child) { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.co-field { margin-bottom: 16px; }
.co-field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.co-field .req { color: var(--gold); }
.co-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--body);
  font-size: 0.95rem;
  background: var(--paper);
}
.co-field input:focus { outline: none; border-color: var(--sage); background: #fff; }
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.co-method { display: grid; gap: 12px; margin-bottom: 20px; }
.co-method-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.9rem;
}
.co-method-opt:has(input:checked) { border-color: var(--gold); background: rgba(201, 168, 76, 0.06); }
.co-method-opt input { accent-color: var(--forest); width: 18px; height: 18px; }

.co-error { color: #b4513f; font-size: 0.88rem; margin: 4px 0 14px; }
.btn-pay { width: 100%; margin-top: 8px; padding: 15px; }
.co-secure { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 14px; }
.co-secure i { color: var(--sage); }

.co-summary-items { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.co-item { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink); padding: 5px 0; gap: 12px; }

/* ============================================================
   PAYMENT RETURN
   ============================================================ */
.return-section { padding: 80px 0 100px; background: var(--paper); min-height: 60vh; display: flex; align-items: center; }
.return-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px 40px;
}
.return-icon { font-size: 4rem; margin-bottom: 20px; }
.return-icon.success { color: var(--sage); }
.return-icon.cancel { color: var(--gold); }
.return-icon.fail { color: #b4513f; }
.return-card h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; color: var(--forest); margin: 0 0 14px; }
.return-card p { color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.return-sub { font-size: 0.9rem; }
.return-actions { display: flex; gap: 14px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .co-row { grid-template-columns: 1fr; }
}

/* ---- FLOATING SHOP TOOLS (cart + track, top-right under the nav) ---- */
.float-tools {
  position: fixed;
  top: 96px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 900;
}
.float-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--forest);
  color: #fff;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 24px rgba(26, 61, 43, 0.28);
  transition: transform 0.15s, background 0.2s;
}
.float-btn:hover {
  background: var(--sage);
  transform: translateY(-2px);
}
.float-btn i { color: var(--gold); }
.float-btn.active { background: var(--gold); color: var(--forest); }
.float-btn.active i { color: var(--forest); }
.float-btn .cart-count {
  position: static;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
@media (max-width: 640px) {
  .float-tools { top: 84px; right: 12px; }
  .float-btn { padding: 10px 12px; font-size: 0; gap: 0; }
  .float-btn i { font-size: 1rem; }
  .float-btn .cart-count { font-size: 0.68rem; margin-left: 6px; }
}

/* ---- TRACK MY ORDER PAGE ---- */
.track-section { padding: 60px 0 90px; background: var(--paper); }
.track-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
}
.track-form { display: flex; flex-direction: column; gap: 16px; }
.tf-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.tf-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--body);
  font-size: 0.95rem;
}
.tf-field input:focus { outline: none; border-color: var(--sage); }
.track-result { margin-top: 20px; }
.track-error { color: #a33; font-size: 0.9rem; }
.track-loading { color: var(--muted); font-style: italic; }
.track-order { border-top: 2px solid var(--forest); padding-top: 14px; }
.to-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.to-row span { color: var(--muted); }
.to-row strong { color: var(--forest); }
.track-help {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--muted);
}
.track-help a { color: var(--gold); font-weight: 600; }

/* ---- SHOP SEARCH BAR ---- */
.shop-search {
  position: relative;
  max-width: 420px;
  margin: 0 auto 22px;
}
.shop-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
}
.shop-search input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: var(--body);
  font-size: 0.92rem;
  background: #fff;
}
.shop-search input:focus { outline: none; border-color: var(--sage); }

/* Collection-only notice on checkout */
.co-method-opt.is-only { cursor: default; }
.co-soon {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: normal;
}
.co-soon i { color: var(--gold); margin-right: 4px; }

/* ---- CATALOGUE MODE ---- */
.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--forest);
  color: #fff;
  text-align: center;
}
.btn-wa i { color: var(--gold); }
.btn-wa:hover { background: var(--sage); color: #fff; }
.btn-wa:hover i { color: #fff; }
a.btn-detail-add {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.catalog-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}
