/*
Theme Name: D Forriol
Theme URI: https://dforriol.art
Description: Child theme de Storefront para la tienda de obra original de Diego Forriol. Direccion visual "Nocturno" recreada a partir del handoff de Claude Design.
Author: Estudio D Forriol
Template: storefront
Version: 1.0.0
Text Domain: dforriol
*/

/* ===========================================================================
   D FORRIOL -- sistema visual (direccion NOCTURNO, fijada como unica direccion)
   Portado desde styles.css del prototipo Claude Design.
=========================================================================== */

:root {
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --display: 'Big Shoulders Display', 'Hanken Grotesk', sans-serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --maxw: 1280px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* NOCTURNO */
  --bg: #161719;
  --bg-2: #1b1d1f;
  --surface: #1f2225;
  --surface-2: #25292c;
  --ink: #e9e6df;
  --ink-soft: #b6b4ac;
  --muted: #8b8d86;
  --line: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .07);
  --accent: #5d95a8;
  --accent-soft: rgba(93, 149, 168, .16);
  --on-accent: #16181a;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
  --shadow-soft: 0 20px 50px -30px rgba(0, 0, 0, .65);
  --sold: #c9633f;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: .88;
  text-transform: uppercase;
}
p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 14px 26px; border: none; border-radius: 0;
  background: var(--ink); color: var(--bg);
  transition: transform .4s var(--ease), background .3s, opacity .3s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); color: var(--bg); }
.btn:active { transform: translateY(0); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .4; pointer-events: none; }

.link-underline { position: relative; font-size: 13px; font-weight: 600; letter-spacing: .04em; padding-bottom: 3px; display: inline-block; cursor: pointer; }
.link-underline::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(1); transform-origin: left; transition: transform .5s var(--ease); }
.link-underline:hover::after { transform: scaleX(0); transform-origin: right; }

.art-ph { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--surface-2); }
.art-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-ph__tag {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.78); background: rgba(20,22,20,.34);
  padding: 3px 7px; border-radius: 2px; backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.art-ph:hover .art-ph__tag { opacity: 1; }

.card { cursor: pointer; text-decoration: none; display: block; color: inherit; }
.card__frame { position: relative; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-soft); transition: box-shadow .5s var(--ease), transform .5s var(--ease); aspect-ratio: 4 / 5; }
.card__frame.ratio-wide { aspect-ratio: 5 / 4; }
.card:hover .card__frame { box-shadow: var(--shadow); transform: translateY(-4px); }
.card__img { position: absolute; inset: 0; transition: transform 1.4s var(--ease); }
.card:hover .card__img { transform: scale(1.04); }

.badge { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.badge.sold { background: var(--sold); color: #fff; }
.badge.avail { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); }

.card__meta { padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.card__title { font-size: 21px; line-height: 1.12; letter-spacing: -.01em; font-style: italic; display: flex; gap: 10px; align-items: baseline; }
.card__idx { font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.card__sub { font-size: 12.5px; margin-top: 3px; color: var(--muted); }
.card__price { font-size: 18px; white-space: nowrap; }
.card__price.sold { opacity: .45; }

.hdr { position: sticky; top: 0; z-index: 40; background: rgba(22, 23, 25, .82); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line-soft); transition: background .5s var(--ease); }
.hdr.scrolled { box-shadow: 0 1px 0 var(--line); }
.hdr__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.hdr__nav { display: flex; gap: 34px; }
.navlink { position: relative; font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--ink-soft); padding: 6px 0; transition: color .3s; white-space: nowrap; display: inline-block; }
.navlink:hover, .navlink.active { color: var(--ink); }
.navlink.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); }
.logo { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; display: flex; align-items: baseline; gap: 2px; }
.logo b { font-weight: 600; }
.logo .dot { color: var(--accent); }

.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--ink); transition: background .3s, border-color .3s; }
.icon-btn:hover { background: var(--surface-2); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; border-radius: 999px; }
.lang-toggle { display: flex; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); gap: 6px; }
.lang-toggle a { cursor: pointer; }
.lang-toggle a.active { color: var(--ink); font-weight: 700; }

.menu-btn { display: none; }
.mobile-nav { position: fixed; inset: 76px 0 0 0; z-index: 55; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 22px 30px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.mobile-nav.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-nav a { padding: 18px 2px; font-family: var(--serif); font-size: 24px; border-bottom: 1px solid var(--line); color: var(--ink); }

.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(440px, 92vw); background: var(--bg); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .5s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 26px; }
.drawer__foot { padding: 22px 26px; border-top: 1px solid var(--line); background: var(--bg-2); }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv, .rv.in { opacity: 1 !important; transform: none !important; transition: none !important; } }

@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.16); } }
.hero-photo img { animation: kenburns 24s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } }

.field, input.field, select.field, textarea.field { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-family: var(--sans); font-size: 14px; padding: 13px 15px; border-radius: 0; outline: none; transition: border-color .3s; }
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--muted); }
label.lbl { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }

