*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#f7efe7;color:#4b2b20;font-family:Arial,sans-serif;overflow-x:hidden}body.no-scroll{overflow:hidden}img{display:block;max-width:100%;height:auto}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}[hidden]{display:none!important}.announcement{background:#4b2b20;color:white;text-align:center;padding:10px}.header{position:sticky;top:0;z-index:1000;background:#fffaf5ee;border-bottom:1px solid #dfd1c7}.header-inner{max-width:1200px;margin:auto;padding:12px 18px;display:flex;align-items:center;gap:18px}.brand{display:flex;align-items:center;gap:10px;margin-right:auto}.brand img{width:54px;height:54px;border-radius:50%;object-fit:cover}.brand strong,h1,h2,h3{font-family:Georgia,serif}.brand small{display:block;color:#806a60}.nav{display:flex;gap:20px}.actions{display:flex;gap:8px;align-items:center}.btn{border:0;border-radius:999px;padding:11px 15px;font-weight:700;cursor:pointer}.primary{background:#4b2b20;color:white}.light{background:white;border:1px solid #dfd1c7}.count{background:#4b2b20;color:#fff;border-radius:50%;padding:3px 7px}.hero{max-width:1200px;margin:auto;padding:60px 18px;display:grid;grid-template-columns:1fr 1fr;gap:45px;align-items:center}.hero h1{font-size:clamp(50px,7vw,86px);line-height:.96;margin:10px 0 22px}.hero p{font-size:18px;line-height:1.7;color:#806a60}.hero-img{min-height:480px;border-radius:30px;background:#ead9cc;display:grid;place-items:center;overflow:hidden}.hero-img img{width:72%;height:auto;object-fit:contain}.section{max-width:1200px;margin:auto;padding:65px 18px}.section-head{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:28px}.section-head h2{font-size:44px;margin:6px 0}.search{min-width:min(420px,100%)}.search input{width:100%;padding:13px 16px;border:1px solid #dfd1c7;border-radius:999px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.product{background:white;border:1px solid #dfd1c7;border-radius:22px;overflow:hidden}.photo{aspect-ratio:1/1;background:#ead9cc;overflow:hidden}.photo img{width:100%;height:100%;object-fit:cover}.placeholder{width:100%;height:100%;display:grid;place-items:center;font-size:55px}.info{padding:18px}.info h3{font-size:25px;margin:8px 0}.info p{color:#806a60;line-height:1.5}.bottom{display:flex;justify-content:space-between;align-items:center;gap:8px}.story{background:#4b2b20;color:white;border-radius:28px;padding:38px}.footer{background:#351d15;color:white;text-align:center;padding:35px}.overlay{position:fixed;inset:0;background:#20120d88;z-index:1900}.drawer{position:fixed;right:0;top:0;bottom:0;width:min(440px,100%);background:white;z-index:2000;transform:translateX(105%);transition:.3s;display:flex;flex-direction:column}.drawer.open{transform:translateX(0)}.drawer-head,.drawer-foot{padding:20px;border-bottom:1px solid #eee}.drawer-foot{border-top:1px solid #eee;border-bottom:0}.drawer-body{padding:20px;overflow:auto;flex:1}.close{border:0;background:none;font-size:28px;cursor:pointer}.cart-line{display:grid;grid-template-columns:64px 1fr auto;gap:12px;padding:14px 0;border-bottom:1px solid #eee}.cart-line img{width:64px;height:64px;object-fit:cover;border-radius:9px}.qty{display:flex;gap:8px;align-items:center}.qty button{width:28px;height:28px;border-radius:50%;border:1px solid #ddd;background:white}dialog{border:0;border-radius:24px;padding:0;width:min(520px,calc(100% - 24px));max-height:90vh;overflow:auto}dialog::backdrop{background:#20120d88}.modal{padding:25px}.tabs{display:grid;grid-template-columns:1fr 1fr;background:#efdfd3;padding:4px;border-radius:999px}.tabs button{border:0;background:none;padding:10px;border-radius:999px}.tabs .active{background:white}.form{display:grid;gap:12px;margin-top:20px}.form input,.form select,.form textarea{width:100%;padding:13px;border:1px solid #ddd;border-radius:11px}.msg{padding:10px;border-radius:9px}.ok{background:#e6f7e8}.bad{background:#ffe5e5}.quiz-options{display:grid;gap:10px}.quiz-options button{padding:14px;border:1px solid #ddd;border-radius:12px;background:white;text-align:left}.account{max-width:1000px;margin:35px auto;padding:18px}.order{background:white;border-radius:17px;padding:18px;margin:14px 0}.order-item{display:grid;grid-template-columns:60px 1fr auto;gap:10px;align-items:center}.order-item img{width:60px;height:60px;object-fit:cover;border-radius:8px}
@media(max-width:900px){.nav{display:none}.brand span{display:none}.hero{grid-template-columns:1fr}.grid{grid-template-columns:repeat(2,1fr)}.section-head{display:block}.search{margin-top:15px}}
@media(max-width:600px){.header-inner{padding:9px 8px;gap:5px}.brand img{width:40px;height:40px}.actions .btn{font-size:11px;padding:9px}.hero{padding:34px 14px}.hero h1{font-size:44px}.hero-img{min-height:280px}.section{padding:50px 14px}.section-head h2{font-size:34px}.grid{grid-template-columns:1fr}.photo{aspect-ratio:4/3}.drawer{width:100%}.order-item{grid-template-columns:50px 1fr}.order-item>strong{grid-column:2}}


