/* =====================================================================
   Tienda Habitka — "Crea tu espacio"
   Blanco limpio, naranja tostado y café nogal. Títulos en Montserrat.
   ===================================================================== */
:root {
    --ink: #2f241d;
    --ink-soft: #6f6259;
    --orange: #d0652a;
    --orange-dark: #b35220;
    --brand: #b85c25;
    --walnut: #2b1f17;
    --cream: #faf7f3;
    --line: #e4dbd0;
    --radius: 10px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-link-color: var(--orange-dark);
    --bs-link-hover-color: var(--walnut);
}

body { background: #fff; color: var(--ink); }
h1, h2, h3, h4, .display-font { font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 700; letter-spacing: -.005em; }

/* ---------------- Botones ---------------- */
.btn-orange, .btn-wood {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    background: var(--orange); color: #fff; border: 0; border-radius: 6px;
    padding: .8rem 1.5rem; font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}
.btn-orange:hover, .btn-wood:hover { background: var(--orange-dark); color: #fff; }
.btn-orange:active, .btn-wood:active { transform: scale(.98); }
.btn-orange:disabled, .btn-wood:disabled { background: #c9bdb2; }
.btn-orange.btn-sm, .btn-wood.btn-sm { padding: .5rem 1rem; font-size: .75rem; }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border: 1.5px solid var(--ink); border-radius: 6px; padding: .7rem 1.4rem; font-weight: 600;
    color: var(--ink); background: transparent; text-decoration: none;
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
.btn-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.2rem; color: var(--ink); border: 0; background: none; text-decoration: none; }
.btn-icon:hover { background: var(--cream); color: var(--ink); }
.form-control, .form-select { border-color: var(--line); border-radius: 8px; padding: .65rem .85rem; }
.form-control:focus, .form-select:focus { border-color: #e2a27a; box-shadow: 0 0 0 .2rem rgba(208,101,42,.15); }
.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }

/* ---------------- Header ---------------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 1030; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(47,36,29,.04); }
.site-header nav { min-height: 78px; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; flex-shrink: 0; }
.brand-img { height: 62px; width: auto; display: block; }
.brand-img-sm { height: 38px; }
.footer-logo { height: 64px; width: auto; background: #fff; border-radius: 10px; padding: .5rem .8rem; }
.brand-word { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.7rem; color: var(--brand); letter-spacing: .02em; }
.brand-roof { position: relative; display: inline-block; }
.brand-roof svg { position: absolute; left: -10%; top: -.62em; width: 120%; height: .7em; fill: none; stroke: var(--brand); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.brand-tag { font-family: 'Montserrat', sans-serif; font-size: .58rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }
.small-brand { font-size: 1.3rem; }
.main-nav { list-style: none; margin: 0; padding: 0; gap: 1.6rem; }
.main-nav a {
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .78rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-soft); text-decoration: none; padding: .4rem 0;
    border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--orange); border-color: var(--orange); }
.btn-cart { position: relative; width: 42px; height: 42px; border-radius: 8px; background: var(--orange); color: #fff; display: inline-grid; place-items: center; font-size: 1.15rem; margin-left: .35rem; text-decoration: none; }
.btn-cart:hover { background: var(--orange-dark); color: #fff; }
.cart-dot { position: absolute; top: -6px; right: -6px; background: var(--walnut); color: #fff; font-size: .65rem; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.search-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 0 1rem; }
.search-row input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; outline: 0; }
.search-row input:focus { border-color: var(--orange); }
.mobile-nav li a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-family: 'Montserrat', sans-serif; font-weight: 600; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em; }
.mobile-nav li a.active { color: var(--orange); }

/* ---------------- Hero ---------------- */
.hero-full {
    position: relative; min-height: clamp(420px, 62vh, 620px); display: flex; align-items: center;
    background-size: cover; background-position: center; color: #fff;
}
.hero-full::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,20,14,.72) 0%, rgba(30,20,14,.45) 45%, rgba(30,20,14,.05) 80%); }
.hero-full .container-xl { position: relative; z-index: 1; }
.hero-full h1 {
    font-family: 'Montserrat', sans-serif; font-weight: 800; text-transform: uppercase;
    font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.08; max-width: 24ch; margin-bottom: 1.6rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.hero-full p { font-size: 1.05rem; max-width: 46ch; opacity: .92; margin-bottom: 1.8rem; }

/* ---------------- Secciones ---------------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--cream); }
.section-title { text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: 1.75rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.section-link { color: var(--orange); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--orange); font-family: 'Montserrat', sans-serif; }

/* Explora por habitación */
.room-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.room-tile {
    position: relative; display: grid; place-items: center; text-align: center; aspect-ratio: 16/7;
    border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; background: var(--walnut);
}
.room-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.room-tile::after { content: ''; position: absolute; inset: 0; background: rgba(30,20,14,.5); transition: background-color .25s ease; }
.room-tile span { position: relative; z-index: 1; font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; line-height: 1.25; padding: 0 .75rem; }
.room-tile small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .75rem; opacity: .85; margin-top: .2rem; }
.room-tile:hover img { transform: scale(1.06); }
.room-tile:hover::after { background: rgba(208,101,42,.55); }

