/* =============================================================
   MACONDO — TIENDA PÚBLICA
   Archivo: style_tienda.css
   Mobile-first: estilos base para móvil, luego desktop con @media
   
   Secciones:
   1.  Variables globales
   2.  Reset base
   3.  Navbar
   4.  Hero carrusel        (index.php)
   5.  Sección categorías   (index.php)
   6.  Catálogo             (catalogo.php)
   7.  Producto detalle     (producto.php) — clases con prefijo "det-"
   8.  Footer
============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Inter:wght@300;400;500&display=swap');


/* =============================================================
   1. VARIABLES GLOBALES
============================================================= */
:root {
    --beige:      #f2efe9;
    --brown:      #491F12;
    --green:      #4E5B47;
    --white:      #ffffff;
    --font-title: 'Playfair Display', serif;
    --font-body:  'Inter', sans-serif;
    --max-width:  1200px;
}


/* =============================================================
   2. RESET BASE
============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { background: var(--beige); font-family: var(--font-body); color: var(--brown); min-height: 100vh; display: flex; flex-direction: column; }
img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; }
main  { flex: 1; }


/* =============================================================
   3. NAVBAR — mobile first
============================================================= */
.navbar {
    background: var(--white);
    border-bottom: 1px solid rgba(73, 31, 18, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-logo img { height: 34px; width: auto; }

.navbar-links {
    display: none;
    align-items: center;
    gap: 2rem;
    flex: 1;
    margin-left: 2rem;
}

.navbar-links a {
    font-size: 0.875rem;
    opacity: 0.75;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active { opacity: 1; }

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--brown);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-wrapper { position: relative; }

.cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--brown);
    color: var(--white);
    font-size: 0.6rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cart-count.hidden { display: none; }

.lang-switch-desktop { display: none; gap: 0.5rem; font-size: 0.8rem; align-items: center; }
.lang-switch-desktop a { opacity: 0.55; transition: opacity 0.2s; }
.lang-switch-desktop a:hover { opacity: 0.85; }
.lang-switch-desktop a.active { opacity: 1; font-weight: 600; }

.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.25rem;
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brown);
    transition: all 0.3s ease;
}

.navbar-mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid rgba(73, 31, 18, 0.08);
    padding: 0.5rem 1.25rem 1rem;
}

.navbar-mobile-menu.open { display: flex; }

.navbar-mobile-menu a {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(73, 31, 18, 0.07);
    font-size: 0.95rem;
}

.navbar-mobile-menu a:last-of-type { border-bottom: none; }

.lang-switch-mobile { display: flex; gap: 1rem; padding: 0.75rem 0 0; font-size: 0.85rem; }
.lang-switch-mobile a { opacity: 0.55; }
.lang-switch-mobile a.active { opacity: 1; font-weight: 600; }

@media (min-width: 768px) {
    .burger-btn          { display: none; }
    .navbar-links        { display: flex; }
    .lang-switch-desktop { display: flex; }
    .navbar-inner        { height: 70px; padding: 0 2rem; }
    .navbar-logo img     { height: 40px; }
}


/* =============================================================
   4. HERO CARRUSEL — index.php
   
   Estrategia: contenedor con altura FIJA en vez de min-height.
   La imagen vive dentro de un wrapper con overflow:hidden y
   object-fit:cover para recortarse sin deformar el carrusel.
============================================================= */
.hero-carousel {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1.25rem;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    display: none;
    background: var(--brown);
    flex-direction: column;
    height: 420px;
}

.hero-slide.active { display: flex; }

.hero-slide-img-wrap {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    overflow: hidden;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-slide-img--empty {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
}

.hero-slide-content {
    padding: 1.75rem 1.5rem;
    color: var(--white);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero-slide-content h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.hero-slide-content p {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--white);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    transition: all 0.2s;
    align-self: flex-start;
}

.hero-btn:hover { background: var(--white); color: var(--brown); }

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0 1rem;
    background: var(--brown);
}

.hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-dot.active { background: var(--white); }

