/* ============================================================
   Xuanzhen Ge · WooCommerce skin
   Loaded only on shop / product / cart / checkout / account pages.
   Keeps the black–gold–cinnabar palette of the replica storefront.
   ============================================================ */

.xzg-shop,
.xzg-page { padding: 150px 0 110px; min-height: 70vh; }
.xzg-shop .section-inner,
.xzg-page .section-inner { padding: 0 2rem; }
.xzg-shop .section-head,
.xzg-page .section-head { margin-bottom: 3rem; }

.xzg-shop-back { text-align: center; margin-top: 4rem; }
.xzg-shop-back a { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.22em; color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(207,171,104,0.35); padding-bottom: 0.4rem; }
.xzg-shop-back a:hover { color: var(--gold2); }

/* The replica stylesheet sets body font-size:22px — reset inside Woo areas. */
.woocommerce,
.xzg-page-content,
.xzg-shop-content { font-size: 16px; line-height: 1.65; color: var(--paper); }
.woocommerce p,
.xzg-page-content p,
.xzg-shop-content p { margin: 0 0 1.1rem; }
.woocommerce h1, .woocommerce h2, .woocommerce h3,
.xzg-page-content h1, .xzg-page-content h2, .xzg-page-content h3 { font-family: 'Cormorant Garamond', serif; font-weight: 300; letter-spacing: 0.04em; margin: 0 0 1rem; }
.woocommerce h2 { font-size: 2rem; }
.woocommerce h3 { font-size: 1.4rem; }
.woocommerce a,
.xzg-page-content a { color: var(--gold); }
.woocommerce a:hover { color: var(--gold2); }
.woocommerce ul,
.xzg-page-content ul { margin: 0 0 1.2rem 1.3rem; }
.woocommerce li { margin-bottom: 0.35rem; }

