:root {
    --blue:       hsl(221, 60%, 22%);
    --blue-mid:   hsl(221, 60%, 35%);
    --blue-light: hsl(221, 60%, 92%);
    --accent:     hsl(38, 95%, 55%);
    --dark:       #0d1b2e;
    --light:      #ffffff;
    --gray:       #6b7280;
    --bg:         #f0f4ff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    font-family: 'Inter', Arial, sans-serif;
    color: #1a1a2e;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

/* ===== HEADER ===== */
.site-header {
    background: var(--blue);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}

.header-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; }

.header-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.header-brand-sub {
    display: block;
    font-size: 0.68rem;
    opacity: .6;
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 4px;
    flex-grow: 1;
    justify-content: center;
}

.main-nav a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.main-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

.search-form {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.2);
    flex-shrink: 0;
}

.search-form input {
    border: none;
    outline: none;
    padding: 8px 14px;
    font-size: .88rem;
    width: 200px;
    background: rgba(255,255,255,.12);
    color: #fff;
}

.search-form input::placeholder { color: rgba(255,255,255,.5); }

.search-form button {
    background: var(--accent);
    color: #1a1a2e;
    border: none;
    padding: 8px 16px;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: opacity .15s;
}

.search-form button:hover { opacity: .88; }

.header-phone {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-phone:hover { color: var(--accent); }

/* ===== PROMO BANNER ===== */
.promo-banner {
    background: var(--blue-mid);
    color: #fff;
    text-align: center;
    padding: 9px 20px;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .2px;
}

.promo-banner strong { color: var(--accent); font-weight: 800; margin-right: 6px; }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--blue) 0%, hsl(221,60%,32%) 100%);
    color: #fff;
    padding: 56px 20px 48px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -.02em;
}

.hero h1 span { color: var(--accent); }

.hero p {
    font-size: 1.05rem;
    opacity: .82;
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.hero-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 1rem;
}

.hero-search button {
    background: var(--accent);
    border: none;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}

.hero-search button:hover { opacity: .88; }

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-badge {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 500;
}

/* ===== PRODUCTS GRID ===== */
.section-header {
    max-width: 1200px;
    margin: 32px auto 16px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--blue);
    margin: 0;
}

.section-header a {
    color: var(--blue-mid);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.producto-link { text-decoration: none; color: inherit; }

.producto {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border: 1px solid #e8eef8;
    transition: transform .18s, box-shadow .18s;
    position: relative;
}

.producto:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26,47,90,.14);
}

.producto.vendido { opacity: .55; }

.img-watermark {
    position: relative;
    background: #f0f4ff;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.img-watermark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.producto:hover .img-watermark img { transform: scale(1.04); }

.producto h3 {
    font-size: .88rem;
    font-weight: 600;
    margin: 12px 14px 6px;
    line-height: 1.35;
    color: #1a1a2e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.precio {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--blue-mid);
    margin: 0 14px 14px;
}

.no-image {
    background: var(--blue-light);
    color: var(--blue-mid);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
}

.sold {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: .72rem;
    padding: 3px 10px;
    border-radius: 6px;
    margin: 0 14px 14px;
    letter-spacing: .05em;
}

/* ===== PAGE BOX ===== */
.page-box {
    max-width: 900px;
    margin: 32px auto 48px;
    padding: 0 20px;
}

.page-box h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue);
    margin: 0 0 24px;
}

/* ===== PRODUCT DETAIL ===== */
.galeria-producto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.galeria-producto .img-watermark { border-radius: 12px; }

.precio-grande {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue-mid);
    margin: 12px 0;
}

.descripcion-producto {
    background: #fff;
    border: 1px solid #e8eef8;
    border-radius: 12px;
    padding: 20px;
    font-size: .95rem;
    line-height: 1.7;
    color: #444;
    margin: 16px 0;
}

.comprar-ahora-wrap {
    background: var(--blue);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin: 16px 0;
}

.btn-comprar-ahora {
    display: inline-block;
    background: var(--accent);
    color: #1a1a2e;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 36px;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity .15s;
}

.btn-comprar-ahora:hover { opacity: .88; }

.comprar-ahora-sub {
    color: rgba(255,255,255,.7);
    font-size: .82rem;
    margin: 8px 0 0;
}

/* ===== PAGINATION ===== */
.paginacion {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 16px 20px 40px;
    flex-wrap: wrap;
}

.paginacion a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #d1ddf5;
    text-decoration: none;
    color: var(--blue-mid);
    font-size: .9rem;
    font-weight: 600;
    transition: background .15s;
}

.paginacion a.active, .paginacion a:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* ===== CONTACT FORM ===== */
.contacto-box { max-width: 640px; }

.contact-form .field { margin-bottom: 16px; }
.contact-form label { display: block; font-size: .88rem; font-weight: 600; color: #444; margin-bottom: 5px; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1.5px solid #d1ddf5;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .15s;
    outline: none;
}

.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue-mid); }
.contact-form textarea { min-height: 110px; resize: vertical; }