@media (min-width: 768px) {
    .hero-carousel { padding: 0 2rem; margin: 2.5rem auto; }
    .hero-slide { flex-direction: row; height: 460px; }
    .hero-slide-content { flex: 1; padding: 3rem 4rem; }
    .hero-slide-content h2 { font-size: 2rem; }
    .hero-slide-content p  { font-size: 0.95rem; }
    .hero-slide-img-wrap { width: 48%; height: 100%; order: 2; flex-shrink: 0; }
    .hero-dots { background: transparent; position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); padding: 0; }
}


/* =============================================================
   5. SECCIÓN CATEGORÍAS — index.php
============================================================= */
.categorias-home {
    max-width: var(--max-width);
    margin: 2rem auto 3rem;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.categoria-card {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    background: var(--brown);
}

.categoria-card-bg {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.categoria-card:hover .categoria-card-bg { transform: scale(1.03); opacity: 0.55; }

.categoria-card-content {
    position: relative;
    padding: 1.5rem;
    color: var(--white);
}

.categoria-card-content h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.categoria-card-content p {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.categoria-link {
    display: inline-block;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding-bottom: 2px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: opacity 0.2s;
}

.categoria-card:hover .categoria-link { opacity: 0.75; }

@media (min-width: 768px) {
    .categorias-home { grid-template-columns: 1fr 1fr; padding: 0 2rem; gap: 1.5rem; margin: 2.5rem auto 4rem; }
    .categoria-card  { min-height: 300px; }
    .categoria-card-content h3 { font-size: 1.4rem; }
}


/* =============================================================
   6. CATÁLOGO — catalogo.php
============================================================= */
.catalogo-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

/* Breadcrumb — compartido con producto.php */
.breadcrumb { font-size: 0.8rem; color: rgba(73,31,18,0.5); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(73,31,18,0.5); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--brown); }
.breadcrumb span { color: var(--brown); }

/* Título */
.catalogo-titulo { font-family: var(--font-title); font-size: 1.6rem; text-align: center; margin-bottom: 0.5rem; }
.catalogo-divider { border: none; border-top: 1px solid rgba(73,31,18,0.2); margin: 0.75rem auto 1.5rem; max-width: 600px; }

/* Círculos de países */
.paises-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.25rem; margin-bottom: 1.25rem; }
.pais-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; cursor: pointer; text-decoration: none; }

.pais-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: rgba(73,31,18,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pais-circle img { width: 100%; height: 100%; object-fit: cover; }
.pais-circle-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pais-circle-placeholder svg { width: 24px; height: 24px; stroke: rgba(73,31,18,0.35); fill: none; stroke-width: 1.5; }
.pais-item.active .pais-circle { border-color: var(--brown); }
.pais-item:hover .pais-circle  { border-color: rgba(73,31,18,0.4); }
.pais-nombre { font-size: 0.72rem; color: var(--brown); opacity: 0.7; text-align: center; }
.pais-item.active .pais-nombre { opacity: 1; font-weight: 500; }

/* Pills de cultura */
.culturas-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-bottom: 1.5rem; }

.cultura-pill {
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(73,31,18,0.25);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--brown);
    opacity: 0.7;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.cultura-pill:hover { opacity: 1; border-color: var(--brown); }
.cultura-pill.active { background: var(--brown); color: var(--white); opacity: 1; border-color: var(--brown); }

/* Barra de resultados */
.resultados-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.resultados-count { font-size: 0.85rem; opacity: 0.6; }

