/*
 * Route62.Online — assets/css/woo.css
 * WooCommerce-specific styles: shop, product, cart, checkout pages
 * Loaded only on WooCommerce pages, deferred via performance.php
 * Version: 1.0.0
 */

/* ── Product card enhancements ── */
.product {
  background: white;
  border: 1px solid #E8DDD0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product:hover {
  box-shadow: 0 4px 20px rgba(26, 14, 8, 0.12);
}

.product__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background-color: #FAF6F0;
}

.product-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #1A0E08;
  padding: 0 12px;
}

/* ── Vendor info on product cards ── */
.r62-vendor-name {
  font-size: 13px;
  color: #C8955A;
  padding: 0 12px;
  margin-bottom: 8px;
}

.r62-vendor-name a {
  color: #C8955A;
  font-weight: 500;
}

.r62-vendor-name a:hover {
  color: #C4521A;
}

.verified-tick {
  color: #6B7F5E;
  font-weight: 700;
}

/* ── Availability pills ── */
.r62-avail-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 12px;
  margin-bottom: 12px;
}

.r62-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  text-align: center;
  white-space: nowrap;
}

.r62-pill--pickup {
  background-color: #D4DDCF;
  color: #4E5E46;
}

.r62-pill--ship {
  background-color: #F0D5C4;
  color: #C4521A;
}

.r62-pill--auction {
  background-color: #D4DDCF;
  color: #6B7F5E;
}

/* ── Sale badge ── */
.r62-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #C4521A;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
}

/* ── Stock status ── */
.r62-stock-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.r62-stock-status--low {
  background-color: #F0D5C4;
  color: #C4521A;
}

.r62-stock-status--out {
  background-color: #E8DDD0;
  color: #7A6055;
}

/* ── Prices ── */
.woocommerce-Price-amount {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #C4521A;
}

.amount {
  color: #C4521A;
}

.woocommerce del .amount {
  color: #7A6055;
  opacity: 0.7;
}

/* ── Add to cart button ── */
.button.add_to_cart_button {
  width: 100%;
  margin-top: 12px;
  padding: 12px !important;
  background-color: #C4521A !important;
  color: #FAF6F0 !important;
  border-color: #C4521A !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: background-color 0.2s;
}

.button.add_to_cart_button:hover {
  background-color: #A3420E !important;
  border-color: #A3420E !important;
}

/* ── Cart page ── */
.woocommerce-cart-form {
  margin-bottom: 32px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  border-bottom: 1px solid #E8DDD0;
  text-align: left;
}

.cart-table th {
  background-color: #FAF6F0;
  font-weight: 700;
  color: #1A0E08;
}

.cart-totals {
  background-color: #FAF6F0;
  padding: 24px;
  border-radius: 8px;
  max-width: 400px;
  margin-left: auto;
  margin-bottom: 24px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #E8DDD0;
}

.cart-total strong {
  font-weight: 700;
  color: #1A0E08;
}

.cart-total--final {
  border-bottom: none;
  font-size: 18px;
  font-weight: 700;
}

.cart-total--final strong {
  color: #C4521A;
}

/* ── Empty cart message ── */
.r62-empty-cart {
  text-align: center;
  padding: 48px 20px;
  background-color: #FAF6F0;
  border-radius: 8px;
}

.r62-empty-cart__icon {
  display: block;
  font-size: 64px;
  margin-bottom: 16px;
}

.r62-empty-cart h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #1A0E08;
}

.r62-empty-cart p {
  font-size: 16px;
  color: #7A6055;
  margin-bottom: 24px;
  line-height: 1.8;
}

.r62-empty-cart__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Checkout ── */
.woocommerce-checkout {
  max-width: 900px;
  margin: 0 auto;
}

.checkout-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .checkout-columns {
    grid-template-columns: 2fr 1fr;
  }
}

.woocommerce-checkout-review-order {
  background-color: #FAF6F0;
  padding: 24px;
  border-radius: 8px;
}

/* ── Escrow notice ── */
.r62-checkout-escrow {
  background-color: #D4DDCF;
  border-left: 4px solid #6B7F5E;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.escrow-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.r62-checkout-escrow span {
  font-size: 14px;
  color: #4E5E46;
  line-height: 1.6;
}

/* ── Product single page ── */
.woocommerce-product-gallery {
  margin-bottom: 32px;
}

.woocommerce-product-gallery__image {
  border-radius: 8px;
  overflow: hidden;
}

.product-summary-section {
  background: white;
  padding: 0;
}

.product-summary-section h1 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #1A0E08;
}

.product-summary-section .price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #C4521A;
  margin-bottom: 16px;
}

/* ── Single product vendor info ── */
.r62-single-vendor-info {
  background-color: #FAF6F0;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 14px;
}

.r62-single-vendor-info a {
  color: #C4521A;
  font-weight: 600;
}

.vendor-town {
  color: #C8955A;
}

.verified-badge {
  color: #6B7F5E;
  font-weight: 700;
  margin-left: 4px;
}

/* ── My Account page ── */
.woocommerce-account {
  max-width: 1000px;
  margin: 0 auto;
}

.woocommerce-MyAccount-navigation {
  list-style: none;
  padding: 0;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid #E8DDD0;
}

.woocommerce-MyAccount-navigation li {
  margin: 0;
}

.woocommerce-MyAccount-navigation a {
  display: block;
  padding: 12px 16px;
  border-bottom: 3px solid transparent;
  color: #C8955A;
  transition: color 0.2s, border-color 0.2s;
}

.woocommerce-MyAccount-navigation a:hover,
.woocommerce-MyAccount-navigation li.is-active a {
  color: #C4521A;
  border-bottom-color: #C4521A;
}

/* ── Mobile adjustments ── */
@media (max-width: 767px) {
  .cart-table {
    font-size: 13px;
  }

  .cart-table th,
  .cart-table td {
    padding: 8px;
  }

  .checkout-columns {
    grid-template-columns: 1fr;
  }

  .product-summary-section h1 {
    font-size: 24px;
  }
}
