/**
 * Yolti Store V2 — Silvs-inspired layout
 * Uses theme design tokens (v2.css variables)
 * Scoped under .yolti-tienda-page
 */

/* ========== HERO: Split Layout ========== */
.yt-hero {
    background: var(--v2-white, #fff9f0);
    padding: calc(var(--y-header-h, 72px) + 40px) var(--y-padding-global, 64px) 80px;
}

.yt-hero__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: start;
}

/* ========== Gallery (Left Column) ========== */
.yt-hero__gallery {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.yt-hero__image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    background: #f3ede4;
    padding: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.4s ease;
}

.yt-hero__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-hero__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(67, 42, 24, 0.15);
    border-top-color: var(--v2-dark, #432a18);
    border-radius: 50%;
    animation: yt-spin 1s linear infinite;
}

@keyframes yt-spin {
    to { transform: rotate(360deg); }
}

/* Description */
.yt-hero__description {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.yt-hero__desc-title {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
    color: var(--v2-dark, #432a18);
}

.yt-hero__desc-text {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 16px;
    line-height: 1.7;
    color: var(--v2-accent, #7b6859);
    max-width: 520px;
}

/* Benefits Grid */
.yt-hero__benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.yt-hero__benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 20px 12px;
    border-radius: 16px;
    background: rgba(67, 42, 24, 0.03);
    border: 1px solid rgba(67, 42, 24, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yt-hero__benefit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 42, 24, 0.08);
}

.yt-hero__benefit-icon {
    width: 40px;
    height: 40px;
    color: var(--v2-accent-warm, #c8956c);
}

.yt-hero__benefit-icon svg {
    width: 100%;
    height: 100%;
}

.yt-hero__benefit span {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 13px;
    font-weight: 500;
    color: var(--v2-dark, #432a18);
}

/* Ingredients */
.yt-hero__ingredients {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-hero__section-title {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 28px);
    color: var(--v2-dark, #432a18);
}

.yt-hero__ingredients-list {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--v2-accent, #7b6859);
}

/* Nutrition Facts */
.yt-hero__nutrition {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.yt-hero__nutrition-card {
    border-radius: 16px;
    border: 1px solid rgba(67, 42, 24, 0.1);
    overflow: hidden;
}

.yt-hero__nutrition-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(67, 42, 24, 0.06);
}

.yt-hero__nutrition-row:last-child { border-bottom: none; }

.yt-hero__nutrition-row--sub {
    padding-left: 36px;
    background: rgba(67, 42, 24, 0.015);
}

.yt-hero__nutrition-label {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 14px;
    color: var(--v2-accent, #7b6859);
}

.yt-hero__nutrition-value {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 600;
    font-size: 18px;
    color: var(--v2-dark, #432a18);
}

/* ========== Buy Panel (Right Column — Sticky) ========== */
.yt-hero__buy-panel {
    position: sticky;
    top: calc(var(--y-header-h, 72px) + 32px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.yt-hero__product-name {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1;
    color: var(--v2-dark, #432a18);
}

/* Variant Pills */
.yt-hero__variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.yt-hero__variant {
    padding: 10px 20px;
    border-radius: 9999px;
    border: 1.5px solid rgba(67, 42, 24, 0.15);
    background: transparent;
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--v2-dark, #432a18);
    cursor: pointer;
    transition: all 0.2s ease;
}

.yt-hero__variant:hover {
    border-color: var(--v2-dark, #432a18);
    background: rgba(67, 42, 24, 0.03);
}

.yt-hero__variant.active {
    background: var(--v2-dark, #432a18);
    color: var(--v2-cream, #fef5e8);
    border-color: var(--v2-dark, #432a18);
}

/* Size */
.yt-hero__size {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 14px;
    color: var(--v2-accent, #7b6859);
}

/* Price Row */
.yt-hero__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.yt-hero__qty {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(67, 42, 24, 0.04);
    border-radius: 9999px;
    padding: 4px;
}

.yt-hero__qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    background: transparent;
    color: var(--v2-dark, #432a18);
}

.yt-hero__qty-btn:hover { background: rgba(67, 42, 24, 0.08); }

.yt-hero__qty-btn svg { width: 16px; height: 16px; }

.yt-hero__qty-value {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-weight: 600;
    font-size: 16px;
    width: 32px;
    text-align: center;
    color: var(--v2-dark, #432a18);
}

.yt-hero__price {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--v2-dark, #432a18);
}

/* Add to Cart Button */
.yt-hero__add-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--y-radius-sm, 10px);
}

/* Stock Info */
.yt-hero__stock {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 13px;
    color: var(--v2-accent-warm, #c8956c);
    text-align: center;
}

.yt-hero__stock:empty { display: none; }

/* Shipping Info */
.yt-hero__shipping-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: rgba(67, 42, 24, 0.03);
    border-radius: 12px;
    color: var(--v2-accent, #7b6859);
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 14px;
}

/* ========== Cross-Sell Section ========== */
.yt-cross-sell {
    background: var(--v2-white, #fff9f0);
    padding: 80px var(--y-padding-global, 64px) 120px;
}

.yt-cross-sell__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.yt-cross-sell__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.yt-cross-sell__title {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 48px);
    color: var(--v2-dark, #432a18);
}

.yt-cross-sell__desc {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 16px;
    color: var(--v2-accent, #7b6859);
}

.yt-cross-sell__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Cross-sell Card */
.yt-cross-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    background: #f3ede4;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-cross-card:hover { transform: scale(1.02); }

.yt-cross-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.yt-cross-card__info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 4px 0;
}

.yt-cross-card__name {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 600;
    font-size: 18px;
    color: var(--v2-dark, #432a18);
}

.yt-cross-card__price {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-weight: 500;
    font-size: 15px;
    color: var(--v2-accent, #7b6859);
}

/* ========== Cart Modal ========== */
.yt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.yt-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.yt-modal {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.yt-modal-overlay.active .yt-modal {
    transform: translateY(0);
}

@media (min-width: 640px) {
    .yt-modal-overlay { align-items: center; }
    .yt-modal { border-radius: 20px; max-height: 80vh; }
}

.yt-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(67, 42, 24, 0.1);
    flex-shrink: 0;
}

.yt-modal__header h3 {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--v2-dark, #432a18);
}

.yt-modal__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(67, 42, 24, 0.05);
    color: var(--v2-dark, #432a18);
    cursor: pointer;
    transition: background 0.15s ease;
}

.yt-modal__close:hover { background: rgba(67, 42, 24, 0.1); }

.yt-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.yt-modal__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(67, 42, 24, 0.1);
    flex-shrink: 0;
}

.yt-modal__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.yt-modal__total-label {
    color: var(--v2-accent, #7b6859);
    font-size: 14px;
}

.yt-modal__total-value {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--v2-dark, #432a18);
}

.yt-modal__checkout-btn {
    width: 100%;
    padding: 14px 24px;
}

/* Cart Item */
.yt-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(67, 42, 24, 0.06);
}

.yt-cart-item:last-child { border-bottom: none; }

.yt-cart-item__info { flex: 1; min-width: 0; }

.yt-cart-item__name {
    font-weight: 500;
    font-size: 14px;
    margin: 0;
    color: var(--v2-dark, #432a18);
}

.yt-cart-item__detail {
    font-size: 13px;
    color: var(--v2-accent, #7b6859);
    margin: 2px 0 0;
}

.yt-cart-item__total {
    font-weight: 700;
    font-size: 14px;
    min-width: 56px;
    text-align: right;
    color: var(--v2-dark, #432a18);
}

/* Cart qty stepper in modal */
.yt-cart-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-cart-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.yt-cart-qty button svg { width: 12px; height: 12px; }

.yt-cart-qty .yt-cart-qty--minus {
    background: rgba(67, 42, 24, 0.08);
    color: var(--v2-dark, #432a18);
}

.yt-cart-qty .yt-cart-qty--plus {
    background: var(--v2-dark, #432a18);
    color: white;
}

.yt-cart-qty span {
    font-weight: 600;
    width: 24px;
    text-align: center;
    font-size: 14px;
}

/* Empty cart */
.yt-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.yt-empty-cart svg {
    width: 56px;
    height: 56px;
    color: rgba(67, 42, 24, 0.2);
    margin-bottom: 12px;
}

.yt-empty-cart p {
    color: var(--v2-accent, #7b6859);
    font-size: 14px;
}

/* ========== Form ========== */
.yt-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yt-form__title {
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--v2-dark, #432a18);
}

.yt-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(67, 42, 24, 0.15);
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--v2-font-body, 'Rethink Sans', sans-serif);
    color: var(--v2-dark, #432a18);
    background: white;
    outline: none;
    transition: all 0.15s ease;
}

.yt-input:focus {
    border-color: var(--v2-dark, #432a18);
    box-shadow: 0 0 0 3px rgba(67, 42, 24, 0.1);
}

.yt-input::placeholder { color: rgba(67, 42, 24, 0.35); }

.yt-shipping-quote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(67, 42, 24, 0.04);
    border-radius: 12px;
}

.yt-shipping-quote__label { font-size: 14px; color: var(--v2-accent, #7b6859); }
.yt-shipping-quote__value { font-weight: 600; font-size: 14px; color: var(--v2-dark, #432a18); }

/* ========== Confirmation ========== */
.yt-confirmation {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--v2-white, #fff9f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-confirmation__inner {
    text-align: center;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.yt-confirmation__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgb(220, 252, 231);
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-confirmation__icon svg { color: rgb(21, 128, 61); }

.yt-confirmation h2 {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--v2-dark, #432a18);
}

.yt-confirmation p {
    color: var(--v2-accent, #7b6859);
    font-size: 14px;
}

.yt-confirmation__tracking {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.yt-confirmation__tracking h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.yt-confirmation__tracking a {
    color: var(--v2-accent-warm, #c8956c);
    text-decoration: underline;
    font-size: 14px;
}

/* ========== Mobile Sticky Cart ========== */
.yt-mobile-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(67, 42, 24, 0.1);
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.yt-mobile-cart.visible {
    transform: translateY(0);
}

.yt-mobile-cart__info {
    display: flex;
    flex-direction: column;
}

.yt-mobile-cart__count {
    font-size: 12px;
    color: var(--v2-accent, #7b6859);
}

.yt-mobile-cart__total {
    font-family: var(--v2-font-display, 'Awesome Serif', serif);
    font-weight: 700;
    font-size: 20px;
    color: var(--v2-dark, #432a18);
}

.yt-mobile-cart__btn { flex: 1; }

/* ========== Utilities ========== */
.yt-hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .yt-hero__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .yt-hero__buy-panel {
        position: static;
    }

    .yt-hero { padding-left: 32px; padding-right: 32px; }
    .yt-cross-sell { padding-left: 32px; padding-right: 32px; }

    .yt-mobile-cart { display: flex; }
}

@media (max-width: 768px) {
    .yt-hero { padding: calc(var(--y-header-h, 72px) + 24px) 20px 60px; }
    .yt-hero__benefits { grid-template-columns: repeat(2, 1fr); }
    .yt-cross-sell { padding: 60px 20px; }
    .yt-cross-sell__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}