@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    transition: opacity 0.6s ease;
}

body.loading {
    overflow: hidden !important;
}

body.dark .preloader {
    background: var(--bg-dark);
}

.preloader-content {
    text-align: center;
}

.spinner-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    border-radius: 18px;
}

.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(241, 136, 5, 0.1);
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.toast.error {
    background: #ef4444;
    color: white;
}

.preloader-content p {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.5;
}

body.dark .preloader-content p {
    color: white;
}

@keyframes loading {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

:root {
    --primary: #001A41;
    --primary-light: #003078;
    --secondary: #F18805;
    --secondary-hover: #D67804;
    --accent: #FFA533;
    
    --bg-light: #F0F4F8;
    --text-light: #1E293B;
    --card-light: rgba(255, 255, 255, 0.8);
    --border-light: rgba(226, 232, 240, 0.5);
    
    --bg-dark: #05080A;
    --text-dark: #F1F5F9;
    --card-dark: rgba(22, 27, 34, 0.8);
    --border-dark: rgba(48, 54, 61, 0.5);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px 0 rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: var(--transition);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.blob {
    position: fixed;
    width: 400px;
    height: 400px;
    opacity: 0.15;
    filter: blur(80px);
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    animation: pulse 10s infinite alternate;
}

body.dark .blob {
    opacity: 0.05; /* Mucho más sutil en modo oscuro para que no ensucie el fondo negro */
}

.blob-1 { 
    top: -100px; 
    left: -100px; 
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%); 
}
.blob-2 { 
    bottom: -100px; 
    right: -100px; 
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%); 
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(50px, 50px); }
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Floating Navbar (Pill Shape) */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateX(-50%) translateY(-2px);
}

.nav-content {
    padding: 0 30px;
    width: 100%;
}

body.dark nav {
    background: rgba(13, 17, 23, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links {
    display: flex;
    gap: 25px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 100px;
    transition: var(--transition);
    background: transparent;
}

body.dark .nav-links a {
    color: white;
}

.nav-links a:hover {
    background: rgba(241, 136, 5, 0.1);
    color: var(--secondary);
}

.nav-links a.active {
    background: var(--secondary);
    color: white !important;
    box-shadow: 0 4px 10px rgba(241, 136, 5, 0.3);
}

@media (max-width: 1024px) {
    .nav-links { display: none; }
}

.close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

body.dark .close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .nav-btn {
    color: white;
}

.cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--secondary);
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

body.dark .cart-btn .cart-count {
    border-color: var(--bg-dark);
}


.nav-search {
    display: flex;
    align-items: center;
    background: rgba(0, 26, 65, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    gap: 10px;
    width: 300px;
    transition: var(--transition);
}

body.dark .nav-search {
    background: rgba(255, 255, 255, 0.1);
}

.nav-search:focus-within {
    background: white;
    box-shadow: var(--shadow);
}

.nav-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    color: var(--text-light);
    font-size: 0.9rem;
}

body.dark .nav-search input {
    color: white;
}

.nav-search:focus-within {
    background: white;
    box-shadow: var(--shadow);
}

.nav-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    color: var(--text-light);
    font-size: 0.9rem;
}

body.dark .nav-search input {
    color: white;
}

.nav-socials {
    display: flex;
    gap: 12px;
}

.nav-socials a {
    color: var(--primary);
    opacity: 0.7;
    transition: var(--transition);
}

body.dark .nav-socials a {
    color: white;
}

.nav-socials a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.nav-divider {
    width: 1px;
    height: 30px;
    background: var(--border-light);
}

@media (max-width: 900px) {
    .nav-search { width: 180px; }
    .nav-socials { display: none; }
}