/* ---------- notices / breadcrumb / toolbar ---------- */
.woocommerce .woocommerce-breadcrumb { font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 2rem; }
.woocommerce .woocommerce-breadcrumb a { color: var(--gold); }
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.6rem; }
.woocommerce .woocommerce-ordering select { background: var(--ink2); color: var(--paper); border: 1px solid rgba(138,156,184,0.3); padding: 0.55rem 0.8rem; font-family: inherit; font-size: 0.9rem; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice { background: rgba(207,171,104,0.06) !important; border-top: 2px solid var(--gold) !important; color: var(--paper) !important; font-size: 0.92rem; padding: 1rem 1.2rem !important; margin-bottom: 1.5rem !important; }
.woocommerce-message::before,
.woocommerce-info::before { color: var(--gold) !important; }
.woocommerce-error { border-top-color: var(--red) !important; background: rgba(165,40,27,0.1) !important; }

/* ---------- product archive grid ---------- */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; align-items: start; gap: 2.2rem; width: 100%; clear: both; list-style: none; margin: 0 0 3rem; padding: 0; }
/* WooCommerce's float clearfix (ul.products::before / ::after) becomes a real
   grid item once the list is a grid and occupies the first cell — the first row
   then shows only two products. Remove them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { content: none !important; display: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { float: none; width: auto; margin: 0; padding: 0; background: var(--ink2); border: 1px solid rgba(138,156,184,0.16); transition: border-color 0.3s, transform 0.3s; }
.woocommerce ul.products li.product:hover { border-color: rgba(207,171,104,0.45); transform: translateY(-4px); }
.woocommerce ul.products li.product a { text-decoration: none; display: block; }
.woocommerce ul.products li.product a img,
.woocommerce a img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; display: block; margin: 0; box-shadow: none; border-bottom: 1px solid rgba(138,156,184,0.14); }
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale { background: var(--red) !important; color: var(--paper) !important; font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.12em; border-radius: 0; min-height: auto; line-height: 1; padding: 0.5rem 0.7rem; top: 0.8rem; left: 0.8rem; margin: 0; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; letter-spacing: 0.02em; padding: 1.2rem 1.2rem 0.4rem; color: var(--paper); }
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--gold); font-family: 'Cinzel', serif; font-size: 1rem; letter-spacing: 0.06em; padding: 0 1.2rem 1.1rem; margin: 0; display: block; }
.woocommerce ul.products li.product .price del,
.woocommerce div.product .price del { color: var(--muted2); }
.woocommerce ul.products li.product .price ins,
.woocommerce div.product .price ins { color: var(--gold2); text-decoration: none; }
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit { display: inline-block; width: calc(100% - 2.4rem); margin: 0 1.2rem 1.2rem; padding: 0.8rem 1rem; background: transparent; border: 1px solid rgba(138,156,184,0.35); color: var(--gold); font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 400; letter-spacing: 0.16em; text-align: center; border-radius: 0; cursor: pointer; transition: all 0.3s; }
.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.woocommerce ul.products li.product .added_to_cart { display: block; text-align: center; font-size: 0.78rem; margin: -0.6rem 1.2rem 1.2rem; }
.woocommerce .woocommerce-pagination { text-align: center; margin-top: 2rem; }
.woocommerce .woocommerce-pagination ul.page-numbers { border: 0; display: inline-flex; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.woocommerce .woocommerce-pagination .page-numbers { border: 1px solid rgba(138,156,184,0.3); padding: 0.5rem 0.85rem; color: var(--gold); font-size: 0.9rem; text-decoration: none; }
.woocommerce .woocommerce-pagination .page-numbers.current,
.woocommerce .woocommerce-pagination .page-numbers:hover { background: var(--red); border-color: var(--red); color: var(--paper); }

/* ---------- single product ---------- */
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; }
.woocommerce div.product .woocommerce-product-gallery { width: 100%; float: none; opacity: 1 !important; }
.woocommerce div.product .woocommerce-product-gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid rgba(138,156,184,0.18); }
.woocommerce div.product .summary { width: 100%; float: none; margin: 0; }
.woocommerce div.product .product_title { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 300; margin-bottom: 0.8rem; }
.woocommerce div.product .woocommerce-product-rating { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.2rem; }
.woocommerce div.product p.price { padding: 0; margin-bottom: 1.4rem; font-size: 1.35rem; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--muted); margin-bottom: 1.8rem; }
.woocommerce div.product form.cart { margin-bottom: 2rem; border: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.woocommerce div.product form.cart .quantity .qty { width: 4.5rem; text-align: center; }
.woocommerce div.product form.cart .button { width: auto; margin: 0; padding: 0.95rem 2rem; background: var(--red); border-color: var(--red); color: var(--paper); }
.woocommerce div.product form.cart .button:hover { background: var(--red2); border-color: var(--red2); }
.woocommerce div.product .product_meta { font-size: 0.82rem; color: var(--muted); border-top: 1px solid rgba(138,156,184,0.18); padding-top: 1.2rem; }
.woocommerce div.product .product_meta a { color: var(--gold); }
.woocommerce div.product .woocommerce-tabs { clear: both; }
.woocommerce div.product .woocommerce-tabs ul.tabs { border-bottom: 1px solid rgba(138,156,184,0.25); padding: 0; margin: 2.5rem 0 0; list-style: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: transparent; border: 0; margin: 0 2rem 0 0; padding: 0.6rem 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--gold); }
.woocommerce div.product .woocommerce-tabs .panel { margin: 0; padding: 1.8rem 0; }
.woocommerce table.shop_attributes { border: 1px solid rgba(138,156,184,0.18); border-collapse: collapse; width: 100%; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td { border: 0; border-bottom: 1px solid rgba(138,156,184,0.12); padding: 0.7rem 1rem; font-style: normal; background: transparent; }
.woocommerce table.shop_attributes th { color: var(--gold); width: 30%; }

/* ---------- forms / inputs ---------- */
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce .quantity .qty,
.xzg-page-content input[type="text"],
.xzg-page-content input[type="email"],
.xzg-page-content input[type="tel"],
.xzg-page-content input[type="password"],
.xzg-page-content textarea { background: var(--ink2); border: 1px solid rgba(138,156,184,0.3); color: var(--paper); padding: 0.7rem 0.9rem; font-family: inherit; font-size: 0.95rem; border-radius: 0; line-height: 1.4; }
.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce .quantity .qty:focus { outline: 1px solid var(--gold); }
.woocommerce label { color: var(--paper); font-size: 0.9rem; }
.woocommerce form .form-row { margin-bottom: 1.2rem; }
.woocommerce .required { color: var(--red2) !important; }

/* ---------- cart / checkout / my account ---------- */
.woocommerce table.shop_table,
.woocommerce table.my_account_orders { background: var(--ink2); border: 1px solid rgba(138,156,184,0.2); border-collapse: collapse; border-radius: 0; font-size: 0.92rem; }
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce table.my_account_orders th,
.woocommerce table.my_account_orders td { border: 0; border-bottom: 1px solid rgba(138,156,184,0.12); padding: 1rem 1.2rem; }
.woocommerce table.shop_table thead th { font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.14em; color: var(--gold); background: rgba(207,171,104,0.05); }
.woocommerce table.shop_table a { color: var(--gold); }
.woocommerce table.shop_table .product-thumbnail img { width: 72px; height: auto; border: 1px solid rgba(138,156,184,0.2); }
.woocommerce table.shop_table .product-name { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; }
.woocommerce .cart-collaterals .cart_totals,
.woocommerce .woocommerce-checkout-review-order { background: var(--ink2); border: 1px solid rgba(138,156,184,0.2); padding: 1.6rem; }
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 1.6rem; }
.woocommerce .cart_totals table { border: 0; }
.woocommerce .wc-proceed-to-checkout a.checkout-button { width: 100%; margin: 0; padding: 1rem; background: var(--red); border: 1px solid var(--red); color: var(--paper); font-family: 'Cinzel', serif; font-size: 0.78rem; letter-spacing: 0.16em; }
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover { background: var(--red2); }
.woocommerce #place_order { width: 100%; margin: 0; padding: 1rem; background: var(--red); border-color: var(--red); color: var(--paper); }
.woocommerce .woocommerce-checkout #payment { background: var(--ink2); border: 1px solid rgba(138,156,184,0.2); }
.woocommerce .woocommerce-checkout #payment div.payment_box { background: rgba(207,171,104,0.06); color: var(--paper); }
.woocommerce .woocommerce-checkout #payment div.payment_box::before { border-bottom-color: rgba(207,171,104,0.06); }
.woocommerce .woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid rgba(138,156,184,0.2); }
.woocommerce ul.woocommerce-order-overview { background: var(--ink2); border: 1px solid rgba(138,156,184,0.2); list-style: none; margin: 0 0 2rem; padding: 1.2rem 1.6rem; display: flex; flex-wrap: wrap; gap: 2rem; }
.woocommerce ul.woocommerce-order-overview li { margin: 0; }

/* ---------- generic pages (404, blog, search) ---------- */
.xzg-page-content article { max-width: 800px; margin: 0 auto; }
.xzg-page-content img { max-width: 100%; height: auto; }
.xzg-page-links { margin-top: 2rem; font-size: 0.9rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .woocommerce div.product { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .xzg-shop, .xzg-page { padding: 130px 0 80px; }
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td { padding: 0.7rem 0.6rem; }
}