/* =========================
   DETALLE DE PRODUCTO
========================= */

.product-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 54px 18px 75px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 52px;
    align-items: start;
}

.product-gallery {
    min-width: 0;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 28px;
    background: #ead9cc;
    box-shadow: 0 18px 50px rgba(75, 43, 32, .12);
    touch-action: pan-y;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease;
}

.gallery-slide.active {
    opacity: 1;
    visibility: visible;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5ece4;
    user-select: none;
}

.product-detail-placeholder {
    min-height: 100%;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 1px solid rgba(75, 43, 32, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #4b2b20;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.gallery-prev {
    left: 16px;
}

.gallery-next {
    right: 16px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 88px);
    gap: 10px;
    margin-top: 14px;
}

.gallery-thumb {
    width: 88px;
    height: 88px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.gallery-thumb.active {
    border-color: #4b2b20;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5ece4;
}

.gallery-dots {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
}

.gallery-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(75, 43, 32, .25);
}

.gallery-dots button.active {
    width: 22px;
    border-radius: 999px;
    background: #4b2b20;
}

.product-detail-info {
    position: sticky;
    top: 95px;
    padding: 18px 0;
}

.product-detail-category {
    margin: 0 0 10px;
    color: #a86f47;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.product-detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 5vw, 66px);
    line-height: 1;
}

.product-detail-price {
    display: block;
    margin-bottom: 10px;
    font-size: 30px;
}

.product-detail-stock {
    margin: 0 0 28px;
    color: #806a60;
}

.product-description {
    padding: 25px 0;
    border-top: 1px solid #dfd1c7;
    border-bottom: 1px solid #dfd1c7;
}

.product-description h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.product-description p {
    margin: 0;
    color: #665047;
    font-size: 16px;
    line-height: 1.75;
}

.product-detail-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    margin-top: 26px;
}

.detail-quantity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 5px 8px;
    border: 1px solid #dfd1c7;
    border-radius: 999px;
    background: #fff;
}

.detail-quantity button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f1e4d9;
    color: #4b2b20;
    font-size: 20px;
    cursor: pointer;
}

.detail-add-button {
    width: 100%;
}

.product-detail-benefits {
    display: grid;
    gap: 9px;
    margin-top: 24px;
    color: #806a60;
    font-size: 13px;
}

@media (max-width: 850px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .product-detail-info {
        position: static;
    }
}

