:root {
    --bg-main: #12151a;
    --bg-card: #1b2028;
    --bg-plomo: #282e39;
    --plomo-claro: #3a4252;
    --accent: #f3f3f3;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--bg-plomo);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 1px;
    font-weight: 700;
    max-width: 55%;
    line-height: 1.2;
}

/* NAVEGACIÓN PRINCIPAL (Asegura que no flote ni se quede abierto) */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav a {
    color: var(--text-main) !important;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a:visited,
.main-nav a:active {
    color: var(--accent) !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right a {
    color: var(--text-main) !important;
    text-decoration: none;
}

.header-right a:hover {
    color: var(--accent) !important;
}

.search {
    background: var(--bg-plomo);
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.search:focus-within {
    border-color: var(--accent);
}

.search input {
    background: none;
    border: none;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
}

.search .clear {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.search .clear:hover {
    color: var(--text-main);
}

.cart-btn {
    cursor: pointer;
    background: var(--bg-plomo);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--plomo-claro);
    transition: all 0.3s;
}

.cart-btn:hover {
    background: var(--plomo-claro);
    border-color: var(--accent);
}

/* SECCIÓN CATÁLOGO Y FILTROS */
.catalog-section {
    padding: 50px 20px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.catalog-header {
    text-align: center;
    margin-bottom: 35px;
}

.catalog-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.catalog-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.filter-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.filter-nav span {
    background: var(--bg-card);
    border: 1px solid var(--bg-plomo);
    padding: 9px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.filter-nav span:hover {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* GRILLA Y TARJETAS */
.container {
    width: 100%;
}

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

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-plomo);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

/* SOLUCIÓN IMÁGENES DE TARJETAS: Usar contain para que no se recorten ni estiren */
.card img {
    width: 100%;
    height: 210px;
    object-fit: contain; 
    object-position: center;
    border-radius: 10px;
    margin-bottom: 15px;
    background: var(--bg-main); /* Cambiado a var(--bg-main) para mejor contraste en imágenes PNG o con fondo transparente */
    padding: 10px; /* Añade un respiro interno para que el reloj no pegue con los bordes */
}

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.card .price {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 15px;
}

.card .btn-add-cart {
    background: var(--bg-plomo);
    color: var(--text-main);
    border: 1px solid var(--plomo-claro);
    padding: 11px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.card .btn-add-cart:hover {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}

/* MODAL MEJORADO (Estética Gris Plomo Elegante) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--plomo-claro);
    border-radius: 16px;
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    animation: modalScale 0.3s ease;
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    background: var(--bg-plomo);
    color: var(--text-main);
    border: 1px solid var(--plomo-claro);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}

.modal-body {
    display: flex;
    gap: 40px;
    padding: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Carrusel dentro del modal */
.carousel-container {
    flex: 1;
    min-width: 280px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-main);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--bg-plomo);
}

/* SOLUCIÓN IMÁGENES DEL MODAL */
.carousel-container img {
    width: 100%;
    height: 320px; /* Cambiado de max-height a height fija para mantener consistencia */
    object-fit: contain; /* Evita que el reloj se estire o recorte */
    object-position: center;
    border-radius: 8px;
}

.carousel-btn {
    position: absolute;
    background: rgba(40, 46, 57, 0.9);
    color: var(--text-main);
    border: 1px solid var(--plomo-claro);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* Información del producto en el modal */
.modal-info {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--text-main);
}

.modal-price {
    font-size: 1.4rem;
    color: var(--accent);
    font-weight: 600;
}

.modal-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--accent);
    margin-top: 10px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-specs-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-specs-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid var(--bg-plomo);
    display: flex;
    align-items: center;
}

.modal-specs-list li::before {
    content: "▪";
    color: var(--accent);
    margin-right: 8px;
    font-size: 1rem;
}

.btn-modal-add {
    background: var(--accent);
    color: var(--bg-main);
    border: none;
    padding: 13px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-modal-add:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* CARRITO LATERAL */
.cart {
    position: fixed;
    right: -420px;
    top: 0;
    width: 390px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--bg-plomo);
    box-shadow: -15px 0 40px rgba(0,0,0,0.6);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.cart.open {
    right: 0;
}

.cart h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-right: 5px;
}

.item {
    background: var(--bg-main);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--bg-plomo);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.cart-footer {
    border-top: 1px solid var(--bg-plomo);
    padding-top: 20px;
}

.total {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.cart-footer button {
    width: 100%;
    background: var(--accent);
    color: var(--bg-main);
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.cart-footer button:hover {
    opacity: 0.9;
}

.btn-danger {
    background: transparent !important;
    color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    margin-bottom: 15px;
    padding: 9px !important;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.7);
    backdrop-filter: blur(3px);
    z-index: 900;
}

.overlay.show {
    display: block;
}

/* TOAST Y ANIMACIÓN VOLADORA */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent);
    color: var(--bg-main);
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2000;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

/* SOLUCIÓN ANIMACIÓN VOLADORA AL CARRITO */
.fly {
    position: fixed;
    z-index: 9999;
    width: 60px;
    height: 60px;
    object-fit: contain; /* Evita que la foto voladora se estire */
    background: var(--bg-main);
    border-radius: 50%;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 2px solid var(--accent);
    padding: 5px;
}

footer {
    text-align: center;
    padding: 35px;
    background: var(--bg-card);
    border-top: 1px solid var(--bg-plomo);
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a.dev-link {
    color: var(--accent);
    text-decoration: none;
}

footer a.dev-link:hover {
    text-decoration: underline;
}

/* ESTILOS PARA EL INDEX (HERO, PROCESO, NOSOTROS Y CONTACTO) */

html {
    scroll-behavior: smooth;
}

/* SECCIÓN HERO */
.hero-section {
    height: 85vh;
    background: linear-gradient(rgba(18, 21, 26, 0.8), rgba(18, 21, 26, 0.9)), 
                url('img/166.jpeg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--bg-plomo);
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.2rem;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
}

.btn-hero {
    background: rgb(88, 2, 2);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.3s, transform 0.2s;
    display: inline-block;
   
}

.btn-hero:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* SECCIÓN PROCESO */
.process-section {
    padding: 100px 20px;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--bg-plomo);
}

.process-container {
    max-width: 1200px;
    margin: 0 auto;
}

.process-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 50px;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.process-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-plomo);
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transition: transform 0.3s, border-color 0.3s;
}

.process-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.process-card span {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
}

.process-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* SECCIÓN NOSOTROS */
.about-section {
    padding: 100px 20px;
    background-color: var(--bg-card);
    text-align: center;
    border-bottom: 1px solid var(--bg-plomo);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.brands-banner {
    background: var(--bg-main);
    border: 1px solid var(--bg-plomo);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.brands-banner p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.brands-list {
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: var(--text-main);
    letter-spacing: 2px;
}

.about-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 25px;
}

.about-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-section strong {
    color: var(--text-main);
}

/* SECCIÓN CONTACTO */
.contact-section {
    padding: 100px 20px;
    background-color: var(--bg-main);
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 10px;
}

.contact-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-size: 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-info-card, .contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-plomo);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.contact-info-card h3, .contact-form-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* Botones de Redes Sociales */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s, border-color 0.2s;
    border: 1px solid var(--bg-plomo);
    color: var(--text-main);
    background: var(--bg-main);
}

