main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 80px 20px;
    min-height: 70vh;

    background-image: url('/src/assets/images/mainproducts.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    position: relative;
    text-align: center;
    color: #ffffff;
}

/* Capa oscura para mejorar legibilidad */
main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

main > * {
    position: relative;
    z-index: 2;
}

/* H1 estilo industrial fuerte */
main h1 {
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.2;

    max-width: 900px;

    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    main {
        padding: 90px 15px 70px 15px;
        background-position: 70%;
    }

    main h1 {
        font-size: 2.4rem; /* más grande en móvil */
        letter-spacing: 1px;
        line-height: 1.2;

        margin-top: 60px; /* lo baja visualmente */
    }
}

main a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #ffd000, #ffb300);
    color: #111;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.product-filter-panel {
    padding: 40px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-filter-inner {
    background: #ffffff;
    border-radius: 24px;
    padding: 26px 28px;
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.filter-heading h2 {
    margin: 0 0 8px;
    font-size: 1.8rem;
    color: #131313;
}

.filter-heading p {
    margin: 0;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.7;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.filter-form {
    margin-top: 24px;
}

.filter-form .form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.filter-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #111;
    font-size: 0.95rem;
}

.filter-form input,
.filter-form select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.95rem;
    background: #f8fafc;
    color: #1f2937;
}

.pagination-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.pagination-meta {
    color: #4b5563;
    font-size: 0.95rem;
}

.pagination-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #111;
    cursor: pointer;
    transition: all .2s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.favorite-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.95);
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.favorite-btn.favorite-active {
    background: #ffd900;
    color: #111;
    transform: scale(1.05);
}

.filter-btn {
    background: #f4f4f5;
    border: 1px solid #e5e7eb;
    color: #111;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: all .3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

.product-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.card {
    width: 100%;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,.1);
    transition: .3s;
    font-family: 'Segoe UI', sans-serif;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.tilt {
    overflow: hidden;
}

.img {
    height: 200px;
    overflow: hidden;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.card:hover .img img {
    transform: scale(1.05);
}

.info {
    padding: 20px;
}

.cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #71717A;
    margin-bottom: 5px;
}

.title {
    font-size: 18px;
    font-weight: 700;
    color: #18181B;
    margin: 0 0 10px;
    letter-spacing: -.5px;
}

.desc {
    font-size: 13px;
    color: #52525B;
    line-height: 1.4;
    margin-bottom: 12px;
}

.feats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.feat {
    font-size: 10px;
    background: #F4F4F5;
    color: #71717A;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.price {
    display: flex;
    flex-direction: column;
}

.new {
    font-size: 20px;
    font-weight: 700;
    color: #18181B;
}

.btn {
    background: linear-gradient(45deg,#18181B,#27272A);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: .3s;
    box-shadow: 0 3px 10px rgba(0,0,0,.1);
    position: relative;
}

.btn:hover {
    background: linear-gradient(45deg,#27272A,#3F3F46);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,.15);
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.1),
        transparent
    );
    transition: .5s;
}

.btn:hover:before {
    left: 100%;
}

.blog-read-more {
    display: inline-block;
    margin-top: 16px;
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

.product-details-summary {
    margin-top: 16px;
    font-size: 13px;
    color: #52525B;
    line-height: 1.6;
}

.product-details-summary p {
    margin: 6px 0;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F4F4F5;
    padding-top: 12px;
    margin-top: 16px;
    gap: 10px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.stock {
    font-size: 11px;
    font-weight: 600;
    color: #22C55E;
}

.empty-state {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.quote-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 9999;
}

.quote-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
}

.quote-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
}

.quote-card h2 {
    margin: 0 0 18px;
    font-size: 1.7rem;
    color: #18181B;
}

.quote-card p {
    color: #52525B;
    margin-bottom: 24px;
}

.quote-form {
    display: grid;
    gap: 14px;
}

.quote-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-form label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
}

.quote-form input,
.quote-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.95rem;
    color: #111;
    background: #f8fafc;
}

.submit-btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease;
}

.submit-btn:hover {
    background: #27272A;
    transform: translateY(-1px);
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .card {
        width: 100%;
    }

    .title {
        font-size: 16px;
    }

    .img {
        height: 180px;
    }

    .bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .price {
        margin-bottom: 5px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