@media (max-width: 600px) {
    .product-detail-page {
        padding: 22px 12px 55px;
    }

    .gallery-main {
        aspect-ratio: 1 / 1;
        border-radius: 20px;
    }

    .gallery-slide img {
        object-fit: contain;
    }

    .gallery-arrow {
        display: none;
    }

    .gallery-thumbs {
        display: none;
    }

    .gallery-dots {
        display: flex;
    }

    .product-detail-info {
        padding: 0 3px;
    }

    .product-detail-info h1 {
        font-size: 39px;
    }

    .product-detail-price {
        font-size: 26px;
    }

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

    .detail-quantity {
        width: max-content;
    }
}


/* Corrección catálogo móvil y enlace de detalle */
.section-head h2,
.product-info h3,
.info h3 {
    overflow-wrap: anywhere;
    word-break: normal;
}

.photo {
    display: block;
}

@media (max-width: 600px) {
    .section-head h2 {
        max-width: 100%;
        font-size: 31px !important;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .grid {
        width: 100%;
        min-width: 0;
    }

    .product {
        width: 100%;
        min-width: 0;
    }

    .photo {
        width: 100%;
        height: 290px;
        aspect-ratio: auto !important;
    }

    .photo img {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
        background: #f5ece4;
    }

    .info {
        display: block !important;
        padding: 16px !important;
    }

    .info h3 {
        display: block;
        margin: 8px 0;
        font-size: 25px;
    }

    .info p {
        display: block;
        margin: 8px 0 14px;
        max-height: 4.5em;
        overflow: hidden;
    }

    .bottom {
        display: flex !important;
    }
}


/* FIX DEFINITIVO TARJETAS DE PRODUCTOS */
.grid{
  align-items:start !important;
}
.product{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  overflow:hidden !important;
}
.product .photo{
  display:block !important;
  width:100% !important;
  height:260px !important;
  min-height:260px !important;
  max-height:260px !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  background:#f4e9df !important;
}
.product .photo img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-height:260px !important;
  object-fit:contain !important;
  object-position:center !important;
  transform:none !important;
}
.product .info{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  height:auto !important;
  min-height:190px !important;
  padding:18px !important;
  background:#fff !important;
}
.product .info h3,
.product .info h3 a{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin:8px 0 !important;
  font-size:25px !important;
  line-height:1.15 !important;
}
.product .info p{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin:8px 0 16px !important;
  line-height:1.5 !important;
  color:#806a60 !important;
}
.product .bottom{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  margin-top:auto !important;
}
@media(max-width:600px){
  .section-head h2{font-size:32px !important;line-height:1.08 !important;}
  .product .photo{
    height:230px !important;
    min-height:230px !important;
    max-height:230px !important;
  }
  .product .photo img{max-height:230px !important;}
  .product .info{min-height:180px !important;}
}


