﻿/* ===========================================
   D'LORENS â€” TIENDA
   =========================================== */

.tHero{
  position: relative;
  padding: 132px 0 70px;
  color: rgba(255,255,255,.94);
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(201,139,77,.22), transparent 60%),
    radial-gradient(900px 520px at 100% 10%, rgba(139,90,43,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.7)),
    url('../shop/banners/9.webp') center/cover no-repeat,
    var(--coal);
  overflow: hidden;
}
.tHero::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(18,18,18,.45), rgba(18,18,18,.2));
}
.tHero__inner{
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.tCrumbs{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,.78);
}
.tCrumbs__a{
  color: rgba(255,255,255,.9);
  transition: opacity .2s var(--ease);
}
.tCrumbs__a:hover{ opacity: .8; }
.tCrumbs__sep{ opacity: .6; }
.tHero__title{
  margin: 18px 0 10px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.05;
}
.tHero__subtitle{
  margin: 0 0 24px;
  max-width: 640px;
  line-height: 1.6;
  color: rgba(255,255,255,.8);
}
.tHero__stats{
  display: flex;
  flex-wrap: wrap;
  column-gap: 26px;
  row-gap: 16px;
}

#tienda-page > .section{
  padding: clamp(44px, 5vw, 64px) 0 clamp(64px, 7vw, 88px);
}
.tStat{
  min-width: 118px;
  padding: 2px 18px 2px 14px;
  border-left: 1px solid rgba(255,255,255,.28);
  background: transparent;
  box-shadow: none;
  cursor: default;
}
.tStat__k{
  display: block;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}
.tStat__v{
  display: block;
  font-weight: 700;
  font-size: 20px;
  margin-top: 5px;
}

.tCatalogSearch{
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: -4px 0 24px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
}
.tCatalogSearch__label{
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(29,29,29,.68);
}
.tCatalogSearch__input{
  min-height: 52px;
  font-size: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
}

.tCatalog{
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 26px;
}
.tCatalog__summary{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  font-weight: 600;
}
.tFilters__panel{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
  display: grid;
  gap: 16px;
  position: sticky;
  top: 110px;
}
.tFilters__toggle{
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.tFilters__toggle svg{
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.tFilters__body{ min-width: 0; }
.tFilters__block{
  display: grid;
  gap: 8px;
}
.tFilters__block--range{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tFilters__label{
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .02em;
}
.tFilters__input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tFilters__input:focus{
  outline: none;
  border-color: rgba(139,90,43,.35);
  box-shadow: 0 0 0 2px rgba(201,139,77,.2);
}
.tFilters__clear{
  justify-self: flex-start;
}
.tFilters__actions{
  display: grid;
  gap: 9px;
  margin-top: 4px;
}
.tFilters__actions .btn{
  width: 100%;
  min-height: 46px;
}
.tFilters__actions span{
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.tCatalog__results{
  display: grid;
  gap: 18px;
}
.tCatalog__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}
.tCatalog__count{
  font-weight: 700;
}
.tCatalog__hint{
  color: var(--muted);
  font-size: 13px;
}

.tGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tCard{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.tCard.is-hidden{
  display: none !important;
}
.tCard:hover{
  transform: translateY(-4px);
  border-color: rgba(139,90,43,.25);
  box-shadow: 0 18px 40px rgba(0,0,0,.1);
}
.tCard__media{
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1;
}
.tCard__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .6s var(--ease2);
}
.tCard__media:hover img{ transform: scale(1.06); }

.tBadge{
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}
.tBadge--ok{
  background: rgba(201,139,77,.16);
  color: rgba(25,18,12,.9);
  border-color: rgba(201,139,77,.32);
}
.tBadge--low{
  background: rgba(255,197,61,.16);
  color: rgba(80,55,6,.9);
  border-color: rgba(255,197,61,.3);
}
.tBadge--out{
  background: rgba(20,20,20,.55);
  color: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.12);
}

.tCard__body{
  padding: 16px 18px 20px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.tCard__price{ margin-top: auto; }
.tCard__actions .btn{ flex: 1 1 128px; }
.tCard__meta{
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(29,29,29,.6);
}
.tCard__title{
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  line-height: 1.18;
}
.tCard__desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tCard__price{
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.tCard__price-main{
  font-weight: 700;
  font-size: 18px;
}
.tCard__price-compare{
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.tCard__actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tEmpty{
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 8px;
  padding: 28px;
  background: rgba(255,255,255,.7);
  border: 1px dashed var(--line);
  border-radius: var(--radius2);
  color: var(--muted);
}
.tEmpty.is-visible{
  display: flex;
}

@media (max-width: 1080px){
  .tCatalog{ grid-template-columns: 1fr; }
  .tFilters__panel{ position: static; }
  .tGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px){
  .tHero{ padding: 108px 0 48px; }
  .tHero__title{ margin-top: 12px; font-size: clamp(36px, 11vw, 48px); }
  .tHero__subtitle{ margin-bottom: 0; font-size: 15px; }
  #tienda-page > .section{ padding: 34px 0 56px; }
  .tHero__stats{ flex-direction: column; align-items: flex-start; }
  .tCatalogSearch{
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
    padding: 14px;
  }
  .tFilters__panel{
    gap: 0;
    padding: 16px 18px;
    border-radius: 18px;
  }
  .tFilters__toggle{ display: flex; }
  .tFilters__body{ display: none; padding-top: 18px; }
  .tFilters__panel.is-open .tFilters__body{ display: block; }
  .tFilters__panel.is-open .tFilters__toggle{ color: var(--brand); }
  .tFilters__block--range{ grid-template-columns: 1fr; }
  .tGrid{ grid-template-columns: 1fr; }
  .tCatalog__bar{ flex-direction: column; align-items: flex-start; }
  .tCatalog__bar .woocommerce-ordering,
  .tCatalog__bar .woocommerce-ordering select{ width: 100%; }
  .tCard__media{ aspect-ratio: 4 / 3; }
}

/* Portada: productos destacados en una composicion estable y limpia. */
body.home #destacados .container{
  width: min(1320px, calc(100% - 48px));
}
body.home #destacados .tGrid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
body.home #destacados .tCard{
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(38,28,20,.07);
}
body.home #destacados .tCard__media{
  aspect-ratio: 4 / 3;
  background: #f8f6f2;
}
body.home #destacados .tCard__media img{
  object-fit: contain;
  padding: 12px;
  transform: none;
}
body.home #destacados .tCard__media:hover img{ transform: scale(1.025); }
body.home #destacados .tCard__body{
  padding: 16px 16px 18px;
  gap: 9px;
}
body.home #destacados .tCard__title{
  min-height: 46px;
  font-size: 19px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.home #destacados .tCard__desc{ display: none; }
body.home #destacados .tCard__price{
  min-height: 29px;
  flex-wrap: wrap;
}
body.home #destacados .tCard__actions{
  display: grid;
  grid-template-columns: 1fr;
}
body.home #destacados .tCard__actions .btn{
  width: 100%;
  min-height: 42px;
}
body.home #destacados .tCard__actions .btn--ghost{ display: none; }

@media (max-width: 1180px){
  body.home #destacados .tGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px){
  body.home #destacados .container{ width: min(100% - 32px, 1320px); }
  body.home #destacados .tGrid{ grid-template-columns: 1fr; gap: 16px; }
  body.home #destacados .tCard__title{ min-height: 0; }
}
