*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #050509;
    color: #f9fafb;
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1120px, 100% - 2rem);
    margin-inline: auto;
}

/* LOADER */
.loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader--hide {
    opacity: 0;
    visibility: hidden;
}

.loader__card {
    background: #020617;
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 1.3rem 1.6rem 1.4rem;
    text-align: center;
    width: min(360px, 100% - 2.4rem);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8);
}

.loader__logo {
    width: 90px;
    height: 90px;
    margin-inline: auto;
    border-radius: 999px;
    border: 2px solid #ef4444;
    object-fit: cover;
    margin-bottom: 0.75rem;
    animation: logoFloat 1.8s ease-in-out infinite;
}

.loader__title {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.loader__subtitle {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 0.9rem;
}

.loader__bar {
    width: 100%;
    height: 4px;
    background: #0f172a;
    border-radius: 999px;
    overflow: hidden;
}

.loader__bar-inner {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 999px;
    animation: loaderBar 1.1s ease-in-out infinite;
}

@keyframes loaderBar {
    0% { transform: translateX(-120%); }
    50% { transform: translateX(10%); }
    100% { transform: translateX(140%); }
}

@keyframes logoFloat {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
    50% {
        transform: translateY(-10px) scale(1.18);
        box-shadow: 0 0 28px rgba(239, 68, 68, 0.6);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 9, 0.85);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.75rem;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 2px solid #ef4444;
    object-fit: cover;
}

.nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nav a {
    position: relative;
    padding-block: 0.25rem;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    transition: width 0.2s ease;
}

.nav a:hover::after {
    width: 100%;
}

.header__icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-btn {
    border: none;
    background: #111827;
    color: #f9fafb;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s ease, transform 0.05s ease;
}

.cart-btn span {
    background: #ef4444;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.cart-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.menu-btn {
    display: none;
    border: none;
    background: #111827;
    color: #f9fafb;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}

/* HERO */
.hero {
    padding-block: 2.5rem 2rem;
}

.hero__content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero__text h1 {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.hero__text p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border: none;
    color: #f9fafb;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 40px rgba(239, 68, 68, 0.45);
    opacity: 0.96;
}


.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-full {
    width: 100%;
}

.hero__image {
    position: relative;
    border-radius: 1.75rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

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

.hero__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.9);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.3);
}

/* FILTROS */
.filters {
    padding-block: 0.75rem 1.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 55%);
}

