/* Estilos adicionales para Yarok Market */
body {
    background: #f9fafb;
    color: #111827;
    padding-bottom: 5rem;
    /* espacio para la bottom nav en mobile */
}

main {
    min-height: 70vh;
}

.market-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th,
.market-table td {
    padding: 0.75rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.market-table th {
    background: #f3f4f6;
    font-weight: 700;
    color: #374151;
}

.market-card {
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.market-pill {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
}

.market-badge-red {
    background: #fee2e2;
    color: #b91c1c;
}

.market-badge-green {
    background: #dcfce7;
    color: #166534;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
}

.hero-slide {
    display: none;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-slide {
        height: 200px;
    }
}

.hero-slide.active {
    display: block;
}

.hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.hero-dot.active {
    background: #fff;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 8px 14px;
    font-weight: 600;
    color: #111827;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.08);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #38a169;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0.95;
}

/* Estilos inspirados en MercadoLibre */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
}

@media (max-width: 768px) {
    .product-image {
        height: 160px;
    }
}

.product-title {
    font-size: 14px;
    line-height: 1.3;
    color: rgba(0, 0, 0, 0.9);
    font-weight: 400;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 24px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 4px;
}

.product-discount {
    display: inline-block;
    background: #00a650;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}

.product-original-price {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
    text-decoration: line-through;
    margin-bottom: 8px;
}

.product-shipping {
    font-size: 14px;
    color: #00a650;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-installments {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
}

.btn-primary-ml {
    background: #3483fa;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary-ml:hover {
    background: #2968c8;
}

.btn-secondary-ml {
    background: rgba(52, 131, 250, 0.08);
    color: #3483fa;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary-ml:hover {
    background: rgba(52, 131, 250, 0.15);
}

.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 4px 8px;
}

.search-bar button {
    background: #eeeeee;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.65);
}

.search-bar button:hover {
    background: #e0e0e0;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.55);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: rgba(0, 0, 0, 0.55);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #3483fa;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: rgba(0, 0, 0, 0.25);
}

/* Mejoras adicionales inspiradas en ML */
.section-title {
    font-size: 26px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 24px;
}

.filter-pill {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.65);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    border-color: #3483fa;
    color: #3483fa;
}

.filter-pill.active {
    background: #3483fa;
    color: #fff;
    border-color: #3483fa;
}

/* Badges y pills mejorados */
.badge-full {
    display: inline-block;
    background: #00a650;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-official {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 166, 80, 0.1);
    color: #00a650;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Pagination style */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    color: rgba(0, 0, 0, 0.65);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: #3483fa;
    color: #3483fa;
}

.pagination .active {
    background: #3483fa;
    color: #fff;
    border-color: #3483fa;
}

/* Card hover effects mejorados */
.product-card-wrapper {
    position: relative;
}

.product-card-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    pointer-events: none;
}

.product-card-wrapper:hover::before {
    box-shadow: 0 0 0 1px rgba(52, 131, 250, 0.4);
}