/* ============================================================
   CATALOG — product grid, cart, checkout
   ============================================================ */

/* --- Catalog Section ---------------------------------------- */
.catalog-section {
  padding: 100px 0;
  background: #f2efe8;
}

/* --- Category Tabs ------------------------------------------ */
.catalog-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 0;
}

.catalog-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px 8px 0 0;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted, #6b7c72);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.catalog-tab:hover { background: #fafaf8; color: var(--fg-dark, #1a1a18); }

.catalog-tab.active {
  background: var(--bg-dark, #1e3a2f);
  color: #faf7f2;
  border-color: var(--bg-dark, #1e3a2f);
  border-bottom-color: var(--accent, #c8933f);
}

.catalog-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-microgreens { background: #6b9e69; }
.dot-herbs       { background: #8fa88a; }
.dot-mushrooms   { background: #a1887f; }
.dot-flowers     { background: #e57373; }

.catalog-tab.active .catalog-tab-dot { background: rgba(255,255,255,0.6); }

/* --- Product Grid ------------------------------------------- */
.products-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

/* --- Product Card ------------------------------------------- */
.product-card-full {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card-full:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-dark, #1a1a18);
}

.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-card-grow {
  font-size: 12px;
  color: var(--fg-muted, #6b7c72);
}

.product-card-unit {
  font-size: 12px;
  color: var(--fg-muted, #6b7c72);
}

.product-card-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card-our-price {
  font-size: 18px;
  font-weight: 600;
  color: #2d5743;
}

.product-card-market-price {
  font-size: 12px;
  color: var(--fg-muted, #6b7c72);
}

.product-card-market-price span {
  text-decoration: line-through;
}

/* --- Add to Cart Row ---------------------------------------- */
.add-to-cart-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.product-qty-select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--fg-dark, #1a1a18);
  background: #fafaf8;
  cursor: pointer;
}

.btn-add-to-cart {
  flex: 1.5;
  padding: 9px 12px;
  background: #c8933f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-add-to-cart:hover { background: #b07830; transform: translateY(-1px); }
.btn-add-to-cart:active { transform: translateY(0); }

.btn-add-to-cart.added {
  background: #2d5743;
}

.btn-add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Cart Sidebar ------------------------------------------- */
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.cart-sidebar {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  padding: 24px;
  position: sticky;
  top: 24px;
}

.cart-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.cart-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--fg-dark, #1a1a18);
}

.cart-count-badge {
  background: #c8933f;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  padding: 2px 8px;
}

.cart-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--fg-muted, #6b7c72);
  font-size: 14px;
}

.cart-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 500; color: var(--fg-dark, #1a1a18); }
.cart-item-qty { font-size: 12px; color: var(--fg-muted, #6b7c72); margin-top: 2px; }

.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cart-item-price { font-size: 13px; font-weight: 600; color: var(--fg-dark, #1a1a18); }

.btn-remove-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #c8933f;
  padding: 0;
  text-decoration: underline;
}

.btn-remove-item:hover { color: #b07830; }

.cart-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 16px 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-total-label { font-size: 14px; color: var(--fg-dark, #1a1a18); font-weight: 500; }
.cart-total-value {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-dark, #1a1a18);
}

.btn-checkout-cart {
  width: 100%;
  padding: 14px;
  background: #c8933f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: block;
  text-align: center;
  text-decoration: none;
}

.btn-checkout-cart:hover { background: #b07830; transform: translateY(-1px); }
.btn-checkout-cart:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.cart-vat-note {
  text-align: center;
  font-size: 11px;
  color: var(--fg-muted, #6b7c72);
  margin-top: 10px;
}

/* --- Checkout Form ------------------------------------------ */
.checkout-panel {
  display: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 16px;
  padding: 40px;
  margin-top: 60px;
}

.checkout-panel.active { display: block; }

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.checkout-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--fg-dark, #1a1a18);
}

.btn-back-to-catalog {
  background: none;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--fg-dark, #1a1a18);
  font-family: 'DM Sans', sans-serif;
}

.btn-back-to-catalog:hover { background: #f2efe8; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* Form */
.checkout-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--fg-dark, #1a1a18); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--fg-dark, #1a1a18);
  background: #fafaf8;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #c8933f;
  background: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0b0a8; }

/* Order summary in checkout */
.order-summary-panel {
  background: #f2efe8;
  border-radius: 12px;
  padding: 24px;
}

.order-summary-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-dark, #1a1a18);
  margin-bottom: 16px;
}

.order-summary-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.os-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.os-item-name { color: var(--fg-dark, #1a1a18); }
.os-item-price { color: var(--fg-dark, #1a1a18); font-weight: 500; }
.os-item-sub { color: var(--fg-muted, #6b7c72); font-size: 12px; }

.os-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin: 12px 0;
}

.os-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.os-total-label { font-size: 14px; font-weight: 600; color: var(--fg-dark, #1a1a18); }
.os-total-value {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: #2d5743;
}

.btn-place-order {
  width: 100%;
  padding: 14px;
  background: #c8933f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 20px;
}

.btn-place-order:hover { background: #b07830; transform: translateY(-1px); }
.btn-place-order:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- Confirmation ------------------------------------------- */
.confirmation-panel {
  display: none;
  max-width: 640px;
  margin: 80px auto;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 16px;
  padding: 60px 48px;
}

.confirmation-panel.active { display: block; }

.confirmation-icon {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.confirmation-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--fg-dark, #1a1a18);
  margin-bottom: 12px;
}

.confirmation-sub {
  font-size: 15px;
  color: var(--fg-muted, #6b7c72);
  line-height: 1.6;
  margin-bottom: 40px;
}

.confirmation-order-id {
  display: inline-block;
  background: #f2efe8;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 14px;
  color: var(--fg-dark, #1a1a18);
  margin-bottom: 32px;
  font-weight: 500;
}

.confirmation-items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto 40px;
  max-width: 480px;
}

.confirmation-items-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted, #6b7c72);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.confirmation-items-table td {
  font-size: 14px;
  color: var(--fg-dark, #1a1a18);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.confirmation-items-table tr:last-child td { border-bottom: none; }

.btn-new-order {
  padding: 12px 32px;
  background: #c8933f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-new-order:hover { background: #b07830; }

/* --- Form feedback ------------------------------------------ */
.checkout-error {
  color: #c0392b;
  font-size: 14px;
  padding: 12px 16px;
  background: #fef0ee;
  border: 1px solid #f5c6c0;
  border-radius: 8px;
  display: none;
}

.checkout-error.visible { display: block; }

/* --- Responsive --------------------------------------------- */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .cart-sidebar { position: static; }
  .checkout-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .products-grid-full { grid-template-columns: repeat(2, 1fr); }
  .checkout-panel { padding: 24px; }
  .confirmation-panel { padding: 40px 24px; }
  .catalog-tabs { gap: 6px; }
  .catalog-tab { padding: 8px 14px; font-size: 13px; }
}
/* --- Product Tag Badges ------------------------------------- */
.product-tag-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

.product-card-full {
  position: relative; /* needed for absolute badge */
}

.product-tag-organic {
  background: #2d5743;
  color: #d4edda;
}

.product-tag-premium {
  background: #c8933f;
  color: #fff;
}

.product-tag-low-stock {
  background: #7a3d2a;
  color: #ffd9cc;
}

.product-tag-dried {
  background: #5c4a2a;
  color: #f5e6c8;
}

/* --- Bulk Quote Note ---------------------------------------- */
.product-card-bulk-note {
  display: block;
  font-size: 11px;
  font-style: italic;
  color: #c8933f;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* --- Grow Cycle Badge --------------------------------------- */
.grow-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  color: #fff;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.product-card-full {
  position: relative;
}

.per-kg-label {
  font-size: 13px;
  font-weight: 400;
  color: #6b7c72;
}

/* --- Per-kg price display ----------------------------------- */
.product-card-our-price {
  font-size: 20px;
  font-weight: 600;
  color: #2d5743;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

/* --- Form Section ------------------------------------------ */
.form-section {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7c72;
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  display: block;
  font-size: 11px;
  color: #6b7c72;
  margin-top: 4px;
}

/* --- Split Delivery Toggle ---------------------------------- */
.split-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a18;
  cursor: pointer;
  margin-bottom: 6px;
}

.split-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2d5743;
  cursor: pointer;
}

.split-hint {
  font-size: 11px;
  color: #6b7c72;
  margin: 0;
  line-height: 1.4;
}

/* --- Split Delivery Groups (checkout) --------------------- */
.split-group-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f2efe8;
  border-radius: 8px;
  margin-bottom: 8px;
}

.split-group-icon {
  font-size: 18px;
  width: 28px;
  text-align: center;
}

.split-group-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a18;
}

.split-group-date {
  font-size: 12px;
  font-weight: 600;
  color: #2d5743;
  background: #e8f5e9;
  padding: 3px 8px;
  border-radius: 4px;
}

/* --- Confirmation Delivery Schedule ------------------------ */
.confirmation-delivery-schedule {
  background: #f2efe8;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.confirmation-schedule-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a18;
  margin-bottom: 10px;
}

.confirmation-schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: #1a1a18;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.confirmation-schedule-row:last-child { border-bottom: none; }

.confirmation-schedule-row .schedule-date {
  font-weight: 600;
  color: #2d5743;
}

/* --- Checkout Form Layout ---------------------------------- */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-form-wrap {
  min-width: 0;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

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