/* product.css - CSS cho trang chi tiết sản phẩm (đặt trong thư mục Assets)
   Dùng chung biến màu --c-brown, --c-accent, --c-muted, --c-line từ collection.css */
:root {
  --c-brown: #4a2511;   /* chủ đạo: tiêu đề, nút */
  --c-accent: #d98a4e;  /* màu nhấn */
  --c-muted: #7a7a85;   /* chữ phụ */
  --c-line: #e8e2dc;    /* viền */
}
.product-page { padding-bottom: 40px; }
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-top: 28px; }
@media (max-width: 767px) { .product-detail { grid-template-columns: 1fr; gap: 24px; } }

/* ===== Thư viện ảnh ===== */
.pd-gallery .main-image { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; background: #f7f4f1; }
.pd-gallery .main-image img { width: 100%; height: 100%; object-fit: contain; }
.pd-gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.pd-gallery .thumbs button { flex: 0 0 72px; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #f7f4f1; cursor: pointer; }
.pd-gallery .thumbs button.active { border-color: var(--c-brown); }
.pd-gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Thông tin ===== */
.pd-info h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.3; color: var(--c-brown); }
.pd-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; color: var(--c-muted); font-size: 14px; }
.pd-meta b { color: var(--c-brown); font-weight: 600; }
.pd-price-box { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; padding: 14px 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.pd-price { font-size: 28px; font-weight: 700; color: #c0392b; }
.pd-price-old { color: #999; text-decoration: line-through; }
.pd-discount { padding: 2px 8px; border-radius: 4px; background: #c0392b; color: #fff; font-size: 13px; }
.pd-summary { margin-bottom: 20px; line-height: 1.7; color: #444; }

.pd-field { margin-bottom: 18px; }
.pd-field > label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--c-brown); }
.pd-field select { width: 100%; max-width: 360px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 8px; font-size: 15px; background: #fff; }

.pd-qty { display: inline-flex; border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; }
.pd-qty button { width: 42px; border: 0; background: #faf7f4; font-size: 20px; cursor: pointer; color: var(--c-brown); }
.pd-qty input { width: 56px; border: 0; text-align: center; font-size: 16px; -moz-appearance: textfield; }
.pd-qty input::-webkit-outer-spin-button, .pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pd-btn { flex: 1 1 180px; padding: 14px 20px; border-radius: 999px; border: 2px solid var(--c-brown); font-size: 16px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.pd-btn-outline { background: #fff; color: var(--c-brown); }
.pd-btn-solid { background: var(--c-brown); color: #fff; }
.pd-btn:hover { opacity: .85; }
.pd-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pd-message { margin-top: 12px; font-size: 14px; color: #2e7d32; min-height: 20px; }
.pd-message.error { color: #c0392b; }

/* ===== Mô tả chi tiết ===== */
.pd-tabs { margin-top: 48px; }
.pd-tabs .tab-heading { display: inline-block; margin: 0 0 18px; padding-bottom: 6px; font-size: 22px; text-transform: uppercase; color: var(--c-brown); border-bottom: 2px solid var(--c-brown); }
.pd-tabs .tab-content { line-height: 1.8; color: #333; }
.pd-tabs .tab-content img { max-width: 100%; height: auto; }

/* ===== Sản phẩm liên quan ===== */
.pd-related { margin-top: 56px; }
.pd-related h2 { margin: 0 0 20px; font-size: 22px; text-transform: uppercase; text-align: center; color: var(--c-brown); }