@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

/* Same brand tokens as the admin (ink/paper/sand) applied more expressively here,
   since this is the customer-facing side. Falls back to system fonts if the
   Google Fonts request is blocked (e.g. restrictive network) — layout doesn't depend on it. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #FAF8F3;
  color: #211E19;
  font-size: 15.5px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
.serif { font-family: "Fraunces", Georgia, "Times New Roman", serif; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.num { font-variant-numeric: tabular-nums; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top nav ---------- */
.shop-nav {
  border-bottom: 1px solid #E9E3D6; background: #FFFEFC; position: sticky; top: 0; z-index: 10;
}
.shop-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 1080px; margin: 0 auto; }
.shop-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.shop-brand .mark { width: 30px; height: 30px; border-radius: 7px; background: #1E1B16; color: #EDE9E0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; font-family: -apple-system, sans-serif; }
.shop-nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.cart-link { position: relative; padding: 6px 0; }
.cart-badge {
  position: absolute; top: -6px; right: -16px; background: #B8873A; color: #1E1B16;
  font-size: 10.5px; font-weight: 800; border-radius: 20px; padding: 1px 6px; font-family: -apple-system, sans-serif;
}

/* ---------- Hero ---------- */
.hero { padding: 54px 20px 40px; text-align: center; }
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { color: #6E6A5F; font-size: 15.5px; max-width: 440px; margin: 0 auto; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 0 26px; align-items: center; }
.filters input, .filters select {
  padding: 9px 12px; border: 1px solid #E0D9C8; border-radius: 7px; background: #FFFEFC;
  font-size: 13.5px; font-family: inherit; color: #211E19;
}
.filters input:focus, .filters select:focus { outline: 2px solid #B8873A; outline-offset: 1px; }
.filters button { padding: 9px 16px; border-radius: 7px; border: 1px solid transparent; background: #1E1B16; color: #EDE9E0; font-weight: 600; font-size: 13.5px; cursor: pointer; }

/* ---------- Product grid ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; padding-bottom: 60px; }
.shop-card { display: block; }
.shop-card .thumb-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #EFECE3; aspect-ratio: 3/4; margin-bottom: 10px; }
.shop-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.shop-card:hover .thumb-wrap img { transform: scale(1.03); }
.shop-card .thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #B0AA9B; font-size: 12px; }
.shop-card .stock-flag { position: absolute; top: 10px; left: 10px; background: #1E1B16; color: #EDE9E0; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.shop-card .discount-flag { position: absolute; top: 10px; right: 10px; background: #B8873A; color: #1E1B16; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.shop-card .name { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.shop-card .price { font-size: 13.5px; color: #6E6A5F; }
.shop-card .price .was { text-decoration: line-through; color: #A79F8C; margin-right: 6px; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 36px 0 60px; }
.product-gallery .main-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; background: #EFECE3; }
.product-gallery .main-img.placeholder { display: flex; align-items: center; justify-content: center; color: #B0AA9B; font-size: 13px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs img { width: 60px; height: 74px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.selected { border-color: #B8873A; }

.product-info .category-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #A2672B; font-weight: 700; margin-bottom: 6px; }
.product-info h1 { font-size: 28px; }
.product-info .price-row { font-size: 20px; margin: 12px 0 18px; }
.product-info .price-row .was { text-decoration: line-through; color: #A79F8C; font-size: 15px; margin-right: 8px; }
.product-info .description { color: #524E43; font-size: 14.5px; margin-bottom: 22px; }
.variant-picker label { display: block; font-size: 12.5px; font-weight: 700; color: #524E43; margin-bottom: 6px; }
.variant-picker select { width: 100%; padding: 11px 13px; border: 1px solid #E0D9C8; border-radius: 8px; font-size: 14px; margin-bottom: 16px; background: #FFFEFC; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qty-row input { width: 70px; padding: 9px; border: 1px solid #E0D9C8; border-radius: 7px; text-align: center; }
.btn-add-cart { width: 100%; padding: 14px; border-radius: 8px; border: none; background: #1E1B16; color: #EDE9E0; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn-add-cart:disabled { background: #D9D3C4; color: #8A8577; cursor: not-allowed; }
.stock-note { font-size: 12.5px; color: #8A8577; margin-top: 10px; }

/* ---------- Cart & checkout ---------- */
.page-title { padding: 32px 0 20px; }
.cart-line { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid #EEE6D6; }
.cart-line img { width: 64px; height: 78px; object-fit: cover; border-radius: 7px; background: #EFECE3; }
.cart-line .thumb-placeholder { width: 64px; height: 78px; border-radius: 7px; background: #EFECE3; display: flex; align-items: center; justify-content: center; color: #B0AA9B; font-size: 10px; }
.cart-line .info { flex: 1; }
.cart-line .name { font-weight: 600; font-size: 14.5px; }
.cart-line .meta { font-size: 12.5px; color: #8A8577; }
.cart-line form { display: flex; align-items: center; gap: 8px; }
.cart-line input[type=number] { width: 54px; padding: 6px; border: 1px solid #E0D9C8; border-radius: 6px; text-align: center; }
.cart-line .line-total { font-weight: 700; min-width: 90px; text-align: right; }
.cart-summary { max-width: 340px; margin-left: auto; padding-top: 20px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: #524E43; }
.cart-summary .row.total { font-weight: 700; font-size: 17px; color: #211E19; border-top: 1px solid #E9E3D6; padding-top: 10px; margin-top: 10px; }
.cart-empty { text-align: center; padding: 70px 0; color: #8A8577; }

.checkout-form, .order-card { max-width: 480px; margin: 0 auto; background: #FFFEFC; border: 1px solid #E9E3D6; border-radius: 12px; padding: 26px 24px; }
.checkout-form label, .order-card label { display: block; font-size: 12.5px; font-weight: 700; color: #524E43; margin-bottom: 5px; }
.checkout-form input, .checkout-form select, .checkout-form textarea, .order-card input {
  width: 100%; padding: 10px 12px; border: 1px solid #E0D9C8; border-radius: 7px;
  font-size: 14px; font-family: inherit; margin-bottom: 14px; background: #FFFEFC;
}
.checkout-summary { background: #FAF6EC; border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; font-size: 13.5px; }
.checkout-summary .row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.pay-options { display: flex; gap: 10px; margin-bottom: 16px; }
.pay-option { flex: 1; border: 1px solid #E0D9C8; border-radius: 8px; padding: 12px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600; }
.pay-option input { width: auto; margin: 0 6px 0 0; display: inline-block; }
.btn-checkout { width: 100%; padding: 14px; border-radius: 8px; border: none; background: #1E1B16; color: #EDE9E0; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px; }

/* ---------- Order status ---------- */
.order-status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 16px; }
.status-pending { background: #F5E9D9; color: #A2672B; }
.status-completed { background: #E7F0EA; color: #3F6B52; }
.status-cancelled { background: #FBEAEA; color: #A23B3B; }
.payment-steps { background: #FAF6EC; border-radius: 8px; padding: 16px 18px; margin: 16px 0; }
.payment-steps ol { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.payment-steps li { margin-bottom: 6px; }
.payment-number { font-size: 20px; font-weight: 700; font-family: "Fraunces", serif; margin: 4px 0; }
.alert-error { background: #FBEAEA; color: #8E2E2E; border: 1px solid #EFCACA; padding: 11px 14px; border-radius: 7px; font-size: 13.5px; margin-bottom: 16px; }
.alert-note { background: #FAF6EC; color: #6E6A5F; padding: 11px 14px; border-radius: 7px; font-size: 13px; margin-top: 14px; }

.shop-footer { text-align: center; padding: 40px 20px; color: #A79F8C; font-size: 12.5px; }

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .cart-summary { max-width: none; }
}