.social-btn:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

/* Formulario de Contacto */
.form-group {
    margin-bottom: 20px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--bg-plomo);
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
}

.btn-whatsapp {
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.brands-banner {
    background: var(--bg-main);
    border: 1px solid var(--bg-plomo);
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
    text-align: center;
}

.brands-banner p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.brands-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 15px;
}

.brands-list img {
    height: 120px; /* Altura perfecta para que se lean bien */
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Vuelve las letras totalmente blancas */
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.brands-list img:hover {
    opacity: 1;
    transform: scale(1.05);
}
@media (max-width: 768px) {
    /* Ocultar cualquier barra de navegación de escritorio */
    header nav,
    .main-nav,
    .nav-links,
    .menu {
        display: none !important;
    }

    /* Asegurar que el header mantenga una sola línea limpia */
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }

    /* Ajustar el tamaño del logo para que no choque con el botón */
    .logo {
        font-size: 0.85rem;
        max-width: 65%;
        white-space: normal;
    }
}
@media (max-width: 768px) {
    /* Forzar que el header se acomode en columna o gestione mejor el espacio */
    header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 15px;
    }

    /* Reducir un poco el tamaño del logo para que conviva mejor */
    .logo {
        font-size: 0.8rem;
        max-width: 60%;
    }

    /* Hacer que el buscador baje a su propia línea o se ajuste de forma compacta */
    .header-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 5px;
    }

    .search {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .search input {
        width: 100% !important;
    }
}
