:root {
    --color-arena: #d8c5a3;
    --color-crema: #f3ebdc;
    --color-marfil: #f8f4ec;
    --color-terracota: #8f4e35;
    --color-bronce: #a97c50;
    --color-rojo-oscuro: #5a1f1f;
    --color-pizarra: #2c2a27;
    --color-blanco: #ffffff;
    --shadow-soft: 0 10px 35px rgba(44, 42, 39, 0.12);
    --product-image-height: 240px;
    --navbar-height: 78px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--color-pizarra);
    background-color: var(--color-marfil);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
.logo,
.footer-brand {
    font-family: "Cinzel", serif;
    margin-top: 0;
    line-height: 1.2;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.section {
    padding: 5.5rem 0;
}

.section-heading {
    margin-bottom: 2rem;
    text-align: center;
}

.section-label {
    display: inline-block;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--color-terracota);
    font-size: 0.85rem;
}

.hero {
    position: relative;
    min-height: 92vh;
    color: var(--color-blanco);
    background: #1c1a18;
    overflow: hidden;
    padding-top: var(--navbar-height);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(120deg, rgba(18, 16, 14, 0.72), rgba(90, 31, 31, 0.32));
    pointer-events: none;
}

.hero-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 14px 14px;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 9998;
    background-color: rgba(248, 244, 236, 0.94);
    border-bottom: 1px solid rgba(44, 42, 39, 0.10);
    box-shadow: 0 6px 18px rgba(44, 42, 39, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(1120px, 92vw);
    margin: 0 auto;
    height: var(--navbar-height);
}

.logo {
    text-decoration: none;
    color: var(--color-pizarra);
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-pizarra);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-links a:hover {
    color: var(--color-arena);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(44, 42, 39, 0.25);
    background: transparent;
    color: var(--color-pizarra);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: calc(92vh - 78px);
    display: grid;
    align-content: center;
    max-width: 700px;
    gap: 0.9rem;
}

.hero-kicker {
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin: 0;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.2rem);
    letter-spacing: 0.16em;
}

.hero-subtitle {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.hero-text {
    font-size: 1.05rem;
    max-width: 60ch;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 0.82rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-bronce), var(--color-terracota));
    color: var(--color-marfil);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background: #ddd4c4;
    color: #5d554a;
    cursor: not-allowed;
}

.products {
    background: linear-gradient(180deg, #f6f0e4, #f8f4ec);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--color-blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(169, 124, 80, 0.25);
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: var(--product-image-height);
    object-fit: cover;
}

.product-info {
    padding: 1rem;
    display: grid;
    gap: 0.6rem;
}

.product-info h3 {
    margin: 0;
    font-size: 1.05rem;
}

.product-info p {
    margin: 0;
    color: #4d4941;
    font-size: 0.95rem;
}

.product-price {
    font-weight: 700;
    color: var(--color-rojo-oscuro);
}

/* Separador solo cuando el botón va debajo de una ficha manual (.product-info). */
.product-info .shopify-button-placeholder {
    border-top: 1px dashed rgba(90, 31, 31, 0.4);
    padding-top: 0.8rem;
}

/* En tarjetas que son solo Shopify, sin margen arriba. */
.product-card > .shopify-button-placeholder {
    border-top: none;
    padding-top: 0;
}

/* Buy Button dentro de la tarjeta: ancho completo, sin columnas de vitrina que desplazan la imagen (la foto va en .product-card > img). */
.product-card .shopify-button-placeholder .shopify-buy__product {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
}

.product-card .shopify-button-placeholder .shopify-buy__btn {
    width: 100%;
    box-sizing: border-box;
}

/* Imagen del producto dentro del embed de Shopify: mismo alto que el resto. */
.product-card .shopify-buy__product-img-wrapper {
    display: block !important;
    width: 100%;
    max-width: 100% !important;
    height: var(--product-image-height);
    padding-bottom: 0 !important;
    overflow: hidden;
}

.product-card .shopify-buy__product-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.product-card .shopify-buy__product-img,
.product-card .shopify-buy__product-img img {
    width: 100% !important;
    max-width: 100% !important;
}

/* El Buy Button suele renderizar en iframe: forzar ancho completo del contenedor. */
.product-card .shopify-buy-frame,
.product-card .shopify-buy-frame iframe,
.product-card .shopify-button-placeholder > iframe {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}

/* Zoom ligero solo en la primera tarjeta. */
#product-component-1776346772786 .shopify-buy__product-img-wrapper img {
    transform: scale(1.08);
    transform-origin: center center;
}

.handmade {
    background: linear-gradient(120deg, #e8d8c0, #efe4d2 55%, #f6eee2);
}

.handmade-content,
.about-content {
    text-align: center;
    max-width: 780px;
}

.about {
    background-color: var(--color-marfil);
}

.footer {
    background: #1f1c18;
    color: #f1e8d8;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.footer-brand-block p {
    margin: 0.6rem 0 0;
}

.footer-logo-wrap {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    display: inline-flex;
    align-items: center;
}

.footer-logo-img {
    height: 34px;
    width: auto;
    display: block;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d4c7b4;
    text-decoration: none;
}

.footer-link-button {
    color: #d4c7b4;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-link-button:hover {
    color: #ffffff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 10, 0.62);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 9999;
}

.modal-overlay.open {
    display: flex;
}

.modal-panel {
    width: min(860px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fbf6ed;
    border: 1px solid rgba(169, 124, 80, 0.35);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: 1.2rem 1.2rem 1.4rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    border: 1px solid rgba(90, 31, 31, 0.25);
    border-radius: 8px;
    background: #f0e4d3;
    color: var(--color-rojo-oscuro);
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.modal-content h3,
.modal-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.4rem;
}

.modal-content p,
.modal-content ul {
    margin-top: 0;
    color: #453f37;
}

.modal-content ul {
    padding-left: 1.2rem;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 10000;
    background: #211d19;
    color: #f1e8d8;
    border: 1px solid rgba(216, 197, 163, 0.35);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.94rem;
    color: #e9dcc8;
}

.cookie-policy-link {
    border: none;
    background: none;
    color: #f3d9b4;
    text-decoration: underline;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.cookie-policy-link:hover {
    color: #ffffff;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cookie-banner .btn-secondary {
    background: #4a443c;
    color: #f3ebdc;
    cursor: pointer;
}

.cookie-banner .btn-secondary:hover {
    transform: translateY(-1px);
}

.cookie-banner.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: none;
    }

    .hero-content {
        padding-bottom: 3.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-banner .btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .section {
        padding: 4.2rem 0;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}