/* =========================
   FIX DEFINITIVO PARA CELULAR
========================= */
@media (max-width: 600px) {
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .announcement {
        padding: 10px 14px;
        font-size: 12px;
        line-height: 1.35;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-inner {
        display: grid !important;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand cart"
            "auth auth";
        gap: 8px 10px !important;
        padding: 10px 12px !important;
        align-items: center;
    }

    .brand {
        grid-area: brand;
        margin: 0 !important;
        min-width: 0;
    }

    .brand img {
        width: 44px !important;
        height: 44px !important;
        object-fit: contain !important;
    }

    .brand span {
        display: none !important;
    }

    .actions {
        display: contents !important;
    }

    .actions > .btn.light[href*="mis-pedidos"],
    .actions > .btn.primary[href*="logout"] {
        grid-area: auth;
    }

    .actions > button[data-auth="login"],
    .actions > button[data-auth="register"] {
        min-width: 0;
        width: 100%;
    }

    .actions > button[data-auth="login"] {
        grid-column: 1;
    }

    .actions > button[data-auth="register"] {
        grid-column: 2;
    }

    .actions > button[data-auth="login"],
    .actions > button[data-auth="register"],
    .actions > a[href*="mis-pedidos"],
    .actions > a[href*="logout"] {
        grid-row: 2;
        min-height: 40px;
        padding: 9px 10px !important;
        font-size: 12px !important;
        white-space: nowrap;
        text-align: center;
    }

    #cartButton {
        grid-area: cart;
        justify-self: end;
        width: auto;
        min-height: 40px;
        padding: 9px 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .hero {
        display: block !important;
        padding: 34px 16px 26px !important;
    }

    .hero > div:first-child {
        min-width: 0;
    }

    .hero h1 {
        font-size: 48px !important;
        line-height: 0.98 !important;
        margin: 10px 0 20px !important;
        overflow-wrap: normal;
        word-break: normal;
    }

    .hero p {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }

    .hero > div:first-child > div {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100%;
    }

    .hero .btn {
        width: 100% !important;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal !important;
        text-align: center;
        line-height: 1.2;
    }

    .hero-img {
        min-height: 0 !important;
        height: auto !important;
        margin-top: 26px;
        padding: 28px !important;
        border-radius: 24px !important;
    }

    .hero-img img {
        width: min(78%, 320px) !important;
        height: auto !important;
        max-height: 320px !important;
        object-fit: contain !important;
        margin: 0 auto;
    }

    .section {
        width: 100%;
        max-width: 100%;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .section-head h2 {
        font-size: 34px !important;
        line-height: 1.05 !important;
    }

    .search {
        width: 100%;
        min-width: 0 !important;
    }

    .search input {
        width: 100%;
        max-width: 100%;
    }

    .grid,
    .product {
        width: 100%;
        min-width: 0;
    }

    .photo {
        width: 100%;
        height: 280px !important;
        aspect-ratio: auto !important;
    }

    .photo img {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
    }

    dialog {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: auto;
    }
}
/* ===== HEADER MÓVIL PROLIJO ===== */
@media (max-width: 600px) {

    .header-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        padding: 10px 8px !important;
    }

    .brand {
        flex: 0 0 auto !important;
    }

    .brand img {
        width: 42px !important;
        height: 42px !important;
        object-fit: contain !important;
    }

    .brand span {
        display: none !important;
    }

    .actions {
        display: flex !important;
        flex: 1 !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 5px !important;
    }

    .actions .btn,
    .actions button,
    #cartButton {
        width: auto !important;
        min-width: 0 !important;
        min-height: 38px !important;
        padding: 8px 10px !important;
        margin: 0 !important;
        border-radius: 999px !important;
        font-size: 11px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .actions button[data-auth="login"] {
        background: #ffffff !important;
        color: #8a5f4d !important;
        border: 1px solid #d8c1b5 !important;
    }

    .actions button[data-auth="register"] {
        background: #a87660 !important;
        color: #ffffff !important;
        border: 1px solid #a87660 !important;
    }

    #cartButton {
        background: #ffffff !important;
        color: #8a5f4d !important;
        border: 1px solid #d8c1b5 !important;
    }

    #cartButton span {
        background: #a87660 !important;
        color: white !important;
    }
}

/* ===== MARRONES MÁS CLAROS ===== */

:root {
    --brown: #8a5f4d;
    --brown-dark: #704838;
    --brown-soft: #a87660;
}

.announcement {
    background: #8a5f4d !important;
}

.btn.primary {
    background: #a87660 !important;
    border-color: #a87660 !important;
}

.hero h1,
.section h2,
.product h3 {
    color: #704838 !important;
}

.hero {
    color: #704838;
}
/* ===== SECCIÓN NOSOTROS / HISTORIA ===== */

.story h2,
.story p {
    color: #ffffff !important;
}

.story h2 {
    opacity: 1 !important;
}

.story p {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* ===== FOOTER MÁS COMPLETO ===== */

.footer {
    background: #4f2f24 !important;
    color: #ffffff !important;
    text-align: center;
    padding: 34px 20px !important;
}

.footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 14px;
    line-height: 1.6;
}
@media (min-width: 601px) {
    .story h2 {
        color: #ffffff !important;
        opacity: 1 !important;
    }
}
.story,
.story * {
    color: #ffffff !important;
}

.story h1,
.story h2,
.story h3,
.story h4,
.story p,
.story span {
    color: #ffffff !important;
    opacity: 1 !important;
}
.story,
.story * {
    color: #ffffff !important;
}

.story h1,
.story h2,
.story h3,
.story h4,
.story p,
.story span {
    color: #ffffff !important;
    opacity: 1 !important;
}