:root {
    /* Color Palette - Matching Index.html */
    --primary-color: #2F5233;
    --secondary-color: #94C973;
    --accent-color: #B1D8B7;
    --background-color: #F8F9FA;
    --surface-light: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --danger: #dc3545;

    /* Typography */
    --font-heading: "Krona One", sans-serif;
    --font-body: "AR One Sans", sans-serif;

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    margin: 0;
    margin-top: 80px !important;
    background-color: var(--background-color) !important;
    font-family: var(--font-body);
    color: var(--text-main);
}

/* ================= OVERLAY ================= */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

/* ================= HEADER ================= */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 0 5%;
    box-sizing: border-box;
}

header img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

#buttons_header {
    font-family: var(--font-heading);
    color: var(--primary-color);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 30px;
}

/* SEARCH BAR */
#Barra_busqueda form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 400px;
    background: var(--background-color);
    border-radius: 30px;
    padding: 5px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: box-shadow var(--transition-fast);
}

#Barra_busqueda form:focus-within {
    box-shadow: 0 0 0 2px var(--accent-color);
    border-color: var(--secondary-color);
}

#Barra_busqueda input {
    width: 100%;
    height: 35px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    color: var(--text-main);
}

#Button_buscar {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#Button_buscar img {
    width: 20px;
    height: 20px;
    filter: invert(30%) sepia(10%) saturate(1400%) hue-rotate(85deg) brightness(95%) contrast(85%);
}

#Box_Button_Otros {
    display: flex;
    align-items: center;
    gap: 40px;
}

#Box_Button_Otros span {
    color: var(--primary-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-family: var(--font-heading);
}

#Box_Button_Otros span:hover {
    color: var(--secondary-color);
}

/* SESSION TAGS */
#Box_Button_Otros a {
    text-decoration: none;
}

#Box_Button_Otros a span[style*="background-color: white"] {
    background-color: var(--secondary-color) !important;
    color: var(--white) !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    box-shadow: var(--shadow-sm);
}

/* CART BUTTON */
#Box_Button_carrito {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: var(--background-color);
    padding: 8px 16px;
    border-radius: 20px;
    transition: background var(--transition-fast);
}

#Box_Button_carrito:hover {
    background: var(--accent-color);
}

#Box_Button_carrito img {
    width: 24px;
    height: 24px;
    filter: invert(30%) sepia(10%) saturate(1400%) hue-rotate(85deg) brightness(95%) contrast(85%);
}

/* ================= ADS & CAROUSEL ================= */
#Box_Principal_Anuncios {
    padding: 30px 5%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.anuncio img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.carousel {
    margin: 20px 5%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.carousel-item img {
    height: 450px;
    object-fit: cover;
}

/* ================= PRODUCT CARDS SECTION ================= */
#box_principal_productos,
#contenedor_tecnologia {
    width: 90% !important;
    margin: 60px auto;
    background-color: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#box_principal_productos h3,
#contenedor_tecnologia h3 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    align-self: center;
}

#box_principal_productos h3::after,
#contenedor_tecnologia h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

#Contenedor_productos,
#productos_tecnologia {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* Generic Product Card */
.tarjeta_producto,
.tarjeta_producto_tecno {
    width: 280px;
    background: var(--surface-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.tarjeta_producto:hover,
.tarjeta_producto_tecno:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.imagen_producto img,
.imagen_producto_tecno img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    transition: transform var(--transition-normal);
}

.tarjeta_producto:hover .imagen_producto img,
.tarjeta_producto_tecno:hover .imagen_producto_tecno img {
    transform: scale(1.05);
}

.tarjeta_producto h2,
.tarjeta_producto_tecno h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    height: 44px;
    /* Fixed height for two lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tarjeta_producto p,
.tarjeta_producto_tecno p {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--primary-color);
    font-weight: bold;
}

.producto-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.btn-agregar-carrito {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 14px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-agregar-carrito:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ================= CATEGORIES ================= */
#Box_Principal_Categorias {
    padding: 60px 5%;
    background: var(--surface-light);
    margin: 40px 0;
}

