@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #1e293b, #020617 80%) !important;
    background-attachment: fixed !important;
    color: #e2e8f0;
    font-family: "Outfit", system-ui, sans-serif;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

.navbar {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.catalogo-hero {
    position: relative;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.1), transparent 50%);
    border-radius: 0 0 40px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.catalogo-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPjxyZWN0IHdpZHRoPSI0IiBoZWlnaHQ9IjQiIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPjwvc3ZnPg==');
    opacity: 0.5;
    z-index: -1;
}

.catalogo-hero h1 {
    max-width: 650px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.catalogo-hero .lead {
    max-width: 560px;
    color: #94a3b8 !important;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.catalogo-hero .hero-pasos {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.catalogo-hero .buscador-catalogo {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.catalogo-hero .text-warning,
footer .text-warning {
    color: #f59e0b !important;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.hero-pasos {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 0.9rem;
}

.hero-pasos span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: default;
}

.hero-pasos span:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-pasos b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.buscador-catalogo {
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.buscador-catalogo .input-group-text {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 14px 0 0 14px;
    color: #f59e0b;
}

.buscador-catalogo input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-radius: 0 14px 14px 0;
    color: #fff !important;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.buscador-catalogo input:focus {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: none;
    border-color: #f59e0b;
}

.buscador-catalogo input::placeholder {
    color: #64748b;
}

.btn {
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-warning:disabled {
    background: #334155;
    color: #94a3b8 !important;
    box-shadow: none;
}

.btn:focus-visible, input:focus-visible {
    outline: 3px solid rgba(245, 158, 11, 0.5);
    outline-offset: 3px;
}

/* Category Filters */
#categoriasCatalogo {
    padding: 12px 0;
    scrollbar-width: none;
    margin-bottom: 20px;
}
#categoriasCatalogo::-webkit-scrollbar { display: none; }

.filtro-categoria {
    padding: 10px 22px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Replace btn-dark and btn-outline-dark for our dark theme */
.btn-dark {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
.filtro-categoria.btn-dark {
    transform: translateY(-2px);
}

.btn-outline-dark {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.05);
}
.btn-outline-dark:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
}

/* Badges */
.text-bg-warning {
    background: rgba(245, 158, 11, 0.8) !important;
    color: #fff !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.text-bg-dark {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #e2e8f0 !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Cards */
.producto-catalogo .card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
    animation: fadeIn 0.6s ease-out both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.producto-catalogo:nth-child(2) .card { animation-delay: 0.05s; }
.producto-catalogo:nth-child(3) .card { animation-delay: 0.1s; }
.producto-catalogo:nth-child(4) .card { animation-delay: 0.15s; }
.producto-catalogo:nth-child(5) .card { animation-delay: 0.2s; }
.producto-catalogo:nth-child(6) .card { animation-delay: 0.25s; }

.producto-imagen {
    height: 240px;
    position: relative;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.producto-catalogo .card:hover .producto-imagen img {
    transform: scale(1.15) rotate(3deg);
}

.producto-catalogo .card-body {
    padding: 22px;
}

.producto-catalogo .card .text-muted {
    color: #94a3b8 !important;
}

.producto-catalogo h3 {
    line-height: 1.3;
    color: #f8fafc;
    font-size: 1.15rem;
    font-weight: 700;
}

.producto-descripcion {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 10px 0 20px;
}

.btn-agregar-carrito {
    min-height: 46px;
    font-size: 1rem;
}

#cantidadResultados {
    font-size: 0.95rem;
    color: #94a3b8 !important;
}

#sinResultados {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    color: #cbd5e1;
}

@media (hover: hover) {
    .producto-catalogo .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.15) !important;
        border-color: rgba(245, 158, 11, 0.4) !important;
    }
}

/* Offcanvas Cart styling */
#carritoOffcanvas {
    --bs-offcanvas-width: 460px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-shadow: -10px 0 50px rgba(0,0,0,0.5);
}

#carritoOffcanvas .offcanvas-header {
    background: transparent;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#carritoOffcanvas .offcanvas-body {
    padding: 24px 30px;
}

#carritoOffcanvas .btn-close {
    filter: invert(1) opacity(0.6);
    transition: all 0.3s ease;
}
#carritoOffcanvas .btn-close:hover {
    filter: invert(1) opacity(1);
    transform: rotate(90deg);
}

#contenidoCarrito .border-bottom {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#contenidoCarrito .text-muted {
    color: #94a3b8 !important;
}

#contenidoCarrito .btn {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Cart Buttons */
.btn-success {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-success:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #28E16D, #25D366);
    color: #fff;
}
.btn-success:disabled {
    background: #1e293b;
    color: #64748b !important;
    box-shadow: none;
}

.btn-outline-success {
    border: 2px solid #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.05);
}
.btn-outline-success:hover:not(:disabled) {
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}
.btn-outline-success:disabled {
    border-color: rgba(255,255,255,0.1);
    color: #64748b;
    background: transparent;
}

.btn-outline-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
.btn-outline-danger:hover:not(:disabled) {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

footer {
    background: rgba(2, 6, 23, 0.8) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
}

footer > .container {
    padding-top: 40px;
    padding-bottom: 40px;
}

footer .text-white-50 {
    color: #94a3b8 !important;
}

@media (max-width: 575.98px) {
    .catalogo-hero { border-radius: 0 0 30px 30px; }
    .catalogo-hero h1 { font-size: 2.2rem; }
    .buscador-catalogo { padding: 20px; }
    .producto-descripcion { font-size: 0.8rem; margin: 8px 0 16px; }
    .producto-imagen { height: 180px; }
    .producto-imagen img { padding: 16px; }
    .producto-catalogo .card-body { padding: 18px; }
    .producto-catalogo h3 { font-size: 1.05rem; }
    #carritoOffcanvas { --bs-offcanvas-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .producto-catalogo .card,
    .producto-imagen img,
    .btn,
    .catalogo-hero h1,
    .catalogo-hero .lead,
    .catalogo-hero .hero-pasos,
    .catalogo-hero .buscador-catalogo {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
