/* ============================================
   MANITAS CREATIVAS MARY — TIENDA
   Reutiliza las variables CSS de styles.css
   ============================================ */

/* ============================================
   TIENDA HERO
   ============================================ */
.store-hero {
    padding: calc(120px + var(--space-3xl)) var(--space-xl) var(--space-3xl);
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(196, 162, 101, 0.12) 0%, transparent 55%),
        var(--cream);
    border-bottom: 1px solid var(--border-light);
}

.store-hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.store-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    color: var(--coffee);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.store-hero-accent {
    color: var(--terracotta);
    font-style: italic;
}

.store-hero-text {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin: var(--space-lg) auto 0;
    max-width: 560px;
    line-height: 1.7;
}

.store-hero-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.store-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.55rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--coffee);
    box-shadow: var(--shadow-sm);
}

.store-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: var(--gold);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
}

.store-step-arrow {
    color: var(--gold-muted);
    font-size: 1.2rem;
}

/* ============================================
   SECCIÓN TIENDA
   ============================================ */
.store-section {
    padding: var(--space-3xl) 0 var(--space-4xl);
}

/* ============================================
   FILTROS POR CATEGORÍA
   ============================================ */
.store-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.store-filter-btn {
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--coffee-medium);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.store-filter-btn:hover {
    border-color: var(--gold);
    color: var(--coffee);
    transform: translateY(-2px);
}

.store-filter-btn.active {
    background: var(--coffee);
    color: var(--cream);
    border-color: var(--coffee);
    box-shadow: var(--shadow-md);
}

/* ============================================
   GRID DE PRODUCTOS
   ============================================ */
.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.store-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
    position: relative;
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.store-card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: zoom-in;
}

.store-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.store-card:hover .store-card-image {
    transform: scale(1.06);
}

.store-card-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: rgba(196, 162, 101, 0.92);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.store-card-body {
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-card-category {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-muted);
    margin-bottom: var(--space-xs);
}

.store-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--coffee);
    margin-bottom: var(--space-sm);
    line-height: 1.25;
}

.store-card-desc {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: var(--space-md);
    flex: 1;
}

/* Precio */
.store-card-price {
    font-family: var(--font-accent);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--terracotta);
    margin-bottom: var(--space-md);
}

.store-card-price .from {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    font-family: var(--font-body);
    margin-right: 0.2rem;
}

.store-card-price .consult {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

/* Selector de opciones */
.store-options {
    margin-bottom: var(--space-md);
}

.store-options-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.store-option-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.store-option-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    background: var(--off-white);
    color: var(--coffee-medium);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    min-height: 42px;
}

.store-option-btn:hover {
    border-color: var(--gold);
}

.store-option-btn.selected {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

/* Botón WhatsApp */
.store-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-xl);
    background: var(--whatsapp);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-align: center;
    transition: background var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.25);
    min-height: 52px;
    text-decoration: none;
}

.store-wa-btn:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.35);
}

.store-wa-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================
   CARGA Y ERROR
   ============================================ */
.store-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-3xl) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.store-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: var(--radius-full);
    animation: spin 0.9s linear infinite;
}

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

.store-error {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-secondary);
}

.store-error p {
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
}

/* ============================================
   BANNER CÓMO PEDIR
   ============================================ */
.store-howto {
    background: var(--coffee);
    padding: var(--space-3xl) 0;
    color: var(--cream);
}

.store-howto-inner .section-title {
    color: var(--cream);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.store-howto-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.store-howto-item {
    text-align: center;
}

.store-howto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: rgba(196, 162, 101, 0.15);
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
}

.store-howto-item p {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(253, 246, 238, 0.9);
    line-height: 1.55;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .store-howto-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}

@media (max-width: 600px) {
    .store-filters {
        /* Filtros en una sola línea con scroll horizontal (no ocupan alto) */
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding-bottom: 0.4rem;
        margin-bottom: var(--space-xl);
        margin-left: calc(var(--space-sm) * -1);
        margin-right: calc(var(--space-sm) * -1);
        padding-left: var(--space-sm);
        padding-right: var(--space-sm);
    }
    .store-filters::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .store-filter-btn {
        flex: 0 0 auto; /* no se encogen, permiten scroll */
        white-space: nowrap;
    }
    .store-grid {
        grid-template-columns: 1fr;
    }
    .store-hero {
        padding-top: calc(100px + var(--space-3xl));
    }
    .store-hero-steps {
        /* En móvil: una fila compacta de 3 columnas (número arriba, texto debajo) */
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: center;
        gap: var(--space-xs);
        margin-top: var(--space-lg);
    }
    .store-step {
        flex: 1 1 0;
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
        padding: 0.6rem 0.4rem;
        font-size: 0.7rem;
        line-height: 1.25;
    }
    .store-step-num {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    .store-step-arrow {
        display: none; /* los números 1-2-3 ya muestran la secuencia */
    }
    .store-howto-grid {
        grid-template-columns: 1fr;
    }
    .store-option-btn {
        flex: 1;
        min-height: 48px;
        font-size: 0.9rem;
    }
}

/* El atributo hidden debe ocultar el bloque aunque display:flex lo pida */
.store-loading[hidden] {
    display: none;
}