#Contenedor_Categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.tarjeta_categoria {
    width: 150px;
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.tarjeta_categoria:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--accent-color);
}

#imagen_and_text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tarjeta_categoria img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.tarjeta_categoria h4 {
    margin: 0;
    font-size: 14px;
    font-family: var(--font-heading);
    color: var(--primary-color);
    text-align: center;
}

/* ================= OFFERS SECTION ================= */
#Box_Principal_Ofertas {
    margin: 40px 0;
    padding: 0 5%;
}

#Contenedor_Ofertas {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.tarjeta_oferta {
    width: 48%;
    min-width: 400px;
    background: var(--surface-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.tarjeta_oferta:hover {
    transform: scale(1.02);
}

.tarjeta_oferta img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* ================= FINAL OPTIONS (INFO) ================= */
#box_principal_finalOption {
    padding: 60px 5%;
    background-color: var(--surface-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#title p {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

#container_opciones {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.box_option {
    background: var(--background-color);
    padding: 30px 20px;
    border-radius: var(--radius-md);
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), background var(--transition-fast);
    cursor: pointer;
}

.box_option:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
}

.box_option img {
    width: 50px;
    height: 50px;
    filter: invert(30%) sepia(10%) saturate(1400%) hue-rotate(85deg) brightness(95%) contrast(85%);
}

.box_option p {
    text-align: center;
    font-family: var(--font-body);
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* ================= FLOATING CART/HELP ================= */
.carrito-flotante {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: var(--surface-light);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.carrito-flotante.activo {
    transform: translateX(0);
}

.carrito-flotante h3 {
    text-align: center;
    padding: 25px;
    margin: 0;
    background: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 20px;
}

.carrito-flotante #total-carrito {
    margin-top: auto;
    padding: 20px;
    font-size: 20px;
    background: var(--background-color);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#contenedor_boton_cerrar {
    padding: 20px;
    background: var(--surface-light);
}

#contenedor_boton_cerrar button {
    width: 100%;
    height: 50px;
    background-color: rgb(155, 4, 4);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background var(--transition-fast);
}

#contenedor_boton_cerrar button:hover {
    background-color: var(--danger);
}


#contenedor_boton_pagar{
    
    width: 100%;
    padding: 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background var(--transition-fast);
}


#contenedor_boton_pagar button{
    width: 100%;
    height: 50px;
    background-color: var(--text-main);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background var(--transition-fast);
}



/* ================= FOOTER ================= */
.footer-seguro {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
    font-family: var(--font-body);
    margin-top: 0;
    /* Reset margin from old stylesheet */
}

/* Borrowing the exact same footer layout from the index page for consistency */
.footer-seguro .footer-contenedor {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-seguro .footer-columna {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-seguro .footer-columna h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-seguro .footer-columna a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: color var(--transition-fast);
}

.footer-seguro .footer-columna a:hover {
    color: var(--white);
    transform: translateX(5px);
    display: inline-block;
}

.footer-seguro .footer-redes {
    display: flex;
    gap: 15px;
}

.footer-seguro .footer-redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.footer-seguro .footer-redes a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-seguro .footer-redes img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.footer-seguro .footer-copy {
    text-align: center;
    margin-top: 50px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
    header {
        height: auto;
        padding: 15px 5%;
        flex-wrap: wrap;
        gap: 15px;
    }

    #buttons_header {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        padding-left: 0;
    }

    #Barra_busqueda form {
        width: 100%;
    }

    #Box_Button_Otros {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    body {
        margin-top: 160px !important;
    }
}

@media (max-width: 768px) {
    .tarjeta_oferta {
        width: 100%;
        min-width: unset;
    }

    .tarjeta_producto,
    .tarjeta_producto_tecno {
        width: 100%;
        max-width: 320px;
    }
}