/* ---------------- Tarjeta de producto ---------------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; }
.products.six { grid-template-columns: repeat(6, 1fr); }
.product-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem;
    display: flex; flex-direction: column; text-align: center; transition: box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover { box-shadow: 0 10px 28px rgba(47,36,29,.09); border-color: #d6c8b9; }
.product-card .img { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f6f3ef; position: relative; display: block; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease, transform .5s ease; }
.product-card .img img.alt { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .img img.alt { opacity: 1; }
.product-card .tag { position: absolute; top: .5rem; left: .5rem; background: var(--orange); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 4px; padding: .15rem .45rem; z-index: 1; }
.product-card .tag.out { background: var(--ink-soft); }
.product-card .name {
    font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; margin: .75rem 0 .3rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.product-card .name:hover { color: var(--orange-dark); }
.price { font-weight: 700; color: var(--ink); font-size: .95rem; }
.price s { font-weight: 400; color: var(--ink-soft); margin-left: .35rem; font-size: .78em; white-space: nowrap; }
.swatches { font-size: .72rem; color: var(--ink-soft); min-height: 1.1em; margin: .15rem 0 .6rem; }
.product-card form { margin-top: auto; }
.btn-card {
    display: block; width: 100%; margin-top: auto; background: #f1ebe4; color: var(--ink); border: 0; border-radius: 6px;
    padding: .5rem .5rem; font-size: .78rem; font-weight: 600; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.btn-card:hover { background: var(--orange); color: #fff; }
.btn-card.disabled { opacity: .55; pointer-events: none; }

/* ---------------- Banner B2B ---------------- */
.b2b-banner { display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 12px; overflow: hidden; background: #f3eee8; border: 1px solid var(--line); }
.b2b-banner .b2b-img { min-height: 300px; background-size: cover; background-position: center; }
.b2b-banner .b2b-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.b2b-banner h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.b2b-banner p { color: var(--ink-soft); margin: .6rem 0 1.4rem; }

/* ---------------- Páginas internas ---------------- */
.page-hero { position: relative; padding: 4rem 0; background-size: cover; background-position: center; color: #fff; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(30,20,14,.6); }
.page-hero .container-xl { position: relative; }
.page-hero h1 { text-transform: uppercase; font-weight: 800; font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.page-hero p { max-width: 60ch; opacity: .9; margin: 0; }
.feature { text-align: center; padding: 1.5rem 1rem; }
.feature i { font-size: 2rem; color: var(--orange); }
.feature h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; margin: .75rem 0 .4rem; }
.feature p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* ---------------- Catálogo ---------------- */
.catalog-head { padding: 2.2rem 0 1rem; }
.catalog-head h1 { text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 100px; }
.filters h6 { font-family: 'Montserrat', sans-serif; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 1.1rem 0 .5rem; }
.filters h6:first-child { margin-top: 0; }
.filters a { display: flex; justify-content: space-between; color: var(--ink); text-decoration: none; padding: .28rem 0; font-size: .88rem; }
.filters a:hover { color: var(--orange-dark); }
.filters a.active { color: var(--orange); font-weight: 700; }
.pagination .page-link { color: var(--ink); border-color: var(--line); }
.pagination .active > .page-link { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---------------- Producto ---------------- */
.pdp { padding: 2rem 0 3rem; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #f6f3ef; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .6rem; overflow-x: auto; padding: .75rem 0; }
.gallery-thumbs button { flex: 0 0 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #fff; }
.gallery-thumbs button.active { border-color: var(--orange); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; }
.pdp .price-big { font-size: 1.8rem; font-weight: 700; color: var(--orange-dark); }
.pdp .price-big s { font-size: 1.1rem; color: var(--ink-soft); font-weight: 400; margin-left: .5rem; }
.variant-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.variant-opts input { display: none; }
.variant-opts label { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .45rem 1rem; font-size: .88rem; cursor: pointer; transition: border-color .15s ease; }
.variant-opts input:checked + label { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; font-weight: 600; }
.variant-opts input:disabled + label { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.qty button { border: 0; background: none; width: 40px; height: 46px; font-size: 1.1rem; }
.qty input { width: 44px; border: 0; text-align: center; font-weight: 600; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.5rem; }
.perks div { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; font-size: .78rem; text-align: center; }
.perks i { display: block; font-size: 1.3rem; color: var(--orange); margin-bottom: .2rem; }
.description { line-height: 1.7; }
.description img { max-width: 100%; height: auto; }

/* ---------------- Carrito / checkout / cuenta ---------------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.cart-line { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; background: #f6f3ef; }
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.summary-total { font-size: 1.25rem; font-weight: 700; border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .75rem; }
.pay-option { display: flex; gap: .8rem; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; cursor: pointer; background: #fff; }
.pay-option:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--orange); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--walnut); color: #e6d9cc; padding: 3.5rem 0 1.5rem; margin-top: 3.5rem; }
.site-footer h6 { color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: .9rem; }
.site-footer a:not(.btn-orange) { color: #e6d9cc; text-decoration: none; }
.site-footer a:not(.btn-orange):hover { color: #fff; }
.site-footer li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .8rem; opacity: .6; }
.wa-float { position: fixed; right: 1.4rem; bottom: 1.4rem; width: 54px; height: 54px; border-radius: 50%; background: #2b2b2b; color: #fff; display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 1040; text-decoration: none; transition: background-color .2s ease, transform .2s ease; }
.wa-float:hover { background: #25d366; color: #fff; transform: translateY(-2px); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1199.98px) {
    .products.six { grid-template-columns: repeat(3, 1fr); }
    .main-nav { gap: 1.1rem; }
}
@media (max-width: 991.98px) {
    .room-tiles { grid-template-columns: repeat(2, 1fr); }
    .b2b-banner { grid-template-columns: 1fr; }
    .b2b-banner .b2b-img { min-height: 220px; }
    .filters { position: static; }
}
@media (max-width: 575.98px) {
    .site-header nav { min-height: 66px; }
    .brand-img { height: 42px; }
    .products, .products.six { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
    .product-card { padding: .55rem; }
    .room-tiles { gap: .7rem; }
    .room-tile { aspect-ratio: 4/3; }
    .b2b-banner .b2b-body { padding: 1.5rem; }
    .perks { grid-template-columns: 1fr 1fr 1fr; }
    .hero-full::before { background: rgba(30,20,14,.6); }
}

/* Enlaces de texto dentro del contenido (breadcrumbs, avisos) */
main a:not([class]) { color: var(--orange-dark); text-decoration: none; }
main a:not([class]):hover { color: var(--walnut); text-decoration: underline; }
