/*
Theme Name: Yuya MX
Theme URI: https://yuyaficial.shop
Description: Replica theme for Yuya Tienda Oficial (Mexico, es-MX, MXN).
Author: internal
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: yuya-mx
*/

:root{
  --ink:#080A1C;
  --body:#6B6C77;
  --rose:#C77E7A;
  --cream:#FDF8F2;
  --sale:#E92020;
  --line:#ececec;
  --pad:60px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Poppins,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:14px;
  line-height:1.6;
  color:var(--body);
  background:#fff;
}
h1,h2,h3,h4{font-family:Poppins,sans-serif;color:var(--ink);font-weight:400;margin:0 0 .4em}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}

/* announcement */
.announce{background:var(--ink);color:#fff;font-size:12px;text-align:center;padding:9px 16px;letter-spacing:.02em}

/* header */
.site-header{border-bottom:1px solid var(--line)}
.header-main{display:flex;align-items:center;justify-content:space-between;gap:24px;max-width:1440px;margin:0 auto;padding:16px var(--pad)}
.logo img{height:54px;width:auto}
.main-nav ul{display:flex;gap:26px;list-style:none;margin:0;padding:0}
.main-nav a{font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--body)}
.main-nav a:hover{color:var(--rose)}
.header-icons{display:flex;gap:16px;align-items:center}
.header-icons a{display:inline-flex;width:22px;height:22px}
.header-icons svg{width:20px;height:20px;fill:none;stroke:var(--ink);stroke-width:1.4}

