/* Ruta: wp-content/themes/storefront-moldesintermextienda/assets/css/theme.css
   Responsabilidad: Estilos del home y componentes del child (requiere layout.css para variables). */


/* =========================
   HEADER CUSTOM
   ========================= */
header.smi-site-header,
.site-header.smi-site-header{
  background: linear-gradient(180deg, var(--choco-800), var(--choco-700)) !important;
  color: var(--text-inv);
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin: 0;
}

.smi-site-header .smi-header-inner{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 20px;
}

.smi-site-header .smi-brand__link{
  display:inline-flex !important;
  align-items:center;
  gap: 10px;
  text-decoration:none;
}

.smi-site-header .smi-brand__text{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 26px;
  letter-spacing: .4px;
  color: var(--text-inv);
}

.smi-site-header .smi-main-nav{ flex: 1; }

.smi-site-header .smi-nav{
  display:flex !important;
  gap: 18px;
  flex-wrap: wrap;
  justify-content:flex-end;
  list-style:none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.smi-site-header .smi-nav li{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.smi-site-header .smi-nav a{
  font-size: 13px;
  opacity: .92;
  color: var(--text-inv) !important;
  text-decoration:none;
}

.smi-site-header .smi-nav a:hover{ 
  opacity:1; 
  text-decoration: underline; 
}

.smi-site-header .smi-header-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}

.smi-site-header .smi-action-link{
  position: relative;
  width: 38px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  color: var(--text-inv);
  display:grid;
  place-items:center;
  text-decoration:none;
}

.smi-site-header .smi-action-link:hover{ 
  background: rgba(0,0,0,.28); 
}

.smi-site-header .smi-cart-count{
  position:absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold-500);
  color: #23160f;
  font-size: 11px;
  font-weight: 900;
  display:grid;
  place-items:center;
  padding: 0 4px;
}

/* Responsive header */
@media (max-width: 980px){
  .smi-site-header .smi-header-inner{ flex-wrap: wrap; }
  .smi-site-header .smi-main-nav{ width: 100%; }
  .smi-site-header .smi-nav{ justify-content:flex-start; }
}

/* =========================
   CONTAINER Y UTILIDADES
   ========================= */
.smi-container,
.container{
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.smi-section,
.section{ 
  padding: 26px 0; 
}

.smi-section-title,
.section-title{
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .8px;
  font-weight: 800;
  color: #2a2a2a;
}
.smi-section-title--left,
.section-title--left{ 
  margin: 0; 
}

.smi-btn,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--gold-500);
  color: #23160f;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.smi-btn:hover,
.btn:hover{ 
  filter: brightness(1.04); 
}

.smi-btn--ghost,
.btn--ghost{
  background: transparent;
  color: var(--text-inv);
  border: 1px solid rgba(255,255,255,.22);
}
.smi-btn--ghost:hover,
.btn--ghost:hover{ 
  background: rgba(0,0,0,.18); 
}

