/* ============================================
   Catalog Layout - Estilos específicos del catálogo público
   Extraído de catalog.blade.php para mejor caché y mantenibilidad
   ============================================ */

/* Nota: --store-primary se define dinámicamente en el layout */

/* Forces white background for the public store */
body {
    background-color: #ffffff !important;
}

/* Override body padding para catálogo */
.catalog-body {
    padding-bottom: 100px;
    /* Espacio para barra de carrito */
}

/* -------------------------------------------
   Store Header
   ------------------------------------------- */
.store-header {
    position: relative;
    background: var(--bg-card);
    color: var(--text-main);
    padding-bottom: var(--spacing-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--spacing-md);
}

.store-banner {
    width: 100%;
    height: 90px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--store-primary), var(--primary-dark));
}

.store-logo-wrapper {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.store-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid white;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info {
    text-align: center;
    padding-top: 30px;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.store-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-main);
}

.store-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.store-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #444;
    font-weight: 600;
}

.store-status.open {
    background: rgba(37, 211, 102, 0.1);
    color: var(--whatsapp-dark);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.store-status.open .status-dot {
    background: var(--whatsapp);
}

/* -------------------------------------------
   Social Buttons
   ------------------------------------------- */
.store-social {
    display: flex;
    gap: 12px;
    /* Antes: 8px -> Mejora ergonomía táctil */
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: all 0.2s;
}

.social-btn:hover {
    background: var(--store-primary);
    color: white;
    transform: translateY(-1px);
}

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

/* -------------------------------------------
   Floating Cart Bar
   ------------------------------------------- */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--store-primary);
    color: white;
    padding: var(--spacing-md);
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-active-bar);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

.cart-bar.show {
    display: flex;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cart-count {
    background: white;
    color: var(--store-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.cart-total {
    font-weight: 700;
    font-size: 1.125rem;
}

.cart-btn {
    background: white;
    color: var(--store-primary);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
}

/* -------------------------------------------
   Catalog Product Grid
   ------------------------------------------- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.catalog-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15), 0 3px 10px rgba(0, 0, 0, 0.1);
}

.catalog-card-image {
    position: relative;
    aspect-ratio: 1;
    background: #ffffff;
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-card-add {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    background: var(--store-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
    /* Touch target mínimo 44px para accesibilidad móvil (WCAG 2.5.5) */
}

.catalog-card-add:hover {
    transform: scale(1.1);
}

.catalog-card-info {
    padding: var(--spacing-sm);
}

.catalog-card-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    /* Fallback estándar para compatibilidad futura */
    overflow: hidden;
    min-height: 2.5em;
}

.catalog-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--store-primary);
    margin-top: 4px;
}

/* -------------------------------------------
   Cart Quantity Controls
   ------------------------------------------- */
.cart-qty-controls {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--store-primary);
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    color: var(--store-primary);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
    /* Touch target mínimo 44px para accesibilidad móvil (WCAG 2.5.5) */
}

.qty-btn:hover {
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
    background: #f0f0f0;
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

/* -------------------------------------------
   Closed Store Notice
   ------------------------------------------- */
.store-closed-notice {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: var(--spacing-md);
    font-size: 0.875rem;
}

/* -------------------------------------------
   Mobile Accessibility Fixes
   ------------------------------------------- */
@media (max-width: 768px) {

    /* Prevent iOS auto-zoom on input focus (requires 16px minimum) */
    input[type="text"],
    input[type="search"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
    }
}
/* Carousel Styles */
.product-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
    padding: 4px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