/* hero */
.hero{max-width:1440px;margin:0 auto;padding:18px var(--pad) 10px}
.hero-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:10px}
.hero-grid .cell{overflow:hidden;border-radius:2px;background:#f5f2ee}
.hero-grid .cell img{width:100%;height:100%;object-fit:cover}
.hero-grid .cell.tall{grid-row:span 2}
.hero-grid .stack{display:grid;gap:10px}

/* generic section */
.section{max-width:1440px;margin:0 auto;padding:34px var(--pad)}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.section-head h2{font-size:17px;letter-spacing:.01em}
.section-head .more{font-size:12px;color:var(--body);border-bottom:1px solid var(--body);padding-bottom:1px}

/* collections */
.coll-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.coll-card{position:relative;display:block;overflow:hidden;border-radius:2px}
.coll-card img{width:100%;aspect-ratio:4/3;object-fit:cover}
.coll-card span{position:absolute;left:0;right:0;bottom:0;background:rgba(255,255,255,.88);padding:8px 12px;font-size:12px;color:var(--ink);letter-spacing:.04em}

/* woocommerce product rows */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product{margin:0;text-align:left;width:auto!important;float:none!important}
.woocommerce ul.products li.product a img{width:100%;aspect-ratio:1/1;object-fit:cover;margin:0 0 10px;border-radius:2px}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:12.5px;color:var(--ink);font-weight:400;padding:0;margin:0 0 6px;line-height:1.4}
.woocommerce ul.products li.product .price{font-size:12.5px;color:var(--body)}
.woocommerce ul.products li.product .price del{opacity:.55;margin-right:6px;font-size:11.5px}
.woocommerce ul.products li.product .price ins{text-decoration:none;color:var(--ink)}
.woocommerce ul.products li.product .button{margin-top:8px;font-size:11px;padding:6px 14px;background:var(--ink);color:#fff;border-radius:3px}

/* testimonials */
.testi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.testi{font-size:12.5px;color:var(--body)}
.testi .stars{color:var(--rose);letter-spacing:2px;font-size:12px;margin-bottom:6px}
.testi .who{margin-top:8px;color:var(--ink);font-size:12px}

/* newsletter */
.newsletter{background:var(--cream);display:grid;grid-template-columns:1fr 1fr}
.newsletter .copy{padding:56px var(--pad)}
.newsletter h2{font-size:16px}
.newsletter p{font-size:12.5px;margin:0 0 18px}
.newsletter form{display:flex;gap:8px}
.newsletter input{flex:1;border:1px solid #ddd;background:#fff;padding:11px 14px;font-size:13px;border-radius:2px}
.newsletter button{background:var(--ink);color:#fff;border:0;padding:11px 22px;font-size:13px;border-radius:3px;cursor:pointer}

/* footer */
.site-footer{border-top:1px solid var(--line);margin-top:40px;padding:44px var(--pad) 26px}
.footer-grid{max-width:1440px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.footer-grid h4{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);margin-bottom:12px}
.footer-grid ul{list-style:none;margin:0;padding:0}
.footer-grid li{font-size:12px;margin-bottom:7px}
.footer-grid a:hover{color:var(--rose)}
.footer-bottom{max-width:1440px;margin:34px auto 0;padding-top:16px;border-top:1px solid var(--line);font-size:11px;color:#9a9a9a;display:flex;justify-content:space-between}

@media (max-width:900px){
  :root{--pad:20px}
  .hero-grid{grid-template-columns:1fr}
  .hero-grid .cell.tall{grid-row:auto}
  .coll-grid,.testi-grid,.footer-grid{grid-template-columns:1fr}
  .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr))}
  .newsletter{grid-template-columns:1fr}
  .main-nav{display:none}
}
/* hero v2 + promo block */
.hero-grid{grid-template-columns:1.15fr 1fr 1fr;align-items:stretch}
.hero-right{display:grid;grid-template-rows:1fr 1fr;gap:10px}
.hero-right .promo{background:#6d1a22;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:18px;gap:4px;border-radius:2px}
.hero-right .promo .kicker{font-size:11px;letter-spacing:.18em;text-transform:uppercase;opacity:.85}
.hero-right .promo .big{font-family:"Bodoni Moda",serif;font-size:32px;line-height:1.05}
.hero-right .promo .small{font-size:11px;opacity:.9;max-width:80%}

/* hero v3：左大图 + 中图，各占满两行；右列上下两块 */
@media (min-width: 901px) {
  .hero { height: 520px; }
  .hero-grid { height: 520px; grid-template-rows: 1fr; }
  .hero-grid > .cell { height: 100%; }
  .hero-right { height: 100%; }
}
.hero-grid > .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-grid > .cell { overflow: hidden; }
@media (max-width: 900px) {
  .hero { height: auto; }
  .hero-grid { height: auto; grid-template-rows: auto; }
  .hero-grid > .cell { height: auto; aspect-ratio: 16 / 10; }
  .hero-right { height: auto; }
  .hero-right .promo { aspect-ratio: 16 / 10; }
}

/* hero v4：显式两行三列，左/中各跨两行，右列上下两块 */
@media (min-width: 901px) {
  .hero { height: 520px; overflow: hidden; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 520px;
    align-items: stretch;
  }
  .hero-grid > .cell:first-child { grid-row: 1 / span 2; grid-column: 1; }
  .hero-grid > .cell:nth-child(2) { grid-row: 1 / span 2; grid-column: 2; }
  .hero-grid > .hero-right { grid-row: 1 / span 2; grid-column: 3; }
  .hero-grid > .cell, .hero-grid > .hero-right { height: 100%; min-height: 0; }
}
.hero-grid > .cell { overflow: hidden; border-radius: 2px; background: #f5f2ee; }
.hero-grid > .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-right { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.hero-right .promo { border-radius: 2px; min-height: 0; }

/* hero v5：两列，左大图 + 右列上下两块（对齐源站） */
@media (min-width: 901px) {
  .hero { height: 520px; overflow: hidden; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.95fr 1fr;
    grid-template-rows: 1fr;
    gap: 10px;
    height: 520px;
  }
  .hero-grid > .cell { grid-row: 1; grid-column: 1; height: 100%; min-height: 0; }
  .hero-grid > .hero-right { grid-row: 1; grid-column: 2; height: 100%; min-height: 0; }
}
.hero-right { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.hero-right .cell { overflow: hidden; border-radius: 2px; background: #f5f2ee; }
.hero-right .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .hero { height: auto; }
  .hero-grid { display: grid; grid-template-columns: 1fr; gap: 10px; height: auto; }
  .hero-grid > .cell { aspect-ratio: 16 / 10; }
  .hero-right { grid-template-rows: auto auto; }
  .hero-right .cell { aspect-ratio: 16 / 10; }
}

/* 促销角标 + 评价卡 + 商品卡间距（对齐源站观感） */
.woocommerce ul.products li.product { position: relative; padding: 0 0 6px; }
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  position: absolute; top: 8px; left: 8px; right: auto;
  min-height: 0; min-width: 0; height: auto; width: auto;
  background: #F2C230; color: #080A1C; border-radius: 2px;
  font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; line-height: 1.2; margin: 0; z-index: 2;
}
.woocommerce ul.products li.product img { border-radius: 2px; }
.woocommerce ul.products li.product .price { margin-top: 2px; }
.testi-grid { gap: 18px; }
.testi { background: #fff; border: 1px solid #f1ebe5; border-radius: 3px; padding: 20px 20px 16px; font-size: 12.5px; line-height: 1.75; }
.testi .stars { color: #C77E7A; font-size: 13px; letter-spacing: 3px; margin-bottom: 10px; }
.testi p { margin: 0; }
.testi .who { margin-top: 12px; font-size: 12px; color: #080A1C; letter-spacing: .04em; }

/* 容器留白：内容页、商品页、购物车/结账页两侧留白（主题根 padding 为 0 导致贴边） */
main { padding-left: var(--pad); padding-right: var(--pad); }
main > .wp-block-group { margin-left: auto; margin-right: auto; }
.wp-block-post-content { max-width: 1280px; margin-left: auto; margin-right: auto; }
.wp-block-post-title { max-width: 1280px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) {
  main { padding-left: 20px; padding-right: 20px; }
}
/* 商品页/购物车页里的全宽块不要被 main 的 padding 挤到 */
.woocommerce .wp-block-woocommerce-cart, .woocommerce .wp-block-woocommerce-checkout { width: 100%; }

/* 容器统一：根内边距 60px（手机 20px），区块自身不再左右留白，避免叠加 */
.section { padding-left: 0; padding-right: 0; }
@media (max-width: 900px) {
  .has-global-padding { padding-left: 20px !important; padding-right: 20px !important; }
  .section { padding-left: 0; padding-right: 0; }
}

/* 内容外层统一留白（首页/页面没有 has-global-padding 的情况） */
.wp-block-post-content {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 60px;
  padding-right: 60px;
}
@media (max-width: 900px) {
  .wp-block-post-content { padding-left: 20px; padding-right: 20px; }
}

/* 外层已统一留白，区块内部不再重复左右 padding */
.hero { padding-left: 0; padding-right: 0; }
.newsletter .copy { padding-left: 0; padding-right: 0; }
.section { padding-left: 0; padding-right: 0; }

/* 归档/商店页容器留白 */
.archive-wrap { padding-left: 60px; padding-right: 60px; max-width: 1440px; margin: 0 auto; }
.archive-wrap ul.products { margin: 0; }
@media (max-width: 900px) {
  .archive-wrap { padding-left: 20px; padding-right: 20px; }
}

/* 商品页：放大主图、收紧间距 */
body.single-product .woocommerce-product-gallery,
body.single-product .wp-block-woocommerce-product-image-gallery { width: 100% !important; max-width: 100% !important; }
body.single-product .woocommerce-product-gallery__image img,
body.single-product .wp-block-woocommerce-product-image-gallery img { width: 100% !important; height: auto !important; }
body.single-product .woocommerce-product-gallery .flex-control-thumbs { display: flex; gap: 8px; margin-top: 10px; }
body.single-product .woocommerce-product-gallery .flex-control-thumbs li { width: 72px !important; }
body.single-product .wp-block-post-title { font-size: 26px; margin-bottom: 16px; }
body.single-product .woocommerce-Price-amount { font-size: 20px; color: #080A1C; }
body.single-product .summary, body.single-product .wp-block-group.woocommerce { gap: 28px; }

/* 公告条常驻顶部 */
.announce {
  position: sticky;
  top: 0;
  z-index: 1000;
}
@media (max-width: 900px) {
  .announce { font-size: 11.5px; padding: 7px 12px; }
}

/* 公告条常驻顶部（fixed + 动态高度占位）*/
.announce { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
body { padding-top: var(--announce-h, 38px); }

/* ============ 结账 / 购物车 品牌化 ============ */
.checkout-brand { text-align: center; padding: 26px 0 4px; }
.checkout-brand img { height: 62px; width: auto; margin: 0 auto; display: block; }
.checkout-title { text-align: center; font-size: 24px; letter-spacing: .02em; margin: 6px 0 34px; color: var(--ink); }

/* 两栏布局：左表单，右订单摘要 */
form.checkout { display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: start; }
form.checkout #customer_details { grid-column: 1; grid-row: 1; }
form.checkout #order_review_heading { grid-column: 2; grid-row: 1; margin-top: 0; }
form.checkout #order_review { grid-column: 2; grid-row: 2; }
form.checkout .woocommerce-NoticeGroup { grid-column: 1 / -1; }

#customer_details h3, #order_review_heading {
  font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid #ececec;
}

/* 表单字段 */
form.checkout .form-row { padding: 0 0 14px; margin: 0; }
form.checkout label { display: block; font-size: 12px; color: #6B6C77; letter-spacing: .02em; margin-bottom: 6px; }
form.checkout .input-text,
form.checkout select,
form.checkout textarea {
  width: 100%; padding: 12px 14px; font-size: 13.5px; color: var(--ink);
  border: 1px solid #e2e0dc; border-radius: 3px; background: #fff; box-sizing: border-box;
  transition: border-color .15s;
}
form.checkout .input-text:focus,
form.checkout select:focus,
form.checkout textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(199,126,122,.12); }
form.checkout .form-row-first, form.checkout .form-row-last { width: calc(50% - 7px); display: inline-block; }
form.checkout .form-row-first { margin-right: 12px; }
form.checkout select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236B6C77' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

/* 订单摘要 */
#order_review { background: #FDF8F2; border: 1px solid #efe7dd; border-radius: 4px; padding: 22px 24px; }
#order_review table.shop_table { border: 0; }
#order_review table.shop_table th, #order_review table.shop_table td { border: 0; padding: 10px 0; font-size: 13px; }
#order_review table.shop_table thead th { color: #6B6C77; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid #e8dfd3; }
#order_review tr.cart_item td { border-bottom: 1px solid #f2ece3; }
#order_review .order-total th, #order_review .order-total td { font-size: 16px; color: var(--ink); border-top: 1px solid #e8dfd3; padding-top: 14px; }
#order_review .fee td, #order_review .fee th { color: #9c6b66; }
#order_review .product-name { color: var(--ink); }

/* 支付区 */
#payment { background: transparent; }
#payment ul.payment_methods { border: 1px solid #ececec; border-radius: 3px; padding: 14px 16px; background: #fff; }
#payment ul.payment_methods li { margin: 0; }
#payment div.payment_box { background: #f7f4ef; border-radius: 3px; font-size: 12.5px; }
form.checkout #place_order {
  width: 100%; height: 50px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--ink); color: #fff; border: 0; border-radius: 3px; margin-top: 16px; cursor: pointer;
}
form.checkout #place_order:hover { background: #14172e; }

/* 优惠券已关闭，隐藏残留 */
form.checkout .coupon, .woocommerce-form-coupon-toggle { display: none !important; }

/* 购物车页 */
.cart-main .checkout-brand { padding-top: 22px; }
.woocommerce-cart .shop_table { border: 1px solid #ececec; border-radius: 3px; }
.woocommerce-cart .cart_totals h2 { font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { background: var(--ink); border-radius: 3px; font-size: 13.5px; }

@media (max-width: 900px) {
  form.checkout { grid-template-columns: 1fr; gap: 28px; }
  form.checkout #customer_details, form.checkout #order_review_heading, form.checkout #order_review { grid-column: 1; grid-row: auto; }
  .checkout-brand img { height: 48px; }
  .checkout-title { font-size: 20px; margin-bottom: 24px; }
  form.checkout .form-row-first, form.checkout .form-row-last { width: 100%; display: block; margin-right: 0; }
}

/* ===== 结账布局 v2（覆盖浮动结构） ===== */
form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; column-gap: 44px; align-items: start; }
form.checkout #customer_details { grid-column: 1; grid-row: 2; }
form.checkout #order_review_heading { grid-column: 2; grid-row: 2; margin: 0 0 12px; }
form.checkout #order_review { grid-column: 2; grid-row: 3; }
form.checkout .woocommerce-NoticeGroup,
form.checkout .woocommerce-NoticeGroup-checkout { grid-column: 1 / -1; }
.woocommerce-notices-wrapper { max-width: 1180px; margin: 0 auto 22px; }

#customer_details .col2-set { display: block !important; width: 100% !important; }
#customer_details .col-1,
#customer_details .col-2 { width: 100% !important; float: none !important; }
#customer_details .col-2 { margin-top: 18px; }

form.checkout .form-row { width: 100% !important; float: none !important; padding: 0 0 14px; }
form.checkout .form-row-first,
form.checkout .form-row-last { width: calc(50% - 7px) !important; display: inline-block; float: none !important; }
form.checkout .form-row-first { margin-right: 12px; }
form.checkout .input-text,
form.checkout select,
form.checkout textarea { width: 100% !important; max-width: 100%; }

#ship-to-different-address { margin: 0 0 16px; font-size: 13px; }
#ship-to-different-address label { display: inline; font-size: 13px; color: var(--ink); }

@media (max-width: 900px) {
  form.checkout { grid-template-columns: 1fr; }
  form.checkout #customer_details, form.checkout #order_review_heading, form.checkout #order_review { grid-column: 1; grid-row: auto; }
  form.checkout .form-row-first, form.checkout .form-row-last { width: 100% !important; margin-right: 0; }
}

/* ===== 结账布局 v3：右栏合并 + 去溢出 ===== */
form.checkout { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 40px; }
form.checkout #order_review_heading { display: none; }
form.checkout #order_review { grid-column: 2; grid-row: 2; margin: 0; }
form.checkout #order_review::before {
  content: "TU PEDIDO"; display: block; font-size: 15px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid #ececec;
}
form.checkout #customer_details { grid-row: 2; }
.woocommerce-notices-wrapper { margin-bottom: 18px; }
.checkout-main { overflow-x: clip; }
body.woocommerce-checkout, body.woocommerce-cart { overflow-x: hidden; }

/* 移动端：单列，取消固定宽度 */
@media (max-width: 900px) {
  form.checkout { grid-template-columns: 1fr; column-gap: 0; }
  form.checkout #customer_details { grid-column: 1; grid-row: auto; }
  form.checkout #order_review { grid-column: 1; grid-row: auto; width: 100%; max-width: 100%; }
  form.checkout #order_review::before { margin-top: 26px; }
}

/* 支付区：白底 + 边框；隐藏“寄往不同地址” */
#payment {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 4px;
  padding: 20px 22px;
}
#payment ul.payment_methods {
  border: 0;
  padding: 0;
  background: #ffffff;
  list-style: none;
  margin: 0 0 16px;
}
#payment ul.payment_methods li {
  padding: 10px 0;
  border-bottom: 1px solid #f4f1ec;
}
#payment ul.payment_methods li:last-child { border-bottom: 0; }
#payment ul.payment_methods li label { font-size: 13.5px; color: var(--ink); }
#payment div.payment_box {
  background: #fbf9f6;
  border: 1px solid #f0eae2;
  border-radius: 3px;
  color: #6B6C77;
  font-size: 12.5px;
  margin: 10px 0 0;
  padding: 14px 16px;
}
#payment div.payment_box::before { display: none; }

#ship-to-different-address,
#ship-to-different-address-checkbox,
.woocommerce-shipping-fields #ship-to-different-address { display: none !important; }

/* 支付区强制白底（覆盖 Woo 默认的紫色半透明底） */
body.woocommerce-checkout #payment,
body.woocommerce-checkout #payment ul.payment_methods,
body.woocommerce-checkout #payment .payment_box,
body.woocommerce-checkout #payment .wc-payment-method-title {
  background: #ffffff !important;
}
body.woocommerce-checkout #payment {
  border: 1px solid #ececec !important;
  border-radius: 4px !important;
  padding: 20px 22px !important;
}
body.woocommerce-checkout #payment div.payment_box {
  background: #fbf9f6 !important;
  border: 1px solid #f0eae2 !important;
  border-radius: 3px !important;
}
body.woocommerce-checkout #payment div.payment_box::before { display: none !important; }
body.woocommerce-checkout #payment ul.payment_methods li { border-bottom: 1px solid #f4f1ec; }
body.woocommerce-checkout #payment ul.payment_methods li:last-child { border-bottom: 0; }
