:root {
    --primary: #000000;
    --secondary: #8a2be2;
    --accent: #9d00ff;
    --text: #ffffff;
    --text-muted: #b0b0b0;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-card: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
    --font-main: 'Rubik', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--primary);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a0b2e 0%, #000000 100%);
    opacity: 0.8;
}

.bg-pattern::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Glassmorphism */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-card);
    border-radius: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(138, 43, 226, 0.1);
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    text-shadow: 0 0 8px var(--secondary), 0 0 15px var(--secondary);
    filter: drop-shadow(0 0 5px var(--secondary));
}

.cart-nav-btn {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-nav-btn:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 8rem;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(90deg, #fff 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    filter: drop-shadow(0 0 30px rgba(138, 43, 226, 0.3));
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Services */
.services {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}


.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Order Form */
.order-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
}

.order-info h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.features-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icon-check {
    color: var(--secondary);
    font-weight: bold;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
}

.form-group select option {
    background: #1a0b2e;
    color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.file-input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

.file-input {
    padding: 0.8rem !important;
    cursor: pointer;
}

.file-input::-webkit-file-upload-button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    margin-right: 1rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

.file-input::-webkit-file-upload-button:hover {
    background: var(--accent);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: block;
}

.w-full {
    width: 100%;
}

/* Catalog Specific Styles */
.catalog-header {
    padding: 12rem 2rem 4rem;
    /* Increased padding */
    text-align: center;
    background: radial-gradient(circle at 50% 100%, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
}

.catalog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 50px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--secondary);
    color: white;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 8rem;
    padding: 0 2rem;
}

.product-card {
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    height: 3rem;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    color: var(--text);
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden by default on mobile unless active */
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    /* Subido un poco */
    padding: 0;
    width: 95%;
    max-width: 800px;
    overflow: hidden;
    animation: modalSlideDown 0.4s ease;
    border-radius: 20px;
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 2rem;
    top: 1.5rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: white;
    transform: rotate(90deg);
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

.modal-preview-side {
    background: rgba(138, 43, 226, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-card);
}

.modal-preview-side img {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.modal-form-side {
    padding: 3rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section label,
.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-section label i,
.form-group label i {
    margin-right: 8px;
    color: var(--secondary);
}

.pill-selector {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.pill:hover {
    background: rgba(138, 43, 226, 0.2);
}

.pill.active {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 150px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

#qty-input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Remove spin buttons */
#qty-input::-webkit-inner-spin-button,
#qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-animate:active {
    transform: scale(0.95);
}

/* Mobile Responsive Bundle */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 3rem !important;
    }

    .hero-btns {
        justify-content: center;
        flex-direction: column;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 300px;
    }

    .order-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 5, 20, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        display: none !important;
        /* Hidden unless active */
        gap: 2.5rem;
    }

    .nav-links.active {
        display: flex !important;
        right: 0;
    }

    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 35px;
        height: 35px;
        cursor: pointer;
        z-index: 2100;
        background: rgba(138, 43, 226, 0.1);
        border: 1px solid var(--border-card);
        border-radius: 8px;
    }

    .mobile-menu-btn span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        transition: 0.3s;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .modal-body-grid {
        grid-template-columns: 1fr;
    }

    .modal-preview-side {
        padding: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--border-card);
    }

    .modal-form-side {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .catalog-header h1 {
        font-size: 2.2rem !important;
    }

    .hero-btns {
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .nav-logo {
        height: 30px;
    }

    .cart-sidebar {
        width: 100% !important;
    }

    .close-modal {
        right: 1.5rem;
        top: 1rem;
        font-size: 2rem;
    }

    .pill {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* --- Global Components (Post-Responsive) --- */

/* Cart Sidebar Global */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    z-index: 2500;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: rgba(5, 2, 10, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-card);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-cart {
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--secondary);
    transform: rotate(90deg);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding-right: 10px;
}

.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: 10px;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-card);
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-card);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: #fff;
}

.cart-item-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.remove-item {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    display: inline-block;
    transition: var(--transition);
}

.remove-item:hover {
    color: #ff3333;
    text-decoration: underline;
}

.cart-footer {
    border-top: 1px solid var(--border-card);
    padding-top: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* Footer Global */
footer {
    background: #050505;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border-card);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-contact h3,
.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.footer-contact i {
    color: var(--secondary);
    width: 20px;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    font-size: 1.6rem;
    color: var(--text-muted);
}

.social-icons a:hover {
    color: var(--secondary);
    transform: translateY(-5px);
    text-shadow: 0 0 15px var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-card);
    color: var(--text-muted);
    font-size: 0.85rem;
}