/*
Theme Name: Medical Optica
Template: astra
Description: Tema Medical Optica - Especialistas en tu salud visual
Version: 2.0
*/

:root {
    --teal:       #008B8B;
    --teal-dark:  #006666;
    --teal-light: #e6f7f7;
    --black:      #1a1a1a;
    --text:       #444;
    --gray:       #666;
    --border:     #e8e8e8;
    --bg:         #f5f7fa;
    --white:      #fff;
    --yellow:     #FFD600;
    --green:      #4CAF50;
    --wa:         #25D366;
    --wa-dark:    #075E54;
    --radius:     8px;
    --shadow:     0 2px 12px rgba(0,0,0,0.08);
    --font:       'Segoe UI', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font); color: var(--text); margin: 0; }
a { text-decoration: none; }
img { max-width: 100%; }

.lo-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.lo-section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 36px;
}

/* HEADER */
.site-header, .main-header-bar { background: var(--white) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important; }
.custom-logo { max-height: 60px !important; }
.ast-nav-menu > li > a, .main-header-menu > li > a {
    color: var(--black) !important; font-weight: 500 !important; font-size: 14px !important;
}
.ast-nav-menu > li > a:hover { color: var(--teal) !important; }

/* BOTONES */
.lo-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none !important;
}
.lo-btn--main { background: var(--white); color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.lo-btn--main:hover { background: var(--teal-light); }
.lo-btn--yellow { background: var(--yellow); color: var(--black) !important; font-weight: 700; }
.lo-btn--yellow:hover { background: #e6c000; }

/* HERO */
.lo-hero {
    background: linear-gradient(135deg, #7EC8E3 0%, #4a9ebb 40%, var(--teal) 100%);
    padding: 40px 0;
    min-height: 340px;
    display: flex;
    align-items: center;
}
.lo-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.lo-hero__tag {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 16px;
}
.lo-hero__title {
    font-size: 38px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin: 0 0 24px;
}
.lo-hero__right { display: flex; justify-content: center; }
.lo-hero__img-box {
    background: rgba(255,255,255,0.15);
    border: 2px dashed rgba(255,255,255,0.4);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    text-align: center;
}

/* MARCAS */
.lo-brands { background: var(--white); padding: 18px 0; border-bottom: 1px solid var(--border); }
.lo-brands__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.lo-brands__row span {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    letter-spacing: 1px;
    text-transform: uppercase;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}
.lo-brands__row span:last-child { border-right: none; }

/* PROMOS */
.lo-promos { padding: 20px 0; background: var(--bg); }
.lo-promos__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lo-promo-card {
    border-radius: var(--radius);
    padding: 28px 32px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.lo-promo-card--1 { background: linear-gradient(135deg, #c8e6e6 0%, #a8d8d8 100%); }
.lo-promo-card--2 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: var(--white); }
.lo-promo-card__text p { margin: 0 0 4px; font-size: 13px; opacity: 0.8; }
.lo-promo-card--1 .lo-promo-card__text h3 { font-size: 22px; font-weight: 700; color: var(--teal-dark); margin: 0 0 4px; }
.lo-promo-card--2 .lo-promo-card__text h2 { font-size: 34px; font-weight: 900; color: var(--yellow); margin: 0 0 4px; letter-spacing: 2px; }
.lo-promo-card--1 small { font-size: 11px; color: var(--gray); }
.lo-promo-card--2 p { color: rgba(255,255,255,0.75); }

/* TIPO DE USUARIO */
.lo-user-type { padding: 28px 0; background: var(--white); }
.lo-ut__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lo-ut-card {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-right: 1px solid var(--border);
    transition: all 0.2s;
    color: var(--text) !important;
    text-decoration: none !important;
}
.lo-ut-card:last-child { border-right: none; }
.lo-ut-card--green { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%); }
.lo-ut-card--green p, .lo-ut-card--green strong { color: var(--white) !important; }
.lo-ut-card--green .lo-ut-link { color: rgba(255,255,255,0.8); }
.lo-ut-card--white { background: var(--white); }
.lo-ut-card--white:hover { background: var(--teal-light); }
.lo-ut-card p { margin: 0 0 4px; font-size: 13px; line-height: 1.4; }
.lo-ut-card strong { font-size: 14px; }
.lo-ut-link { font-size: 13px; font-weight: 600; color: var(--teal); }
.lo-ut-link--teal { color: var(--teal); }

/* CATEGORIAS */
.lo-cats { padding: 50px 0; background: var(--white); border-top: 1px solid var(--border); }
.lo-cats__strip {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.lo-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 28px;
    text-decoration: none !important;
    transition: all 0.2s;
    border-radius: var(--radius);
}
.lo-cat-item:hover { background: var(--teal-light); }
.lo-cat-item__icon {
    width: 72px; height: 72px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.lo-cat-item:hover .lo-cat-item__icon { background: #c5e8e8; }
.lo-cat-item span { font-size: 13px; color: var(--black); text-align: center; font-weight: 500; line-height: 1.3; }

/* PRODUCTOS */
.lo-products { padding: 50px 0; background: var(--bg); }
.woocommerce ul.products { justify-content: center; }
.woocommerce ul.products li.product {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 16px !important;
    background: var(--white) !important;
    transition: all 0.2s !important;
}
.woocommerce ul.products li.product:hover { box-shadow: 0 4px 20px rgba(0,139,139,0.15) !important; border-color: var(--teal) !important; }
.woocommerce ul.products li.product .price { color: var(--teal) !important; font-weight: 700 !important; font-size: 16px !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; font-weight: 600 !important; }
.woocommerce .button, .woocommerce a.button, .woocommerce button[type=submit] {
    background: var(--teal) !important; color: var(--white) !important;
    border-radius: 6px !important; font-weight: 600 !important; border: none !important;
}
.woocommerce .button:hover { background: var(--teal-dark) !important; }

/* POR QUE */
.lo-why { padding: 60px 0; background: var(--white); border-top: 1px solid var(--border); }
.lo-why__grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}
.lo-why-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    text-align: center;
    min-width: 130px;
}
.lo-why-item__icon {
    width: 72px; height: 72px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lo-why-item p { font-size: 13px; color: var(--black); margin: 0; font-weight: 500; line-height: 1.4; }

/* PAGOS */
.lo-payments { padding: 50px 0; background: var(--bg); border-top: 1px solid var(--border); }
.lo-payments__sub { text-align: center; color: var(--gray); font-size: 14px; margin: -20px 0 28px; }
.lo-payments__row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.lo-pay-item {
    padding: 10px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

/* CALIFICACION */
.lo-rating { padding: 50px 0; background: var(--white); border-top: 1px solid var(--border); }
.lo-rating__inner { display: flex; justify-content: center; }
.lo-rating__score { display: flex; align-items: center; gap: 20px; }
.lo-rating__num { font-size: 64px; font-weight: 900; color: var(--black); line-height: 1; }
.lo-rating__stars { font-size: 28px; color: #FFB800; letter-spacing: 2px; margin-bottom: 4px; }
.lo-rating__score p { margin: 0 0 2px; font-size: 14px; }
.lo-rating__score small { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }

/* SEO */
.lo-seo { padding: 50px 0; background: var(--bg); border-top: 1px solid var(--border); }
.lo-seo h2 { font-size: 22px; font-weight: 700; color: var(--black); margin: 0 0 20px; }
.lo-seo__text p { font-size: 14px; color: var(--gray); line-height: 1.7; margin: 0 0 14px; }

/* FOOTER */
.site-footer, .footer-widget-area { background: #1a1a1a !important; color: #aaa !important; }
.site-footer a { color: #80cccc !important; }
.site-footer a:hover { color: var(--white) !important; }
.footer-bottom-area { background: #111 !important; color: #666 !important; font-size: 12px !important; }

/* WHATSAPP */
#whatsapp-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: var(--font); }
#whatsapp-btn {
    width: 56px; height: 56px; background: var(--wa); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 16px rgba(37,211,102,0.5);
    transition: all 0.2s; animation: wa-pulse 2s infinite;
}
#whatsapp-btn svg { width: 28px; height: 28px; fill: white; }
@keyframes wa-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(37,211,102,0.5)} 70%{box-shadow:0 0 0 12px rgba(37,211,102,0)} }
#whatsapp-bubble {
    display: none; position: absolute; bottom: 68px; right: 0;
    width: 290px; background: white; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16); overflow: hidden;
}
#whatsapp-bubble.open { display: block; animation: bubble-in 0.25s ease; }
@keyframes bubble-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.wa-header { background: var(--wa-dark); color: white; padding: 14px 18px; display: flex; align-items: center; gap: 12px; position: relative; }
.wa-avatar { width: 40px; height: 40px; background: var(--teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.wa-info h4 { margin: 0 0 2px; font-size: 14px; }
.wa-info span { font-size: 11px; opacity: 0.75; }
.wa-online { color: #25D366; font-size: 11px; margin-bottom: 2px; }
.wa-body { padding: 16px; background: #ECE5DD; }
.wa-message { background: white; border-radius: 10px 10px 10px 0; padding: 10px 12px; font-size: 13px; color: #333; margin-bottom: 12px; line-height: 1.5; }
.wa-input-area { display: flex; gap: 8px; }
#wa-user-msg { flex: 1; border: none; border-radius: 20px; padding: 9px 12px; font-size: 13px; outline: none; background: white; }
.wa-send-btn { width: 36px; height: 36px; background: var(--wa); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wa-send-btn svg { width: 14px; height: 14px; fill: white; }
.wa-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: white; font-size: 16px; cursor: pointer; opacity: 0.7; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .lo-hero__inner { grid-template-columns: 1fr; }
    .lo-hero__right { display: none; }
    .lo-promos__grid { grid-template-columns: 1fr; }
    .lo-why__grid { gap: 0; }
    .lo-why-item { padding: 16px 20px; min-width: 100px; }
}
@media (max-width: 768px) {
    .lo-hero__title { font-size: 28px; }
    .lo-ut__grid { grid-template-columns: 1fr; border-radius: 0; }
    .lo-ut-card { border-right: none; border-bottom: 1px solid var(--border); }
    .lo-ut-card:last-child { border-bottom: none; }
    .lo-cats__strip { gap: 0; }
    .lo-cat-item { padding: 14px 16px; }
    .woocommerce ul.products { grid-template-columns: repeat(2,1fr) !important; }
    .lo-brands__row span { padding: 8px 14px; font-size: 12px; }
}
@media (max-width: 480px) {
    .lo-promo-card { flex-direction: column; text-align: center; }
    .woocommerce ul.products { grid-template-columns: 1fr !important; }
}

/* Ocultar titulo de pagina en homepage */
.home .entry-title,
.home .page-title,
.home h1.entry-title { display: none !important; }
.home .entry-header { display: none !important; }
.home .entry-content { padding: 0 !important; }
.home .ast-article-single { padding: 0 !important; }

/* Nav activo */
.ast-nav-menu > li.current-menu-item > a { color: var(--teal) !important; font-weight: 700 !important; }
.ast-nav-menu > li > a:hover { color: var(--teal) !important; }