.orden-select {
    font-size: 0.8rem;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    border: 1px solid rgba(73,31,18,0.25);
    background: var(--white);
    color: var(--brown);
    font-family: var(--font-body);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23491F12' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

/* Grid de productos */
.productos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px)  { .productos-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .productos-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

/* Card producto — clases propias del catálogo, NO compartidas con producto.php */
.producto-card { background: var(--white); cursor: pointer; transition: opacity 0.2s; text-decoration: none; display: block; }
.producto-card:hover { opacity: 0.85; }
.producto-card.soldout { opacity: 0.55; pointer-events: none; }

.producto-foto {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: rgba(73,31,18,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-foto img { width: 100%; height: 100%; object-fit: contain; }
.producto-foto-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.producto-foto-placeholder svg { width: 36px; height: 36px; stroke: rgba(73,31,18,0.2); fill: none; stroke-width: 1; }

.badge-sold {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--brown);
    color: var(--white);
    font-size: 0.65rem;
    padding: 2px 7px;
    letter-spacing: 0.04em;
}

/* Clases de info de card — propias del catálogo */
.producto-info    { padding: 0.6rem 0.75rem 0.75rem; }
.producto-precio  { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.2rem; }
.producto-nombre  { font-size: 0.82rem; line-height: 1.3; margin-bottom: 0.2rem; }
.producto-meta    { font-size: 0.72rem; opacity: 0.55; }

.sin-resultados { text-align: center; padding: 3rem 1rem; opacity: 0.5; font-size: 0.95rem; }

@media (min-width: 768px) { .catalogo-wrap { padding: 2rem; } }


/* =============================================================
   7. PRODUCTO DETALLE — producto.php
   
   Todas las clases usan prefijo "det-" para no colisionar
   con las clases de las cards del catálogo (sección 6).
   Excepción: clases de galería, badges y botón carrito
   son únicas de esta página y no necesitan prefijo.
============================================================= */
.producto-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.producto-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .producto-wrap { padding: 2rem; }
    .producto-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* Galería */
.galeria-main {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(73,31,18,0.06);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0.75rem;
}

.galeria-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.galeria-soldout { opacity: 0.6; }

.galeria-sold-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--brown);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 10px;
    letter-spacing: 0.04em;
}

.galeria-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.galeria-placeholder svg { width: 48px; height: 48px; stroke: rgba(73,31,18,0.2); fill: none; stroke-width: 1; }

.galeria-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.galeria-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    background: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.galeria-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.galeria-thumb.active { border-color: var(--brown); }
.galeria-thumb:hover  { border-color: rgba(73,31,18,0.4); }

/* Info — prefijo det- para no colisionar con catálogo */
.det-producto-info { display: flex; flex-direction: column; gap: 0.75rem; }
.det-producto-meta { font-size: 0.8rem; color: rgba(73,31,18,0.6); }

.det-producto-nombre {
    font-family: var(--font-title);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 400;
}

.det-producto-precio { font-size: 1.4rem; font-weight: 500; }
.det-producto-precio--muted { opacity: 0.5; }
.det-producto-divider { border: none; border-top: 1px solid rgba(73,31,18,0.12); margin: 0.25rem 0; }

/* Badges */
.producto-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 4px 10px;
    letter-spacing: 0.03em;
}

.producto-badge--unica {
    background: var(--beige);
    border: 1px solid var(--brown);
    color: var(--brown);
}

.producto-badge--soldout {
    background: var(--brown);
    color: var(--white);
}

/* Botón carrito */
.btn-carrito {
    width: 100%;
    padding: 0.85rem;
    background: var(--brown);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.02em;
}

.btn-carrito:hover { background: var(--green); }

.btn-carrito--disabled {
    background: rgba(73,31,18,0.2);
    color: rgba(73,31,18,0.4);
    cursor: not-allowed;
}

.btn-carrito--disabled:hover { background: rgba(73,31,18,0.2); }

.producto-soldout-msg { font-size: 0.8rem; color: rgba(73,31,18,0.55); text-align: center; }

/* Cantidad */
.producto-cantidad { display: flex; flex-direction: column; gap: 0.4rem; }

.cantidad-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(73,31,18,0.6);
}

.cantidad-wrap { display: flex; align-items: center; gap: 0.75rem; }

.cantidad-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid rgba(73,31,18,0.25);
    background: var(--white);
    color: var(--brown);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23491F12' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.cantidad-stock { font-size: 0.78rem; color: rgba(73,31,18,0.55); }