.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.chip { font-size: 12.5px; font-weight: 500; letter-spacing: .02em; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); transition: all .3s var(--ease); white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.g-services { display: grid; grid-template-columns: repeat(3, 1fr); }
.g-newsletter { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.g-series-sample { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-series { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.g-teaser { display: grid; grid-template-columns: 1fr 1.05fr; gap: 70px; align-items: center; }
.g-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.g-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.g-product { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: start; }
.g-about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: end; }
.g-about-quote { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; }
.g-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.g-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g-footer { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }

@media (max-width: 1000px) {
  .hero-split { grid-template-columns: 1fr !important; }
  .hero-split > div:last-child { min-height: 320px !important; }
  .g-product { grid-template-columns: 1fr; gap: 40px; }
  .g-product > div:first-child { position: static !important; }
  .g-about-quote { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 22px; }
  .hdr__nav { display: none; }
  .menu-btn { display: grid; }
  .g3, .g-gallery, .g-related, .g-series-sample { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .g-services { grid-template-columns: 1fr; }
  .g-services > div { border-left: none !important; padding-left: 0 !important; border-top: 1px solid var(--line); padding-top: 30px; }
  .g-services > div:first-child { border-top: none; padding-top: 0; }
  .g-newsletter, .g-teaser, .g-about-hero, .g-contact { grid-template-columns: 1fr; gap: 34px; }
  .g-series { grid-template-columns: 1fr !important; gap: 30px; }
  .g-footer { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
}
@media (max-width: 560px) {
  .g3, .g-gallery, .g-related, .g-series-sample, .g-row2 { grid-template-columns: 1fr; }
  .g-footer { grid-template-columns: 1fr; }
  .wrap { padding: 0 18px; }
  .btn { padding: 13px 20px; font-size: 12.5px; }
  .hdr__inner { height: 66px; }
  .drawer { width: 100vw; }
}

/* Anular estilos por defecto de Storefront */
body.woocommerce-page #content, body.woocommerce-page #primary { padding: 0; margin: 0; width: 100%; max-width: none; float: none; }
.site-content .col-full { max-width: none; padding: 0; }
#secondary, .woocommerce-breadcrumb, .star-rating, .woocommerce-result-count, ul.products .star-rating { display: none !important; }
.woocommerce ul.products, .woocommerce-page ul.products { margin: 0; }

/* ===========================================================================
   Re-tema del CSS nucleo de WooCommerce (mini-carrito, carrito, checkout,
   formularios) para que hereden la paleta Nocturno sin tocar sus plantillas.
=========================================================================== */
.woocommerce, .woocommerce-page { color: var(--ink); font-family: var(--sans); }
.woocommerce a { color: var(--accent); }
.woocommerce table.shop_table, .woocommerce table.cart, .woocommerce-checkout table {
  border-color: var(--line); background: var(--surface); color: var(--ink);
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--line); }
.woocommerce ::placeholder { color: var(--muted); }

.woocommerce input[type="text"], .woocommerce input[type="email"], .woocommerce input[type="tel"],
.woocommerce input[type="number"], .woocommerce input[type="password"], .woocommerce select, .woocommerce textarea {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 13px 15px; border-radius: 0; font-family: var(--sans); font-size: 14px;
}
.woocommerce input[type="text"]:focus, .woocommerce input[type="email"]:focus, .woocommerce select:focus, .woocommerce textarea:focus {
  border-color: var(--accent); outline: none;
}
.woocommerce form .form-row label { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce-checkout #payment #place_order, .wc-proceed-to-checkout a.checkout-button {
  background: var(--accent) !important; color: var(--on-accent) !important;
  border: none !important; border-radius: 0 !important;
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 14px 26px !important; transition: transform .4s var(--ease);
}
.woocommerce a.button:hover, .woocommerce button.button:hover { transform: translateY(-2px); }

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
  background: var(--surface); border-top-color: var(--accent); color: var(--ink);
}

/* Mini-carrito nativo dentro del drawer -- ver header.php (#df-cart-body) */
#df-cart-body .widget_shopping_cart_content { display: flex; flex-direction: column; height: 100%; }
#df-cart-body .cart_list { list-style: none; margin: 0; padding: 0; }
#df-cart-body .cart_list li { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
#df-cart-body .cart_list li img { width: 60px; height: 74px; object-fit: cover; }
#df-cart-body .cart_list a.remove { color: var(--muted); }
#df-cart-body .total { font-family: var(--serif); font-size: 22px; padding: 18px 0; }
#df-cart-body .woocommerce-mini-cart__empty-message { padding: 60px 20px; text-align: center; color: var(--muted); }
#df-cart-body .woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 10px; }

/* Formulario de checkout: columnas al estilo g-checkout del prototipo */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .woocommerce-checkout .col2-set { grid-template-columns: 1fr; } }


/* Logotipo personalizado subido en Identidad del sitio (firma del artista) */
.logo--custom { display: flex; align-items: center; }
.logo--custom .custom-logo-link { display: block; }
.logo--custom img.custom-logo { max-height: 46px; width: auto; display: block; }
