/* ============================================
   RESET
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
}


/* ============================================
   NAVBAR
============================================ */

.navbar {
    width: 100%;
    padding: 25px 7%;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.logo span {
    font-size: 28px;
    font-weight: bold;
}


.menu {
    display: flex;
    align-items: center;
    gap: 30px;

    list-style: none;
}


.menu a {
    color: white;
    text-decoration: none;
}


.menu a:hover {
    opacity: 0.7;
}


/* ============================================
   HERO
============================================ */

.hero {
    min-height: 100vh;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.5),
            rgba(0, 0, 0, 0.8)
        );

}


.hero-content {
    min-height: 80vh;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: 0 10%;
}


.hero-tag {
    font-size: 14px;
    letter-spacing: 4px;

    margin-bottom: 20px;
}


.hero h1 {
    font-size: clamp(50px, 8vw, 100px);
    line-height: 0.95;

    margin-bottom: 30px;
}


.hero h1 span {
    font-weight: normal;
}


.hero p {
    max-width: 550px;

    line-height: 1.7;

    margin-bottom: 35px;
}


.hero-buttons {
    display: flex;
    gap: 15px;
}


.btn {
    padding: 14px 25px;

    text-decoration: none;

    border: 1px solid white;

    color: white;
}


.btn-primary {
    background: white;
    color: black;
}


.btn-secondary {
    background: transparent;
}


/* ============================================
   SECCIONES
============================================ */

.services,
.portfolio,
.contact {
    padding: 120px 7%;
}


.section-title {
    text-align: center;

    margin-bottom: 60px;
}


.section-title span {
    font-size: 13px;
    letter-spacing: 4px;
}


.section-title h2 {
    font-size: 45px;

    margin: 15px 0;
}


.section-title p {
    opacity: 0.7;
}


/* ============================================
   SERVICIOS
============================================ */

.services-container {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;
}


.service-card {
    background: #1a1a1a;

    overflow: hidden;
}


.service-image {
    height: 300px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #252525;
}


.service-image span {
    opacity: 0.4;

    letter-spacing: 3px;
}


.service-info {
    padding: 25px;
}


.service-info h3 {
    font-size: 25px;

    margin-bottom: 10px;
}


.service-info p {
    color: #aaa;

    line-height: 1.6;

    margin-bottom: 25px;
}


.service-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;
}


.price {
    font-size: 20px;
    font-weight: bold;
}


.add-cart {
    border: none;

    background: white;
    color: black;

    padding: 12px 18px;

    cursor: pointer;
}


.add-cart:hover {
    opacity: 0.8;
}


/* ============================================
   PORTFOLIO
============================================ */

.portfolio {
    background: #181818;
}


.portfolio-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}


.portfolio-item {
    height: 300px;

    background: #252525;

    display: flex;

    align-items: center;
    justify-content: center;
}


.portfolio-item span {
    opacity: 0.4;
}


/* ============================================
   CONTACTO
============================================ */

.contact {
    text-align: center;
}


/* ============================================
   CARRITO
============================================ */

.cart-button {
    border: none;

    background: transparent;

    color: white;

    cursor: pointer;

    font-size: 15px;
}


#cart-count {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    margin-left: 5px;

    border-radius: 50%;

    background: white;
    color: black;

    font-size: 12px;
}


.cart-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;

    z-index: 90;
}


.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}


.cart {
    position: fixed;

    top: 0;
    right: -450px;

    width: min(450px, 100%);

    height: 100vh;

    background: #111;

    z-index: 100;

    display: flex;
    flex-direction: column;

    transition: 0.3s;
}


.cart.active {
    right: 0;
}


.cart-header {
    padding: 25px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #333;
}


.cart-header button {
    border: none;

    background: none;

    color: white;

    font-size: 22px;

    cursor: pointer;
}


.cart-items {
    flex: 1;

    overflow-y: auto;

    padding: 25px;
}


.empty-cart {
    text-align: center;

    color: #777;

    margin-top: 50px;
}


.cart-item {
    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 15px;

    padding: 20px 0;

    border-bottom: 1px solid #333;
}


.cart-item-info h3 {
    margin-bottom: 5px;
}


.cart-item-info span {
    color: #aaa;
}


.cart-item-controls {
    display: flex;

    align-items: center;

    gap: 10px;
}


.cart-item-controls button {
    width: 28px;
    height: 28px;

    border: 1px solid #555;

    background: transparent;

    color: white;

    cursor: pointer;
}


.remove-item {
    border: none;

    background: transparent;

    color: #888;

    cursor: pointer;
}


.cart-footer {
    padding: 25px;

    border-top: 1px solid #333;
}


.cart-total {
    display: flex;

    justify-content: space-between;

    margin-bottom: 20px;

    font-size: 20px;
}


.checkout-button {
    width: 100%;

    padding: 16px;

    border: none;

    background: white;

    color: black;

    cursor: pointer;

    font-weight: bold;
}


.checkout-button:disabled {
    opacity: 0.3;

    cursor: not-allowed;
}


/* ============================================
   FOOTER
============================================ */

.footer {
    padding: 30px;

    text-align: center;

    color: #777;

    border-top: 1px solid #222;
}


/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 900px) {

    .services-container {
        grid-template-columns: 1fr;
    }


    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }


    .menu {
        gap: 12px;
    }

}


@media (max-width: 600px) {

    .menu li:not(:last-child) {
        display: none;
    }


    .portfolio-grid {
        grid-template-columns: 1fr;
    }


    .hero-content {
        padding: 0 7%;
    }

}




/* ============================================
   CHECKOUT
============================================ */