.filters__content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filters__group {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.filters__group label {
    color: #9ca3af;
}

.filters__group select,
.filters__group input {
    background: #020617;
    border-radius: 0.75rem;
    border: 1px solid #1f2937;
    padding: 0.45rem 0.75rem;
    color: #f9fafb;
    font-size: 0.85rem;
    outline: none;
}

.filters__group select:focus,
.filters__group input:focus {
    border-color: #f97316;
}

.filters__group--badge {
    align-items: flex-end;
}

.badge {
    font-size: 0.7rem;
    background: rgba(15, 23, 42, 0.95);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

/* PRODUCTOS */
.productos {
    padding-block: 2rem;
}

.productos h2 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.catalog-info {
    font-size: 0.85rem;
    color: #9ca3af;
}

.items-per-page-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.items-per-page-label select {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #f9fafb;
    padding: 0.35rem 0.55rem;
    border-radius: 0.75rem;
    outline: none;
}

.items-per-page-label select:focus {
    border-color: #f97316;
}

.productos__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.pagination {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.page-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.92);
    color: #f9fafb;
    padding: 0.35rem 0.7rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}

.page-btn:hover {
    background: rgba(31, 41, 55, 0.92);
    transform: translateY(-1px);
}

.page-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.page-btn--active {
    border-color: rgba(249, 115, 22, 0.9);
    background: rgba(249, 115, 22, 0.16);
}

.product-card {
    background: #020617;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.95);
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(248, 250, 252, 0.3);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
}

.product-card__image {
    height: 160px;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__body {
    padding: 0.75rem 0.9rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.product-card__title {
    font-size: 0.95rem;
    font-weight: 500;
}

.product-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

.product-card__category {
    text-transform: capitalize;
}

.product-card__stock {
    font-size: 0.75rem;
}

.product-card__price-row {
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card__price {
    font-weight: 600;
    font-size: 1rem;
    color: #f97316;
}

.product-card__btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
}

/* OFERTAS */
.ofertas {
    padding-block: 2rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
}

.ofertas__content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ofertas__cards {
    flex: 1 1 260px;
    display: grid;
    gap: 1rem;
}

.oferta-card {
    background: #020617;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(31, 41, 55, 0.95);
}

.oferta-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.oferta-card p {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.oferta-card__precio {
    font-size: 0.85rem;
    color: #f97316;
    font-weight: 600;
}

/* CONTACTO */
.contacto {
    padding-block: 2rem 2.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
}

.contacto__content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contacto__content > div {
    flex: 1 1 260px;
}

.contacto__list {
    list-style: none;
    margin-top: 0.5rem;
    font-size: 0.87rem;
    color: #e5e7eb;
}

.contacto__list li + li {
    margin-top: 0.25rem;
}

.contacto__form {
    flex: 1 1 260px;
    background: #020617;
    border-radius: 1.25rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(31, 41, 55, 0.95);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contacto__form h3 {
    font-size: 1rem;
}

.contacto__form input,
.contacto__form textarea {
    background: #020617;
    border-radius: 0.75rem;
    border: 1px solid #1f2937;
    padding: 0.45rem 0.75rem;
    color: #f9fafb;
    font-size: 0.85rem;
    outline: none;
}

.contacto__form input:focus,
.contacto__form textarea:focus {
    border-color: #f97316;
}

/* FOOTER */
.footer {
    padding-block: 1rem 1.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    font-size: 0.8rem;
    color: #9ca3af;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer__dev {
    font-size: 0.8rem;
    color: #e5e7eb;
}

/* CARRITO */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 100%);
    height: 100vh;
    background: #020617;
    border-left: 1px solid rgba(31, 41, 55, 0.95);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.cart-panel.open {
    transform: translateX(0%);
}

.cart-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.cart-panel__header button {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
}

.cart-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.cart-item {
    display: flex;
    gap: 0.6rem;
    padding-block: 0.4rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.cart-item__img {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #111827;
    flex-shrink: 0;
}

.cart-item__body {
    flex: 1;
}

.cart-item__title {
    font-size: 0.83rem;
    margin-bottom: 0.1rem;
}

.cart-item__meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.cart-item__qty button {
    border: none;
    background: #111827;
    color: #f9fafb;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    cursor: pointer;
}

.cart-panel__footer {
    padding: 0.9rem 1rem 1.1rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
}

.cart-panel__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
}

.cart-panel__note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* BACKDROP */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 150;
}

.backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* WHATSAPP BUTTON */
.whatsapp-btn {
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #f9fafb;
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.65);
    z-index: 180;
    border: none;
    cursor: pointer;
}

/* MODAL CHECKOUT */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(3px);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    width: min(420px, 100% - 2.5rem);
    background: #020617;
    border-radius: 1.3rem;
    border: 1px solid rgba(31, 41, 55, 0.95);
    padding: 1.25rem 1.4rem 1.3rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
}

.modal__close:hover {
    color: #e5e7eb;
}

.modal__title {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.modal__text {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.9rem;
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.modal__form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.modal__form-group label {
    color: #e5e7eb;
}

.modal__form-group input {
    background: #020617;
    border-radius: 0.75rem;
    border: 1px solid #1f2937;
    padding: 0.45rem 0.75rem;
    color: #f9fafb;
    font-size: 0.85rem;
    outline: none;
}

.modal__form-group input:focus {
    border-color: #f97316;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero__content {
        grid-template-columns: 1fr;
    }

    .productos__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        inset: 56px 0 auto 0;
        background: rgba(3, 7, 18, 0.98);
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .nav.open {
        transform: translateY(0%);
        opacity: 1;
        pointer-events: auto;
    }

    .menu-btn {
        display: inline-flex;
    }

    .hero {
        padding-top: 1.5rem;
    }

    .filters__content {
        flex-direction: column;
        align-items: stretch;
    }

    .productos__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .productos__grid {
        grid-template-columns: 1fr;
    }

    .footer__content {
        flex-direction: column;
        align-items: flex-start;
    }
}
