:root {
    --primary: #FF4500;
    --secondary: #002d62;
    --accent: #22C55E;
    --bg-light: #f4f6f8;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-dim: #718096;
    --border: #e2e8f0;
    --gold: #FACC15;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--secondary);
    cursor: pointer;
    text-transform: uppercase;
}

.logo span {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 400px;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    outline: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.search-container input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #002d62 0%, #00122e 100%);
    margin-top: 70px;
}

.hero-img {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 90%;
    object-fit: contain;
    z-index: 1;
    opacity: 0.8;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    padding: 0 5%;
    color: #fff;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
}

/* Featured Badges */
.featured-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 1rem;
}

/* Categories Bar */
.categories-container {
    background: #fff;
    padding: 1.5rem 5%;
    position: sticky;
    top: 70px;
    z-index: 900;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.categories {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: center;
}

.category-pill {
    padding: 0.6rem 1.5rem;
    background: #f1f5f9;
    border: 1px solid transparent;
    color: var(--text-dim);
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.2);
}

/* Product Grid */
.catalog-section {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title i {
    color: var(--primary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* E-commerce Card */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transform: translateY(-3px);
}

.card-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 3rem;
    overflow: hidden;
}

.card-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #f1f5f9;
    color: var(--text-dim);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.super-promo-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.price-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.card-old-price {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.card-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-buy {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-buy:hover {
    background: #e63e00;
}

.btn-secondary {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    transition: 0.4s ease;
    padding: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.close-btn {
    font-size: 2rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text);
}

.cart-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: left;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-content h2 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    font-size: 0.95rem;
}

.modal-content input:focus,
.modal-content select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 500;
    transition: 0.3s;
    cursor: pointer;
}

.floating-wa:hover {
    transform: scale(1.1);
}

/* Formulario Crédito Banner */
.credit-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    border-radius: 24px;
    padding: 3rem;
    margin: 4rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.credit-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.credit-info h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.credit-info p {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

.btn-credit {
    background: #fff;
    color: #0f172a;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-credit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Footer & Legal */
footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-col p,
.footer-col a {
    color: var(--text-dim);
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Responsive Layouts */
@media (max-width: 1024px) {
    .search-container {
        width: 300px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .search-container {
        width: 100%;
        order: 3;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        margin-top: 140px;
        /* space for taller header */
        height: auto;
        padding: 3rem 0;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-img {
        display: none;
        /* Hide 3D element on small mobile or shrink it */
    }

    .scene-3d {
        display: none;
        /* Hide 3D item on small mobile for better performance/layout */
    }

    .categories-container {
        top: 140px;
        /* space for taller header */
        padding: 1rem;
    }

    .categories {
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .credit-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        margin: 2rem 1rem;
    }

    .credit-banner::before {
        width: 200px;
        height: 200px;
        right: -20%;
        top: -20%;
    }

    .cart-sidebar {
        width: 100%;
        border-radius: 0;
        padding: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
        margin-top: 10vh;
        max-height: 85vh;
        overflow-y: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-grid {
        gap: 2rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .upload-zone {
        padding: 1.5rem;
    }

    .table-responsive {
        border: 0;
    }

    table {
        min-width: 800px;
        /* force scroll on mobile */
    }
}

@media (max-width: 480px) {

    .btn-buy,
    .btn-secondary,
    .btn-credit {
        width: 100%;
    }

    .nav-actions button {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}