.checkout-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.75);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;

    visibility: hidden;

    transition: 0.3s;

    z-index: 200;

}


.checkout-overlay.active {

    opacity: 1;

    visibility: visible;

}


/* ============================================
   MODAL
============================================ */

.checkout-modal {

    width: min(650px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background: #111;

    border: 1px solid #333;

    padding: 35px;

}


/* ============================================
   HEADER
============================================ */

.checkout-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    margin-bottom: 35px;

}


.checkout-label {

    font-size: 12px;

    letter-spacing: 4px;

    color: #888;

}


.checkout-header h2 {

    font-size: 32px;

    margin-top: 8px;

}


.close-checkout {

    border: none;

    background: none;

    color: white;

    font-size: 24px;

    cursor: pointer;

}


/* ============================================
   RESUMEN
============================================ */

.checkout-summary {

    padding-bottom: 25px;

    border-bottom: 1px solid #333;

}


.checkout-summary h3,
.customer-information h3,
.payment-section h3 {

    margin-bottom: 20px;

}


.checkout-item {

    display: flex;

    justify-content: space-between;

    padding: 10px 0;

    color: #bbb;

}


.checkout-total {

    display: flex;

    justify-content: space-between;

    margin-top: 15px;

    padding-top: 15px;

    border-top: 1px solid #333;

    font-size: 20px;

}


/* ============================================
   INFORMACION CLIENTE
============================================ */

.customer-information {

    padding: 25px 0;

}


.customer-information label {

    display: block;

    margin-top: 15px;

    margin-bottom: 7px;

    color: #aaa;

}


.customer-information input {

    width: 100%;

    padding: 14px;

    background: #1c1c1c;

    border: 1px solid #444;

    color: white;

    outline: none;

}


.customer-information input:focus {

    border-color: white;

}


/* ============================================
   METODOS DE PAGO
============================================ */

.payment-section {

    padding-top: 10px;

}


.payment-methods {

    display: flex;

    gap: 10px;

    margin-bottom: 20px;

}


.payment-option {

    flex: 1;

    padding: 15px;

    border: 1px solid #444;

    text-align: center;

    cursor: pointer;

    color: #aaa;

}


.payment-option.active {

    border-color: white;

    color: white;

}


/* ============================================
   PAYMENT CONTAINER
============================================ */

.payment-container {

    padding-top: 10px;

}


.hidden {

    display: none;

}


/* ============================================
   CARD FIELDS
============================================ */

.card-field {

    margin-bottom: 18px;

}


.card-field label {

    display: block;

    margin-bottom: 8px;

    color: #aaa;

}


#card-number,
#card-expiration,
#card-cvv,
#card-name {

    min-height: 45px;

    padding: 12px;

    background: #1c1c1c;

    border: 1px solid #444;

}


.card-row {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;

}


.card-pay-button {

    width: 100%;

    padding: 16px;

    border: none;

    background: white;

    color: black;

    font-weight: bold;

    cursor: pointer;

    margin-top: 10px;

}


/* ============================================
   MOBILE
============================================ */

@media (max-width: 600px) {

    .checkout-modal {

        padding: 25px;

    }


    .checkout-header h2 {

        font-size: 25px;

    }


    .card-row {

        grid-template-columns: 1fr;

    }

}


/* ============================================
   CHATBOT NEHNEH
============================================ */

#chatbot {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

/* Botón flotante */

#chatbot-button {
    width: 60px;
    height: 60px;

    border: none;
    border-radius: 50%;

    background: #111;
    color: white;

    font-size: 25px;

    cursor: pointer;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);

    transition: transform 0.2s;
}

#chatbot-button:hover {
    transform: scale(1.08);
}

/* Ventana */
#chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;

    width: 350px;
    max-height: 600px;

    background: white;
    color: #111; /* AGREGAR */

    border-radius: 18px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);

    overflow: hidden;

    display: none;
    flex-direction: column;
}

/* Cuando está abierto */

#chatbot-window.active {
    display: flex;
}

/* Header */

.chatbot-header {
    background: #000000;
    color: white;

    padding: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header strong {
    display: block;
    font-size: 17px;
}

.chatbot-header span {
    font-size: 12px;
    opacity: 0.7;
}

#chatbot-close {
    background: none;
    border: none;

    color: white;

    font-size: 25px;

    cursor: pointer;
}

/* Mensajes */

#chatbot-messages {
    padding: 15px;

    height: 220px;

    overflow-y: auto;

    background: #f7f7f7;
    color: #111; /* AGREGAR */
}

.bot-message,
.user-message {
    max-width: 85%;

    padding: 10px 13px;

    margin-bottom: 10px;

    border-radius: 12px;

    font-size: 14px;

    line-height: 1.4;
}

.bot-message {
    background: white;
    color: #111; /* AGREGAR */
    border: 1px solid #eee;
}

.user-message {
    background: #111;
    color: white;

    margin-left: auto;
}

/* Preguntas */

#chatbot-questions {
    padding: 12px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    max-height: 260px;

    overflow-y: auto;
}

#chatbot-questions button {
    border: 1px solid #ddd;

    background: white;
    color: #111; /* AGREGAR */

    padding: 9px 12px;

    border-radius: 10px;

    text-align: left;

    font-size: 13px;

    cursor: pointer;

    transition: all 0.2s;
}

#chatbot-questions button:hover {
    background: #f0f0f0;
}

/* Responsive */

@media (max-width: 500px) {

    #chatbot {
        right: 15px;
        bottom: 15px;
    }

    #chatbot-window {
        width: calc(100vw - 30px);

        right: -5px;
    }

}