/*
Theme Name: Papel y Cristal
Theme URI: https://papelycristal.com/
Description: Tema hijo de Purple para Papel y Cristal (vajilla hecha a mano). Estética editorial inspirada en tiendas de moda minimalistas: tipografía Jost, etiquetas en mayúsculas, botones rectos y mucho aire. Pensado para funcionar junto al plugin PapelCristalPRO.
Author: Papel y Cristal
Template: purple
Version: 1.0.3
Requires at least: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: papelycristal
*/

/* ---------- Base ---------- */
:root {
	--pyc-line: color-mix(in srgb, var(--wp--preset--color--theme-2) 12%, transparent);
	--pyc-ease: cubic-bezier(.2, .7, .2, 1);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--wp--preset--color--nude); color: var(--wp--preset--color--theme-2); }

/* Etiqueta pequeña en mayúsculas (sobre títulos) */
.pyc-label,
.is-style-pyc-etiqueta {
	font-size: .75rem !important;
	font-weight: 500 !important;
	letter-spacing: .22em !important;
	text-transform: uppercase;
}

/* ---------- Cabecera ---------- */
header.wp-block-template-part:has(.pyc-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part:has(.pyc-header) { top: var(--wp-admin--admin-bar--height, 32px); }
.pyc-header { border-bottom: 1px solid var(--pyc-line); background: var(--wp--preset--color--theme-1); }
.pyc-header .wp-block-site-title { white-space: nowrap; }
.pyc-header .wp-block-site-title a { text-decoration: none; }
.pyc-header .wp-block-navigation-item__content { white-space: nowrap; }

/* Iconos de la derecha: búsqueda, cuenta y carrito con el mismo aspecto */
.pyc-header .wp-block-search__button {
	background: transparent !important; color: var(--wp--preset--color--theme-2) !important;
	border: 0 !important; padding: .35rem !important; margin: 0 !important;
}
.pyc-header .wp-block-search__button svg { width: 22px; height: 22px; fill: currentColor; }
.pyc-header .wp-block-search__input { border: 0; border-bottom: 1px solid var(--wp--preset--color--theme-2); background: transparent; font-size: .9rem; }
.pyc-header .wc-block-mini-cart__button,
.pyc-header .wc-block-customer-account a { color: var(--wp--preset--color--theme-2); }
.pyc-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--theme-3) !important; color: #fff !important; }
.pyc-header .wp-block-navigation { font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.pyc-header .wp-block-navigation-item__content { padding-block: .4rem; position: relative; }
.pyc-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .35s var(--pyc-ease);
}
.pyc-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after { right: 0; }
.pyc-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--pyc-line) !important; padding: .75rem 0 !important; min-width: 230px !important;
	box-shadow: 0 18px 40px -20px rgba(46, 37, 41, .25);
}
.pyc-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .45rem 1.25rem !important; letter-spacing: .08em; text-transform: none; font-size: .875rem; font-weight: 400; }
.pyc-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--theme-3); }

@media (max-width: 1099px) {
	.pyc-header__nav-desktop { display: none !important; }
	.pyc-header .wp-block-site-title { font-size: 1.05rem !important; letter-spacing: .22em !important; }
}
@media (min-width: 1100px) {
	.pyc-header__nav-mobile { display: none !important; }
}

/* ---------- Botones ---------- */
.wp-element-button,
.wp-block-button__link { transition: background-color .25s var(--pyc-ease), color .25s var(--pyc-ease), border-color .25s var(--pyc-ease); }

/* ---------- Tarjetas de producto (bloques WooCommerce) ---------- */
.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img { transition: transform .8s var(--pyc-ease); }
.wc-block-product:hover .wc-block-components-product-image img,
.wc-block-product:hover .wp-block-woocommerce-product-image img { transform: scale(1.04); }
.wc-block-components-product-image,
.wp-block-woocommerce-product-image { overflow: hidden; }
.wc-block-product .wp-block-post-title,
.wc-block-product .wp-block-post-title a { font-weight: 400 !important; letter-spacing: .02em; text-transform: none; }

/* Insignia de oferta */
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--theme-3) !important; color: var(--wp--preset--color--theme-1) !important;
	border: 0 !important; border-radius: 0 !important; font-size: .7rem !important; letter-spacing: .15em; text-transform: uppercase; padding: .35rem .6rem !important;
}

/* ---------- Pie ---------- */
.pyc-footer a { text-decoration: none; }
.pyc-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.pyc-footer .pyc-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.pyc-footer h2 { font-size: .8rem !important; letter-spacing: .2em !important; }

/* ---------- Accesibilidad ---------- */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--wp--preset--color--theme-3); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Móvil: que quepan logo e iconos en 360–400 px */
@media (max-width: 480px) {
	.pyc-header .wp-block-site-title { font-size: .9rem !important; letter-spacing: .14em !important; }
	.pyc-header .wc-block-customer-account { display: none; }
	.pyc-aviso { font-size: .62rem; letter-spacing: .14em; }
}