@media (max-width: 600px) {
    .nav-search { display: none; }
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    text-align: center;
    background: linear-gradient(rgba(0, 26, 65, 0.8), rgba(0, 26, 65, 0.4)), url('assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}


.hero-shipping {
    margin-top: 40px;
}

.hero-shipping p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 28px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.badge i {
    color: var(--secondary);
}

.badge.highlight {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.badge.highlight i {
    color: white;
}

.badge:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}


.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    transform: skewY(-2deg);
    transition: var(--transition);
}

body.dark .hero::after {
    background: var(--bg-dark);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 1s ease;
}

/* Product Grid */
.products-section {
    padding: 80px 0 20px 0;
    scroll-margin-top: 100px;
}

.about-section {
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    background: var(--card-light);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

body.dark .about-section {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 5px 25px 5px; /* Espacio extra para que no se corten las sombras ni el botón al hacer hover */
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 16px;
    background: var(--card-light);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

body.dark .filter-btn {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    color: var(--text-dark);
}

.filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 6px 15px rgba(241, 136, 5, 0.35);
}

body.dark .filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 6px 15px rgba(241, 136, 5, 0.3);
}

.filter-btn:hover:not(.active) {
    background: rgba(241, 136, 5, 0.1);
    color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    animation: fadeInUp 0.5s ease forwards;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce-icon 2s infinite;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-state p {
    opacity: 0.6;
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes bounce-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Product Card */
.product-card {
    background: var(--card-light);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.dark .product-card {
    background: var(--card-dark);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.card-image {
    width: 100%;
    height: 230px; 
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

body.dark .card-image {
    background: #111827;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que se vea el producto completo sin cortarse */
    transition: transform 0.5s ease;
    padding: 10px; /* Un poco de aire para que no pegue a los bordes */
}

.product-card:hover .card-image img {
    transform: scale(1.08);
}

.card-admin-actions, .admin-toggle {
    display: none !important;
}

body.is-admin .card-admin-actions, 
body.is-admin .admin-toggle {
    display: flex !important;
}

.card-admin-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.card:hover .card-admin-actions {
    opacity: 1;
}

.edit-btn, .delete-product-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.edit-btn {
    background: rgba(0, 59, 92, 0.9);
}

.delete-product-btn {
    background: rgba(239, 68, 68, 0.9);
}

.edit-btn:hover { background: var(--primary); }
.delete-product-btn:hover { background: #ef4444; }

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f1f1f1;
}

/* Estilos del Contenido de la Tarjeta */
.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
}

.category-tag {
    color: var(--secondary);
    background: rgba(241, 136, 5, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark .category-tag {
    background: rgba(241, 136, 5, 0.15);
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    color: var(--text-light);
}

body.dark .product-title {
    color: var(--text-dark);
}

.product-description {
    font-size: 0.85rem;
    opacity: 0.6;
    margin: 5px 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.5em;
}

body.dark .product-description {
    color: var(--text-dark);
    opacity: 0.5;
}

.card-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 10px;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

body.dark .price {
    color: #fff;
}

/* Botón de la Tarjeta */
.product-card .btn-primary {
    background: var(--secondary);
    color: white;
    border: none;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.product-card .btn-primary:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.old-price {
    text-decoration: line-through;
    color: #94A3B8;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(241, 136, 5, 0.3);
}

.whatsapp-btn {
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-light);
    width: 100%;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

body.dark .modal {
    background: #0d1117;
    border: 1px solid var(--border-dark);
}

/* Detalle de Producto Grid */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

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

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn-share {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-share:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

body.dark .btn-share {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.color-option.active {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 0 3px rgba(241, 136, 5, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 1rem;
    box-sizing: border-box;
}

body.dark .form-control {
    border: 1px solid var(--border-dark);
    background: #1C2128;
    color: var(--text-dark);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 45, 91, 0.3);
}

/* Utils */
.theme-toggle, .admin-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 26, 65, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

body.dark .theme-toggle, body.dark .admin-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.theme-toggle:hover, .admin-toggle:hover {
    transform: rotate(15deg);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; padding: 0 10px; }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .modal {
        padding: 25px;
    }
}

.cat-chip {
    background: var(--border-light);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

body.dark .cat-chip {
    background: var(--border-dark);
}

.cat-chip button {
    color: #ef4444;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

footer {
    background: var(--bg-light);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
}

body.dark footer {
    background: var(--bg-dark);
    border-top-color: var(--border-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

body.dark .footer-links a {
    color: white;
}

.footer-links a:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}

/* Footer Social Links */
.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 100px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    font-weight: 600;
    transition: all 0.3s ease;
}

body.dark .social-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-dark);
    color: white;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.social-link.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
    color: white;
    border-color: transparent;
}

.social-link.mercadolibre:hover {
    background: #fff159;
    color: #333;
    border-color: #fff159;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.legal-links a {
    color: var(--text-light);
    opacity: 0.7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

body.dark .legal-links a {
    color: white;
}

.legal-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
}

@media (max-width: 768px) {
    .footer-socials {
        flex-direction: column;
        align-items: center;
        gap: 15px !important;
    }
    
    .legal-links {
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }
}

/* Main Footer */
.main-footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-light);
    text-align: center;
    background: var(--card-light);
    transition: var(--transition);
}

body.dark .main-footer {
    background: var(--bg-dark);
    border-top-color: var(--border-dark);
    color: var(--text-dark);
}
/* Product Detail Modal */
.product-modal {
    max-width: 900px;
    width: 95%;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.product-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

.product-modal-img-wrap {
    position: relative;
    background: var(--bg-light);
    overflow: hidden;
}

body.dark .product-modal-img-wrap {
    background: #0d1117;
}

.product-modal-info {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
}

/* Image Zoom Overlay on Card */
.card-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.card-img-overlay i {
    width: 40px;
    height: 40px;
}

.card:hover .card-img-overlay {
    opacity: 1;
}

@media (max-width: 640px) {
    .product-modal-layout {
        grid-template-columns: 1fr;
    }
    .product-modal-info {
        padding: 24px 20px;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none; /* Let clicks pass through empty space */
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-light);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    pointer-events: auto; /* Enable clicks on toast itself */
    animation: toast-slide-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 300px;
}

body.dark .toast {
    background: var(--card-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.toast.toast-success i {
    color: #10b981; /* Green */
}

.toast.toast-error i {
    color: #ef4444; /* Red */
}

.toast.toast-info i {
    color: var(--secondary); /* Orange */
}

.toast.toast-hiding {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- Admin Login Screen --- */
.admin-login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 32px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease;
}

.login-card img {
    height: 90px;
    margin-bottom: 25px;
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-card p {
    margin-bottom: 30px;
    opacity: 0.7;
    font-size: 0.95rem;
}

.login-input {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
    transition: var(--transition);
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
    outline: none;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.login-error {
    color: #ef4444;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

.back-to-shop {
    display: block;
    margin-top: 30px;
    color: white;
    opacity: 0.5;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
}

.back-to-shop:hover {
    opacity: 1;
    transform: translateX(-5px);
}

/* --- Panel Administrativo (Admin Panel Styles) --- */
.admin-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Outfit', sans-serif;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--card-light);
    backdrop-filter: blur(10px);
    padding: 25px 40px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 20px;
    transition: var(--transition);
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.admin-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-card {
    background: var(--card-light);
    padding: 35px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: var(--transition);
}

.admin-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--primary);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: start;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-admin {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-admin label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    color: var(--primary);
}

.admin-variants-box {
    margin-top: 20px;
    border: 2px dashed var(--border-light);
    padding: 20px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.02);
}

.variant-row {
    display: grid;
    grid-template-columns: 180px 120px 1fr 80px 48px;
    gap: 15px;
    margin-bottom: 12px;
    align-items: flex-end;
    background: white;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.variant-row:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow);
}

.v-preview-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    background: #f1f5f9;
}

.v-color-picker-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: white;
    flex-shrink: 0;
}

body.dark .v-color-picker-wrapper {
    background: #1f2937;
    border-color: #374151;
}

.v-file-trigger {
    background: rgba(0, 45, 91, 0.08) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0, 45, 91, 0.1) !important;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.v-file-trigger:hover {
    background: rgba(0, 45, 91, 0.15) !important;
    transform: translateY(-2px);
}

body.dark .v-file-trigger {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.admin-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    background: white;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.admin-item:hover {
    transform: translateX(5px);
    border-color: var(--secondary);
    box-shadow: var(--shadow);
}

.admin-item img {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    object-fit: cover;
}

.admin-item-info {
    flex: 1;
}

.admin-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.admin-item-meta {
    font-size: 0.85rem;
    opacity: 0.6;
    font-weight: 500;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
}

.tasa-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    height: 50px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.tasa-container input {
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 1.1rem;
    width: 80px;
    color: var(--primary);
}

.tasa-container input:focus {
    outline: none;
}

/* Modals Admin */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal-content {
    background: var(--card-light);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 32px;
    padding: 45px;
    position: relative;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-close {
    position: absolute;
    right: 25px;
    top: 25px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.admin-modal-close:hover {
    background: #ef4444 !important;
    color: white !important;
}

body.dark .admin-modal-close {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Admin Specific Buttons */
[class^="btn-admin-"] {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-weight: 700;
}

.btn-admin-view {
    width: auto !important;
    padding: 0 22px;
    gap: 8px;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-admin-theme { background: rgba(245, 158, 11, 0.1) !important; color: #d97706 !important; border-color: rgba(245, 158, 11, 0.2) !important; }
.btn-admin-view { background: rgba(16, 185, 129, 0.1) !important; color: #059669 !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.btn-admin-logout { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; border-color: rgba(239, 68, 68, 0.2) !important; }
.btn-admin-sync { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; border-color: rgba(59, 130, 246, 0.2) !important; }

[class^="btn-admin-"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-item-visible { background: rgba(16, 185, 129, 0.05) !important; color: #059669 !important; border: 1px solid rgba(16, 185, 129, 0.1) !important; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.btn-item-edit { background: rgba(71, 85, 105, 0.05) !important; color: #475569 !important; border: 1px solid rgba(71, 85, 105, 0.1) !important; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.btn-item-delete { background: rgba(239, 68, 68, 0.12) !important; color: #dc2626 !important; border: 1px solid rgba(239, 68, 68, 0.2) !important; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }

/* Dark mode specific for Admin */
body.dark .admin-header,
body.dark .admin-card,
body.dark .admin-modal-content {
    background: #111827;
    border-color: #1f2937;
}

body.dark .admin-header h1,
body.dark .admin-card h3,
body.dark .admin-item-name {
    color: white;
}

body.dark .admin-item,
body.dark .variant-row,
body.dark .tasa-container {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

body.dark .tasa-container input {
    color: white;
}

body.dark .admin-item-name { color: white; }
body.dark .form-group-admin label { color: white; opacity: 0.7; }

body.dark .btn-admin-theme { background: rgba(251, 191, 36, 0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(251, 191, 36, 0.3) !important; }
body.dark .btn-admin-view { background: rgba(16, 185, 129, 0.15) !important; color: #34d399 !important; border: 1px solid rgba(16, 185, 129, 0.3) !important; }
body.dark .btn-admin-logout { background: rgba(239, 68, 68, 0.15) !important; color: #f87171 !important; border: 1px solid rgba(239, 68, 68, 0.3) !important; }
body.dark .btn-admin-sync { background: rgba(59, 130, 246, 0.15) !important; color: #60a5fa !important; border: 1px solid rgba(59, 130, 246, 0.3) !important; }

body.dark .btn-item-visible { background: #059669 !important; color: white !important; border: none !important; }
body.dark .btn-item-edit { background: #475569 !important; color: white !important; border: none !important; }
body.dark .btn-item-delete { background: #dc2626 !important; color: white !important; border: none !important; }

body.dark .admin-variants-box { border-color: #374151; background: rgba(255,255,255,0.02); }

#rate-input::-webkit-inner-spin-button, 
#rate-input::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
#rate-input { 
    appearance: textfield;
    -moz-appearance: textfield; 
}

/* Admin Primary Buttons Refinement */
.admin-card .btn-primary, 
.admin-modal-content .btn-primary {
    background: var(--secondary) !important;
    color: white !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition) !important;
}

.admin-card .btn-primary:hover,
.admin-modal-content .btn-primary:hover {
    background: var(--secondary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(241, 136, 5, 0.3) !important;
}

body.dark .admin-card .btn-primary,
body.dark .admin-modal-content .btn-primary {
    box-shadow: 0 4px 15px rgba(241, 136, 5, 0.2) !important;
}

/* Fix for the small "+" category button */
.admin-card .btn-primary[style*="border-radius:12px"],
.admin-modal-content .btn-primary[style*="border-radius:12px"] {
    width: 48px !important;
    padding: 0 !important;
    font-size: 1.4rem !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.admin-card .form-control:not(textarea),
.admin-modal-content .form-control:not(textarea) {
    height: 48px !important;
    box-sizing: border-box !important;
}

.admin-card textarea.form-control,
.admin-modal-content textarea.form-control {
    height: auto !important;
    padding: 12px 16px !important;
    min-height: 80px;
    border-radius: 12px !important;
    resize: vertical;
}

.admin-card .form-control,
.admin-modal-content .form-control {
    font-weight: 600 !important;
    color: #000 !important;
}

body.dark .admin-card .form-control,
body.dark .admin-modal-content .form-control {
    color: #fff !important;
}

/* Elegant Admin Selects */
.admin-card select.form-control,
.admin-modal-content select.form-control {
    cursor: pointer;
    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='%23666666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 30px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    line-height: 1.2 !important;
    font-size: 0.9rem !important;
}

body.dark select.form-control {
    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='%23999999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Admin Tabs & Navigation */
.admin-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 25px;
}

.btn-nav {
    position: relative;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 12px 12px 0 0;
}

.btn-nav.active {
    color: var(--primary);
    background: rgba(0, 45, 91, 0.05);
}

body.dark .btn-nav {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .btn-nav.active {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-nav::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.btn-nav.active::after {
    width: 100%;
}

/* Orders Styling */
.admin-order-card {
    transition: var(--transition);
}

.admin-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

body.dark .admin-order-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

body.dark .admin-order-card div {
    color: white;
}

body.dark .admin-order-card .status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Stock Badge Refinement */
#modal-stock-badge {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.wishlist-btn:hover {
    transform: scale(1.1);
    color: #ef4444 !important;
}

.wishlist-btn.active {
    color: #ef4444 !important;
}

.wishlist-btn.active i {
    fill: #ef4444;
}

body.dark .wishlist-btn {
    background: rgba(13, 17, 23, 0.8) !important;
    color: #4b5563 !important;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

body.dark .modal-price {
    color: white;
}

.size-option {
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
    background: #f8fafc;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #64748b;
}

body.dark .size-option {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.size-option:hover {
    background: #f1f5f9;
    color: var(--primary);
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.size-option.active {
    background: var(--secondary) !important;
    color: white !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 8px 20px rgba(241, 136, 5, 0.3);
}

/* Stock Badge on Card */
.stock-badge-card {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #10b981;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark .stock-badge-card {
    background: rgba(31, 41, 55, 0.9);
}

.stock-badge-card.out-of-stock {
    color: #ef4444;
}

/* Main Search Bar Styling */
.search-main {
    width: 100%;
    max-width: 500px;
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-main:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(241, 136, 5, 0.1);
}

body.dark .search-main {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

body.dark .search-main input {
    color: white !important;
}

body.dark .search-main i {
    color: rgba(255, 255, 255, 0.4);
}