/* Secciones: descripción y dimensiones */
.det-producto-seccion { display: flex; flex-direction: column; gap: 0.5rem; }

.det-producto-seccion-titulo {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(73,31,18,0.55);
    font-weight: 500;
}

.det-producto-descripcion {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(73,31,18,0.8);
}

.det-producto-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

.det-producto-dim {
    background: var(--white);
    border: 1px solid rgba(73,31,18,0.1);
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.det-dim-label { font-size: 0.7rem; color: rgba(73,31,18,0.5); text-transform: uppercase; letter-spacing: 0.05em; }
.det-dim-val   { font-size: 0.9rem; font-weight: 500; }


/* =============================================================
   8. FOOTER
============================================================= */
footer {
    background: var(--beige);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-social { display: flex; gap: 30px; justify-content: center; align-items: center; }

.social-icon {
    width: 24px;
    height: 24px;
    fill: var(--brown);
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-icon:hover { opacity: 1; transform: scale(1.1); }

.footer-legal { display: flex; gap: 1rem; font-size: 0.72rem; opacity: 0.55; justify-content: center; }
.footer-legal a:hover { opacity: 1; }

@media (min-width: 768px) {
    footer { padding: 12px 30px; }
}

/* =============================================================
   CARRITO — carrito.php
============================================================= */
.carrito-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.carrito-titulo {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.carrito-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .carrito-wrap { padding: 2rem; }
    .carrito-grid { grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
}

/* Item del carrito */
.carrito-item {
    display: flex;
    gap: 0.75rem;
    background: var(--white);
    padding: 0.75rem;
    margin-bottom: 0.6rem;
    align-items: center;
}

.carrito-item-foto {
    width: 64px;
    height: 64px;
    background: rgba(73,31,18,0.06);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrito-item-foto img { width: 100%; height: 100%; object-fit: contain; }

.carrito-item-foto-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.carrito-item-foto-placeholder svg { width: 24px; height: 24px; stroke: rgba(73,31,18,0.2); fill: none; stroke-width: 1; }

.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-nombre { font-size: 0.875rem; font-weight: 500; margin-bottom: 2px; }
.carrito-item-meta { font-size: 0.72rem; color: rgba(73,31,18,0.5); margin-bottom: 4px; }

.carrito-item-qty { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: rgba(73,31,18,0.7); }

.carrito-item-qty select {
    font-size: 0.8rem;
    padding: 2px 6px;
    border: 1px solid rgba(73,31,18,0.25);
    background: var(--white);
    color: var(--brown);
    font-family: var(--font-body);
}

.carrito-badge-unica {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    padding: 2px 6px;
    background: var(--beige);
    border: 1px solid var(--brown);
    color: var(--brown);
}

.carrito-item-subtotal {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
}

.carrito-item-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(73,31,18,0.4);
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.carrito-item-eliminar:hover { color: #a00; }

/* Resumen */
.carrito-resumen {
    background: var(--white);
    padding: 1.25rem;
}

.carrito-resumen-titulo {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(73,31,18,0.55);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.carrito-resumen-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.carrito-resumen-total {
    font-size: 1rem;
    font-weight: 500;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(73,31,18,0.12);
    margin-top: 0.5rem;
}

.carrito-resumen-nota {
    font-size: 0.72rem;
    color: rgba(73,31,18,0.5);
    line-height: 1.5;
    margin: 0.6rem 0 0.9rem;
}

.btn-checkout {
    width: 100%;
    padding: 0.85rem;
    background: var(--brown);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover { background: var(--green); }

.link-seguir-comprando {
    display: block;
    text-align: center;
    font-size: 0.78rem;
    color: var(--green);
    margin-top: 0.6rem;
    text-decoration: underline;
}

/* Carrito vacío */
.carrito-vacio {
    text-align: center;
    padding: 3.5rem 1rem;
}

.carrito-vacio-icon {
    width: 48px;
    height: 48px;
    stroke: rgba(73,31,18,0.2);
    fill: none;
    stroke-width: 1.2;
    margin-bottom: 0.75rem;
}

.carrito-vacio-titulo {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
}

.carrito-vacio-texto {
    font-size: 0.85rem;
    color: rgba(73,31,18,0.55);
    margin-bottom: 1.25rem;
}

.btn-explorar-carrito {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: var(--brown);
    color: var(--white);
    border: none;
    font-size: 0.85rem;
    text-decoration: none;
}

/* =============================================================
   10. CHECKOUT — checkout.php
============================================================= */
.checkout-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.checkout-titulo {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .checkout-wrap { padding: 2rem; }
    .checkout-grid { grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
}

/* Form boxes — reutiliza patrón del admin pero estilos propios de tienda */
.checkout-wrap .form-box {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.checkout-wrap .form-box h3 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--brown);
}

.checkout-wrap label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(73,31,18,0.65);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.checkout-wrap input,
.checkout-wrap select,
.checkout-wrap textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(73,31,18,0.2);
    background: var(--beige);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--brown);
    margin-bottom: 0.4rem;
    outline: none;
    transition: border-color 0.2s;
}

.checkout-wrap input:focus,
.checkout-wrap select:focus,
.checkout-wrap textarea:focus {
    border-color: var(--brown);
}

.checkout-wrap input.campo-invalido {
    border-color: #a00;
    background: #fdf3f2;
}

.campo-error {
    display: block;
    font-size: 0.72rem;
    color: #a00;
    margin-bottom: 0.6rem;
    min-height: 1em;
}

.checkout-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Sugerencias de autocompletado de dirección */
.direccion-sugerencias {
    position: relative;
    margin-top: -0.3rem;
    margin-bottom: 0.4rem;
}

.sugerencia-item {
    background: var(--white);
    border: 1px solid rgba(73,31,18,0.15);
    border-top: none;
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
}

.sugerencia-item:hover { background: var(--beige); }

/* Tarjetas de tipo de entrega */
.entrega-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.entrega-card {
    border: 1.5px solid rgba(73,31,18,0.15);
    padding: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.entrega-card:hover { border-color: rgba(73,31,18,0.4); }
.entrega-card.selected { border-color: var(--brown); background: var(--beige); }

.entrega-card-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.2rem; }
.entrega-card-desc  { font-size: 0.72rem; color: rgba(73,31,18,0.55); }

.checkout-retiro-info {
    font-size: 0.85rem;
    color: rgba(73,31,18,0.7);
    margin-bottom: 0.75rem;
}

/* Aviso de pieza grande — contactar */
.checkout-aviso-contacto {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    background: #fef9e7;
    border-left: 3px solid #856404;
    padding: 0.85rem;
    margin: 0.75rem 0;
}

.checkout-aviso-icon {
    background: #856404;
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-style: normal;
    flex-shrink: 0;
}

.checkout-aviso-contacto p {
    font-size: 0.8rem;
    color: #6b5108;
    line-height: 1.5;
}

.checkout-aviso-contacto a {
    color: #491F12;
    text-decoration: underline;
    font-weight: 500;
}

/* Resumen lateral */
.checkout-resumen-box {
    background: var(--white);
    padding: 1.25rem;
}

.checkout-resumen-titulo {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(73,31,18,0.55);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.checkout-resumen-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(73,31,18,0.75);
    margin-bottom: 0.4rem;
}

.checkout-resumen-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.checkout-resumen-total {
    font-size: 1.05rem;
    font-weight: 500;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(73,31,18,0.12);
    margin-top: 0.5rem;
}

.btn-pagar {
    width: 100%;
    padding: 0.85rem;
    background: var(--brown);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.6rem;
}

.btn-pagar:hover:not(:disabled) { background: var(--green); }
.btn-pagar:disabled { background: rgba(73,31,18,0.2); color: rgba(73,31,18,0.4); cursor: not-allowed; }

.checkout-lock-note {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(73,31,18,0.45);
    margin-top: 0.6rem;
}

.checkout-lock-note .fa-cc-stripe {
    font-size: 1.3em;
    vertical-align: middle;
}