.btn-submit {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity .15s;
}

.btn-submit:hover { opacity: .85; }

.contact-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: .9rem;
    font-weight: 500;
}

.contact-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.contact-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ===== FEATURES STRIP ===== */
.features {
    background: #fff;
    border-top: 1px solid #e8eef8;
    border-bottom: 1px solid #e8eef8;
    padding: 28px 20px;
}

.features-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.feature-item h4 { font-size: .95rem; font-weight: 700; color: var(--blue); margin: 8px 0 4px; }
.feature-item p  { font-size: .8rem; color: var(--gray); margin: 0; }
.feature-icon    { font-size: 1.8rem; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--blue);
    color: rgba(255,255,255,.8);
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.footer-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.footer-brand-name { font-weight: 700; font-size: 1rem; color: #fff; }
.footer-brand-sub { font-size: .72rem; opacity: .6; display: block; }

.footer-legal-text { font-size: .72rem; opacity: .5; line-height: 1.6; margin: 0; }

.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 7px; }
.site-footer ul a { color: rgba(255,255,255,.65); text-decoration: none; font-size: .85rem; transition: color .15s; }
.site-footer ul a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1200px;
    margin: 16px auto 0;
    text-align: center;
    font-size: .75rem;
    opacity: .45;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #25d366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,.4);
    z-index: 999;
    text-decoration: none;
    transition: transform .2s;
}

.whatsapp-float:hover { transform: scale(1.1); }

/* ===== SEARCH RESULTS ===== */
.search-header {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 20px;
}

.search-header h2 { font-size: 1.2rem; color: var(--blue); font-weight: 700; margin: 0 0 4px; }
.search-header p  { color: var(--gray); font-size: .88rem; margin: 0; }

.no-results {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    text-align: center;
    color: var(--gray);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner { gap: 12px; }
    .search-form input { width: 130px; }
    .main-nav { gap: 2px; }
    .main-nav a { padding: 5px 10px; font-size: .82rem; }
    .hero { padding: 36px 16px 32px; }
    .hero-search { max-width: 100%; }
}

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

/* ===== BREADCRUMB ===== */
.breadcrumb {
    font-size: .8rem;
    color: var(--gray);
    margin: 0 0 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--blue-mid);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { color: #ccc; }

/* ===== PRODUCT CARD — keyword-rich alt via title attr ===== */
.producto img { display: block; }

/* ===== CHATBOT FLOAT ===== */
.chatbot-float {
    position: fixed;
    bottom: 22px;
    left: 22px;
    width: 72px;
    height: 72px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    color: #fff;
    font-size: 28px;
}
.chatbot-float:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}
.chatbot-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}
.chatbot-window {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 22px;
    width: 360px;
    max-width: calc(100vw - 44px);
    max-height: 70vh;
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 10000;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.chatbot-window.open { display: flex; }
.chatbot-header {
    background: var(--accent);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-header-avatar {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: bold;
}
.chatbot-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; opacity: 0.8; }
.chatbot-close:hover { opacity: 1; }
.chatbot-messages {
    flex: 1; padding: 16px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 200px; max-height: 350px;
}
.chatbot-msg {
    max-width: 80%; padding: 10px 14px;
    border-radius: 12px; font-size: 13px; line-height: 1.5;
    white-space: pre-line;
}
.chatbot-msg.bot {
    background: #2a2a2a; color: #e0e0e0;
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.chatbot-msg.user {
    background: var(--accent); color: #fff;
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.chatbot-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chatbot-quick button {
    background: #2a2a2a; color: #ccc; border: 1px solid #444;
    border-radius: 20px; padding: 6px 14px; font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.chatbot-quick button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.chatbot-phone { text-align: center; padding: 8px; border-top: 1px solid #333; }
.chatbot-phone a { color: #999; font-size: 11px; text-decoration: none; }
.chatbot-phone a:hover { color: var(--accent); }
.chatbot-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #333; }
.chatbot-input input {
    flex: 1; background: #2a2a2a; border: 1px solid #444;
    border-radius: 8px; padding: 10px 14px; color: #fff; font-size: 13px; outline: none;
}
.chatbot-input input:focus { border-color: var(--accent); }
.chatbot-input button {
    background: var(--accent); border: none; border-radius: 8px;
    padding: 10px 14px; color: #fff; cursor: pointer; font-size: 16px;
    transition: background 0.2s;
}
.chatbot-input button:hover { filter: brightness(1.1); }
.chatbot-typing { display: flex; gap: 4px; padding: 10px 14px; }
.chatbot-typing .dot { animation: typingDot 1.4s infinite; font-size: 20px; line-height: 1; color: #888; }
.chatbot-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.5); opacity: 0; }
}
@media (max-width: 768px) {
    .chatbot-float { bottom: 16px; left: 16px; width: 60px; height: 60px; font-size: 24px; }
    .chatbot-window { bottom: 85px; left: 10px; width: calc(100vw - 20px); }
}