.smi-icon-btn,
.icon-btn{
  width: 38px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  color: var(--text-inv);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smi-icon-btn:hover,
.icon-btn:hover{ 
  background: rgba(0,0,0,.28); 
}

.smi-icon-btn--sm{
  width: 30px;
  height: 26px;
  border-radius: 5px;
  font-size: 14px;
}

/* =============== DIVIDER CON SVG =============== */
.drip{
  height: 150px;
  line-height: 0;
  overflow: hidden;
  background: transparent;
}

.custom-shape-divider{
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.custom-shape-divider svg{
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 150px;
}

.custom-shape-divider .shape-fill{
  fill: var(--mi-primary, #4A2C1F);
}

/* =============== HERO LEGACY (para compatibilidad) =============== */
.hero{
  position: relative;
  color: var(--text-inv);
  background: radial-gradient(90% 140% at 70% 30%, rgba(255,255,255,.10) 0%, transparent 55%),
              linear-gradient(180deg, var(--choco-700), var(--choco-900));
  overflow: hidden;
}

.hero-inner{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 30px;
  padding: 34px 0 30px;
  min-height: 300px;
}

.hero-left{
  flex: 1;
}

.hero-right{
  flex: 1;
}

.hero-kicker{
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .5px;
}

.hero-sub{
  margin: 0 0 16px;
  max-width: 520px;
  opacity: .9;
  font-size: 13px;
  line-height: 1.5;
}

.hero-actions{
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 44px;
}

.hero-controls{
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.hero-product{
  width: min(360px, 70vw);
  height: 220px;
  margin-left: auto;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  transition: background 0.5s ease;
}

.hero-product--placeholder{
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, .20), transparent 55%),
    radial-gradient(circle at 70% 45%, rgba(255, 255, 255, .14), transparent 50%),
    linear-gradient(135deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .05));
}

/* =============== HERO HEADER (antiguo) =============== */
.hero-header{
  padding: 24px 0;
  text-align: center;
  position: relative;
  min-height: 260px;
}

.hero-header__img{
  position: absolute;
  top: 0;
  right: 0;
  border-radius: 0;
  margin-top: -32px;
  margin-right: -32px;
  width: auto;
  height: 150%;
  max-height: 150%;
  object-fit: contain;
  z-index: 2;
}

/* =============== HERO =============== */
.smi-hero{
  position: relative;
  color: var(--text-inv);
  background: radial-gradient(90% 140% at 70% 30%, rgba(255,255,255,.10) 0%, transparent 55%),
              linear-gradient(180deg, var(--choco-700), var(--choco-900));
  overflow: hidden;
}

.smi-hero__inner{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 30px;
  padding: 34px 0 30px;
}

/* Cuando es slider: sin grid, sin padding, sin restricciones */
.smi-hero__inner[data-smi-hero-slider]{
  display: block !important;
  grid-template-columns: unset;
  gap: unset;
  padding: 0 !important;
}

.smi-hero__kicker{
  margin:0 0 10px;
  font-weight: 800;
  letter-spacing: .5px;
}

.smi-hero__sub{
  margin: 0 0 16px;
  max-width: 520px;
  opacity: .9;
  font-size: 13px;
  line-height: 1.5;
}

.smi-hero__media{
  width: min(360px, 70vw);
  height: 220px;
  margin-left: auto;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.smi-hero__media--placeholder{
  background:
    radial-gradient(circle at 25% 35%, rgba(255,255,255,.20), transparent 55%),
    radial-gradient(circle at 70% 45%, rgba(255,255,255,.14), transparent 50%),
    linear-gradient(135deg, rgba(0,0,0,.25), rgba(255,255,255,.05));
}

/* .smi-drip{
  height: 44px;
  background: #fff;
  clip-path: polygon(
    0 0, 100% 0, 100% 55%,
    95% 60%, 90% 45%, 85% 65%, 80% 50%,
    75% 70%, 70% 48%, 65% 67%, 60% 50%,
    55% 72%, 50% 52%, 45% 68%, 40% 50%,
    35% 70%, 30% 48%, 25% 65%, 20% 50%,
    15% 68%, 10% 46%, 5% 62%,
    0 55%
  );
} */

/* =============== SHIPPING =============== */
.smi-shipping,
.shipping{
	background: #fff;
	border-bottom: 1px solid #eee;
}
.smi-shipping__inner,
.shipping-inner{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	gap: 16px;
}
.smi-shipping__slider,
.shipping-slider{
	position: relative;
	overflow: hidden;
	flex: 1;
	height: 18px;
}
.smi-shipping__text,
.shipping-text{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	margin: 0;
	font-size: 12px;
	color: #2a2a2a;
	letter-spacing: .3px;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.smi-shipping__text.is-active,
.shipping-text.active{
	opacity: 1;
	transform: translateY(0);
}
.smi-shipping__controls,
.shipping-controls{
	display: flex;
	gap: 8px;
}

/* =============== CATEGORY GRID =============== */
.smi-category-grid,
.category-grid{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

/* Catalogo: centrar content-area */
.woocommerce-page .content-area,
.post-type-archive-product .content-area,
.tax-product_cat .content-area{
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Catalogo: grid de categorias como category-grid */
.smi-catalog-top-cats,
.smi-catalog-child-cats{
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.smi-catalog-top-cats .products,
.smi-catalog-child-cats .products{
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Eliminar clearfix de Storefront que rompe el grid */
.smi-catalog-top-cats .products::before,
.smi-catalog-top-cats .products::after,
.smi-catalog-child-cats .products::before,
.smi-catalog-child-cats .products::after{
	display: none !important;
	content: none !important;
}

/* Anular estilos de float de Storefront en items del grid */
.smi-catalog-top-cats li.product,
.smi-catalog-child-cats li.product{
	float: none !important;
	width: auto !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
	clear: none !important;
}

.smi-catalog-top-cats .product-category,
.smi-catalog-child-cats .product-category{
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
	background: #fff;
	min-height: 120px;
	position: relative;
}
.smi-catalog-top-cats .product-category a,
.smi-catalog-child-cats .product-category a{
	display: block;
	position: relative;
	text-decoration: none;
}
.smi-catalog-top-cats .product-category img,
.smi-catalog-child-cats .product-category img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.smi-catalog-top-cats .product-category h2,
.smi-catalog-child-cats .product-category h2{
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 12px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .3px;
	color: #fff;
	background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 1));
}

.smi-card,
.card{
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
	background: #fff;
	min-height: 120px;
	position: relative;
}

.smi-card--image,
.card--image{
	min-height: 130px;
}

.smi-card__overlay,
.card-overlay{
	position: absolute;
	inset: auto 0 0 0;
	padding: 12px;
	background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 1));
	color: #fff;
	z-index: 2;
}
.smi-card__title,
.card-title{
	margin: 0;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .3px;
	color: #fff;
}

.smi-card__title a,
.card-title a{
	color: #fff;
	text-decoration: none;
	font-weight: 800;
}

.smi-card--cta,
.card--cta{
	grid-column: 1 / span 1;
	min-height: 160px;
	background: linear-gradient(135deg, #0e0e0e, #3a1d14);
	position: relative;
	overflow: hidden;
}
.smi-card-cta,
.card-cta{ 
	padding: 16px; 
	color: var(--text-inv);
	position: relative;
	z-index: 2;
}
.smi-cta-kicker,
.cta-kicker{ margin:0 0 8px; font-weight: 900; letter-spacing: .3px; }
.smi-cta-sub,
.cta-sub{ margin:0 0 12px; font-size: 12px; opacity: .9; line-height: 1.4; }

.smi-card--wide,
.card--wide{
	min-height: 130px;
	grid-column: 2 / span 2;
}
.smi-card__bg,
.card-bg{
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	filter: saturate(1.05);
	z-index: 1;
}

/* Placeholders tipo foto */
.smi-card__bg--1,
.card-bg--1 {
	background-image: linear-gradient(135deg, #2b140e, #7a3f25);
}

.smi-card__bg--2,
.card-bg--2 {
	background-image: linear-gradient(135deg, #2a140e, #b07b2b);
}

.smi-card__bg--3,
.card-bg--3 {
	background-image: linear-gradient(135deg, #2a140e, #5b2d1c);
}

.smi-card__bg--placeholder,
.card-bg--placeholder{ background-image: linear-gradient(135deg, #b31b1b, #ff8a8a); }

/* =============== BANNER =============== */
.smi-banner,
.banner{
	color: var(--text-inv);
	background:
		linear-gradient(90deg, #1a0e0a 0%, rgba(26,14,10,0.85) 35%, rgba(26,14,10,0.0) 65%),
		url('');
	padding: 26px 0;
	position: relative;
	overflow: hidden;
	background-size: cover;
	background-position: right center;
	background-repeat: no-repeat;
	min-height: 220px;
}
.smi-banner__inner,
.banner-inner{
	padding: 10px 0;
	position: relative;
	z-index: 2;
}
.smi-banner__kicker,
.banner-kicker,
.smi-banner__title,
.banner-title,
.smi-banner__sub,
.banner-sub{
	color: #fff !important;
	text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.smi-banner__kicker,
.banner-kicker{ margin:0 0 8px; font-size: 11px; letter-spacing: .8px; opacity: .9; }
.smi-banner__title,
.banner-title{ margin:0 0 8px; font-size: 18px; font-weight: 900; letter-spacing: .6px; }
.smi-banner__sub,
.banner-sub{ margin:0 0 14px; font-size: 12px; opacity: .9; max-width: 520px; }

/* =============== PRODUCTS =============== */
.smi-product-grid,
.product-grid{
	display: grid;
	grid-template-columns: repeat(var(--columns, 4), 1fr);
	gap: 20px;
}
.smi-product,
.product{
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 10px;
	background: #fff;
	transition: transform 0.2s, box-shadow 0.2s;
	position: relative;
	display: flex;
	flex-direction: column;
}
.smi-product:hover,
.product:hover{
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.smi-product__thumb,
.product-thumb{
	height: 200px;
	border-radius: 10px;
	background: linear-gradient(135deg, #e8e8e8, #cfcfcf);
	margin-bottom: 10px;
	overflow: hidden;
	position: relative;
}
.smi-product__img,
.product-img,
.product-thumb img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.smi-product__title,
.product-title{
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	flex: 1;
}
.smi-product__title a,
.product-title a{ text-decoration:none; color: inherit; }
.smi-product__price,
.product-price{
	margin: 0 0 8px;
	font-size: 16px;
	color: var(--mi-accent, #C89B3C);
	font-weight: 800;
}
.smi-product__actions,
.product-actions{
	margin-top: auto;
}
.smi-product__actions .button,
.smi-product__actions .added_to_cart,
.product-actions .button,
.product-actions .added_to_cart{
	width: 100%;
	font-size: 12px;
	padding: 8px 12px;
}

/* Placeholders decorativos para producto */
.smi-product__thumb--placeholder,
.product-thumb--placeholder{
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f1e7db, #d2bfa8);
}

.smi-product__thumb--a,
.product-thumb--a {
	background: linear-gradient(135deg, #f1e7db, #d2bfa8);
}
.smi-product__thumb--b,
.product-thumb--b {
	background: linear-gradient(135deg, #cfe2ff, #3e6fb5);
}
.smi-product__thumb--c,
.product-thumb--c {
	background: linear-gradient(135deg, #f2f2f2, #bdbdbd);
}
.smi-product__thumb--d,
.product-thumb--d {
	background: linear-gradient(135deg, #ffdbdb, #b31b1b);
}
.smi-product__thumb--e,
.product-thumb--e {
	background: linear-gradient(135deg, #ffd4e6, #b90f4f);
}
.smi-product__thumb--f,
.product-thumb--f {
	background: linear-gradient(135deg, #f1e7db, #4a2418);
}
.smi-product__thumb--g,
.product-thumb--g {
	background: linear-gradient(135deg, #efe6d8, #8b5a3c);
}
.smi-product__thumb--h,
.product-thumb--h {
	background: linear-gradient(135deg, #e6e6e6, #2a140e);
}

/* =============== BRANDS =============== */
.smi-brands__inner,
.brands-inner{ display:flex; flex-direction: column; gap: 12px; }
.smi-brands__head,
.brands-head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.smi-brands__controls,
.brands-controls{
	display: flex;
	gap: 8px;
}
.smi-brand-row,
.brand-row{ display:flex; gap: 10px; flex-wrap: wrap; }
.smi-brand-pill,
.brand-pill{
	padding: 10px 12px;
	border-radius: 999px;
	border: 1px solid #eee;
	font-size: 12px;
	color: #2a2a2a;
	background: #fff;
}
.smi-brand-tiles,
.brand-tiles{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
.smi-brand-tile,
.tile{
	height: 120px;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
	background-size: 100% 100%;
	background-position: center;
	background-repeat: no-repeat;
}
.smi-brand-tile--1,
.tile--1 {
	background: linear-gradient(135deg, #3a1d14, #c89b3c);
}
.smi-brand-tile--2,
.tile--2 {
	background: linear-gradient(135deg, #2a140e, #ff8a8a);
}
.smi-brand-tile--3,
.tile--3 {
	background: linear-gradient(135deg, #2a140e, #6db2ff);
}

/* =============== TESTIMONIALS =============== */
.smi-testimonials,
.testimonials{ background: #fff; padding-bottom: 30px; }
.smi-testimonials__inner,
.testimonials-inner{ border-top: 1px solid #eee; padding-top: 22px; }
.smi-testimonials__stats,
.stats{
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
	margin: 8px 0 16px;
}
.smi-stat-value,
.stat-value{
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	color: #2a2a2a;
}
.smi-stat-label,
.stat-label{
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--muted);
}
.smi-quote,
.quote{
	display: flex;
	gap: 12px;
	align-items: flex-start;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 12px;
}
.smi-avatar,
.avatar{
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: linear-gradient(135deg, #d8d8d8, #a8a8a8);
	flex-shrink: 0;
	object-fit: cover;
}
.smi-quote__name,
.quote-name{ margin:0 0 4px; font-size: 12px; font-weight: 900; }
.smi-quote__text,
.quote-text{ margin:0; font-size: 12px; color: #4b4b4b; line-height: 1.45; }

/* =============== Responsive =============== */
@media (max-width: 980px){
	.hero-inner {
		grid-template-columns: 1fr;
	}
	.hero-product {
		margin: 10px 0 0;
	}
	.smi-hero__inner{ grid-template-columns: 1fr; }
	.smi-hero__media{ margin: 10px 0 0; }
	.smi-category-grid{ grid-template-columns: 1fr; }
  .smi-catalog-top-cats .products,
  .smi-catalog-child-cats .products{ grid-template-columns: 1fr; }
	.smi-card--wide{ grid-column: auto; }
	.smi-product-grid{ grid-template-columns: repeat(2, 1fr); }
	.smi-brand-tiles{ grid-template-columns: repeat(2, 1fr); }
	@media (max-width: 700px) {
		.smi-banner {
			background-position: center right;
			background-size: 120% auto;
		}
	}
}

@media (max-width: 600px){
	.hero-kicker {
		font-size: 14px;
	}
	.hero-sub {
		font-size: 12px;
	}
	.smi-product-grid{ grid-template-columns: 1fr; }
	.smi-category-grid{ grid-template-columns: 1fr; }
  .smi-catalog-top-cats .products,
  .smi-catalog-child-cats .products{ grid-template-columns: 1fr; }
	.smi-brand-tiles{ grid-template-columns: 1fr; }
}
