/**
 * Shop App Styles - Diseño Web-App Moderno
 */

.shop-app-page {
    background: linear-gradient(to bottom, #fef3c7 0%, #fef9e7 100%) !important;
    min-height: 100vh;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* Search Bar Sticky */
.search-bar-sticky {
    position: sticky;
    top: calc(60px + env(safe-area-inset-top));
    background: white;
    padding: 1rem;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-container-app {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon-app {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    color: #64748b;
}

.search-input-app {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input-app:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-clear:hover {
    background: #cbd5e1;
}

/* Categories Horizontal Scroll */
.categories-scroll {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: calc(120px + env(safe-area-inset-top));
    z-index: 89;
}

.categories-chips {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.categories-chips::-webkit-scrollbar {
    height: 4px;
}

.categories-chips::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.categories-chips::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.category-chip {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-chip:hover {
    background: #f1f5f9;
    color: #667eea;
}

.category-chip.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

/* Products Grid */
.container-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.category-section-app {
    margin-bottom: 2rem;
}

.category-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.category-title-app {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.products-grid-app {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .products-grid-app {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid-app {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Product Card */
.product-card-app {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card-app:active {
    transform: scale(0.98);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    background: #f8f9fa;
    overflow: hidden;
}

.product-image-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.product-info-app {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name-app {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 0.75rem;
}

.product-price-app {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price-old {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-stock-app {
    font-size: 0.8rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.product-stock-app.low {
    color: #f59e0b;
}

.product-stock-app.out {
    color: #ef4444;
}

.btn-add-to-cart-app {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-add-to-cart-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.btn-add-to-cart-app:active {
    transform: scale(0.95);
}

.btn-add-to-cart-app:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Empty State */
.empty-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-products-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading Skeleton */
.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.skeleton-image {
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-text {
    height: 1rem;
    margin: 0.5rem 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Promo Banner */
.promo-banner-app {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    margin: 1rem 0 2rem 0;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.promo-banner-app h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.promo-banner-app p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid-app {
        gap: 0.75rem;
    }
    
    .product-card-app {
        border-radius: 12px;
    }
    
    .product-info-app {
        padding: 0.75rem;
    }
    
    .product-name-app {
        font-size: 0.875rem;
    }
    
    .product-price-app {
        font-size: 1.25rem;
    }
    
    .btn-add-to-cart-app {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
}

