:root {
  --gold: #c9a24b;
  --gold-dark: #a8842f;
  --ink: #1c1a17;
  --muted: #8a8378;
  --cream: #faf7f2;
  --line: #eae3d8;
  --white: #ffffff;
  --green: #25d366;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(28, 26, 23, .08);
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }

.container { width: min(1200px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border: 1px solid var(--ink); background: var(--white);
  color: var(--ink); border-radius: 999px; cursor: pointer; font-family: var(--font-body);
  font-size: .95rem; letter-spacing: .02em; transition: all .2s ease; text-align: center;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-whatsapp { background: var(--green); border-color: var(--green); color: #fff; }
.btn-whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.btn-lg { padding: .95rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.link-more { color: var(--gold-dark); font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.link-more:hover { text-decoration: underline; }
.link-danger { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 1.1rem; }

/* ---------- Alertas ---------- */
.alert { padding: .9rem 1.2rem; border-radius: var(--radius); margin: 1rem 0; font-size: .95rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: #eaf7ee; color: #1e7a3f; }
.alert-error { background: #fdecea; color: #b3261e; }
.alert-warning { background: #fef6e0; color: #8a6d1c; }

/* ---------- Topbar ---------- */
.topbar { background: var(--ink); color: #f4efe6; font-size: .8rem; letter-spacing: .06em; }
.topbar-inner { display: flex; justify-content: space-between; padding: .5rem 0; }
.topbar-item a { color: #f4efe6; }
.topbar-item a:hover { color: var(--gold); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.2rem; padding: .9rem 0; }
.logo { font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.logo img { max-height: 46px; width: auto; }
.main-nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: .92rem; }
.main-nav a { position: relative; padding: .3rem 0; letter-spacing: .02em; }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--gold); transition: width .25s; }
.main-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: .8rem; }
.search-form { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--cream); }
.search-form input { border: none; background: transparent; padding: .5rem .9rem; font-family: var(--font-body); outline: none; width: 150px; }
.search-form button { border: none; background: transparent; padding: 0 .8rem; cursor: pointer; font-size: 1.1rem; color: var(--gold-dark); }
.search-form-lg { max-width: 520px; margin-top: 1rem; }
.search-form-lg input { width: 100%; }
.search-form-lg button { background: var(--gold); color: #fff; padding: .7rem 1.4rem; border-radius: 999px; }
.cart-btn { position: relative; font-size: 1.3rem; background: none; border: none; cursor: pointer; }
.cart-count { position: absolute; top: -6px; right: -10px; background: var(--gold); color: #fff; font-size: .68rem; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; font-family: var(--font-body); }
.icon-btn { background: none; border: none; cursor: pointer; }
.nav-toggle { display: none; font-size: 1.5rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, #1c1a17 0%, #3a352c 100%); color: #f6f1e7; text-align: center; padding: clamp(4rem, 10vw, 8rem) 0; position: relative; overflow: hidden; }
.hero::after { content: '✦'; position: absolute; font-size: 14rem; color: rgba(201,162,75,.08); top: -2rem; right: 2%; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-eyebrow { letter-spacing: .25em; text-transform: uppercase; font-size: .78rem; color: var(--gold); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); margin: .6rem 0; }
.hero-text { color: #d8d0c2; max-width: 540px; margin: 0 auto 1.8rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Secciones ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--cream); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }

/* ---------- Categorias ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.cat-card { display: block; text-align: center; }
.cat-img { display: block; aspect-ratio: 1; border-radius: var(--radius); background-size: cover; background-position: center; background-color: var(--cream); margin-bottom: .7rem; }
.cat-img-empty { display: grid; place-items: center; font-size: 2rem; color: var(--gold); }
.cat-card:hover .cat-img { opacity: .9; }
.cat-name { font-family: var(--font-head); font-size: 1.1rem; }

/* ---------- Grid productos ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.6rem; }
.product-card { display: flex; flex-direction: column; }
.product-thumb { position: relative; display: block; aspect-ratio: 4/5; background: var(--cream); border-radius: var(--radius); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.badge { position: absolute; top: .7rem; left: .7rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; color: #fff; }
.badge-oferta { background: #c0392b; }
.badge-agotado { background: #444; top: auto; bottom: .7rem; }
.product-body { padding: .9rem .2rem 0; display: flex; flex-direction: column; flex: 1; }
.product-name { font-size: 1rem; font-family: var(--font-body); font-weight: 500; margin: 0 0 .3rem; }
.product-meta { color: var(--muted); font-size: .8rem; margin: 0 0 .5rem; }
.product-price { margin-bottom: .7rem; }
.price-old { color: var(--muted); text-decoration: line-through; margin-right: .5rem; font-size: .9rem; }
.price-now { color: var(--gold-dark); font-weight: 600; font-size: 1.1rem; }
.product-add { margin-top: auto; }
.product-add .btn { width: 100%; }

/* ---------- Features ---------- */
.features { background: var(--ink); color: #f4efe6; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; text-align: center; }
.feature-icon { font-size: 1.6rem; color: var(--gold); display: block; margin-bottom: .5rem; }
.feature h4 { margin: 0 0 .3rem; color: #fff; }
.feature p { margin: 0; color: #c9c0b0; font-size: .9rem; }

/* ---------- Breadcrumb / page head ---------- */
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 1.2rem 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--gold-dark); }
.page-head { margin-bottom: 1.8rem; }
.page-head h1 { margin-bottom: .2rem; }
.page-content { max-width: 820px; line-height: 1.75; color: var(--ink); }
.page-content h2 { font-family: var(--font-head); font-size: 1.5rem; margin: 1.8rem 0 .6rem; }
.page-content h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.page-content p { margin: 0 0 1rem; color: #4a453c; }
.page-content ul, .page-content ol { margin: 0 0 1rem 1.3rem; }
.page-content li { margin: .3rem 0; }
.page-content a { color: var(--gold-dark); text-decoration: underline; }
.page-content strong { color: var(--ink); }
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 1.4rem; }
.toolbar-sort label { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
select, input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], textarea {
  font-family: var(--font-body); font-size: .95rem; padding: .6rem .8rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%; outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--gold); }

.pagination { display: flex; gap: .4rem; justify-content: center; margin: 2.5rem 0; }
.pagination a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; }
.pagination a.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.empty, .empty-block { color: var(--muted); text-align: center; padding: 3rem 0; }
.empty-block h1 { color: var(--ink); }

/* ---------- Detalle producto ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding-bottom: 2rem; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--cream); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--gold); }
.product-info h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.product-price-lg .price-now { font-size: 1.7rem; }
.stock { font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
.stock.in { color: #1e7a3f; }
.stock.out { color: #b3261e; }
.product-specs { list-style: none; padding: 1rem 0; margin: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .92rem; }
.product-specs li { padding: .25rem 0; }
.product-desc { color: #4a453d; margin-bottom: 1.3rem; }
.product-buy { display: flex; gap: 1rem; align-items: stretch; margin-bottom: 1rem; flex-wrap: wrap; }
.qty { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { background: var(--cream); border: none; width: 42px; cursor: pointer; font-size: 1.1rem; }
.qty input { border: none; width: 54px; text-align: center; border-radius: 0; }
.product-trust { list-style: none; padding: 0; margin: 1.4rem 0 0; color: var(--muted); font-size: .85rem; }
.product-trust li { padding: .2rem 0; }

/* ---------- Carrito ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: .9rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cart-img img { width: 70px; height: 85px; object-fit: cover; border-radius: 8px; }
.cart-name a { font-weight: 500; }
.cart-table input[type="number"] { width: 70px; }
.cart-subtotal { font-weight: 600; color: var(--gold-dark); }
.cart-actions { display: flex; gap: .8rem; margin-top: 1.2rem; }
.cart-summary { background: var(--cream); border-radius: var(--radius); padding: 1.6rem; position: sticky; top: 100px; }
.cart-summary h3 { margin-top: 0; }
.summary-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.summary-total { font-size: 1.2rem; font-weight: 600; border-bottom: none; margin-top: .4rem; }
.summary-items { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .88rem; }
.summary-items li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; color: #4a453d; }
.cart-summary .btn { margin-top: 1.2rem; }
.cart-summary .link-more { display: block; text-align: center; margin-top: 1rem; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.checkout-form, .contact-form { background: #fff; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; margin-bottom: .35rem; color: #4a453d; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Confirmacion ---------- */
.confirm { text-align: center; max-width: 720px; margin: 0 auto; padding: 2rem 0; }
.confirm-check { width: 72px; height: 72px; border-radius: 50%; background: #eaf7ee; color: #1e7a3f; font-size: 2.2rem; display: grid; place-items: center; margin: 0 auto 1rem; }
.confirm-table { margin: 1.8rem auto; max-width: 560px; text-align: left; }
.confirm .btn { margin: .5rem 0 1rem; }
.confirm-note { color: var(--gold-dark); font-weight: 500; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; }
.contact-info h2 { font-size: 1.5rem; }
.contact-info a { color: var(--gold-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c0b0; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-grid-4 { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.site-footer h3 { color: #fff; font-size: 1.4rem; }
.site-footer h4 { color: #fff; font-size: 1rem; letter-spacing: .04em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer a:hover { color: var(--gold); }
.social { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.social-link { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); color: #c9c0b0; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.social-link:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.social-icon { display: block; }
.social-whatsapp:hover { background: var(--green); border-color: var(--green); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; font-size: .82rem; }
.whatsapp-float { position: fixed; bottom: 20px; right: 20px; width: 54px; height: 54px; background: var(--green); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; box-shadow: var(--shadow); z-index: 60; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product-detail, .cart-layout, .checkout-layout, .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 80%); background: #fff; flex-direction: column; padding: 5rem 2rem; transform: translateX(100%); transition: transform .3s; box-shadow: var(--shadow); margin: 0; z-index: 55; }
  .main-nav.open { transform: translateX(0); }
  .search-form input { width: 100px; }
  .header-inner { gap: .6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { border-bottom: 1px solid var(--line); padding: .8rem 0; }
  .cart-table td { border: none; padding: .3rem 0; }
  .cart-img img { width: 100%; height: 220px; }
}
