/* ============================================
   FARMABICHOS - ESTILO ANIMADO Y VIBRANTE
   ============================================ */

:root {
    --blue:        #1a3a6b;
    --blue-dark:   #0f2347;
    --green:       #2ecc71;
    --green-dark:  #27ae60;
    --yellow:      #f1c40f;
    --orange:      #e67e22;
    --text:        #2c3e50;
    --text-muted:  #7f8c8d;
    --bg:          #f0f8ff;
    --white:       #ffffff;
    --shadow:      0 6px 25px rgba(0,0,0,0.10);
    --shadow-lg:   0 16px 50px rgba(0,0,0,0.18);
    --radius:      18px;
    --radius-sm:   10px;
}

/* ---- RESET ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ======================================
   KEYFRAMES
====================================== */
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}
@keyframes wiggle {
    0%,100% { transform: rotate(0deg); }
    25%      { transform: rotate(-6deg); }
    75%      { transform: rotate(6deg); }
}
@keyframes pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes bgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes slideLeft {
    from { opacity:0; transform:translateX(-50px); }
    to   { opacity:1; transform:translateX(0); }
}
@keyframes slideRight {
    from { opacity:0; transform:translateX(50px); }
    to   { opacity:1; transform:translateX(0); }
}
@keyframes fadeUp {
    from { opacity:0; transform:translateY(30px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes twinkle {
    0%,100% { opacity:.3; transform:scale(.8); }
    50%      { opacity:.8; transform:scale(1.3); }
}
@keyframes bounce {
    0%,100% { transform:translateY(0); }
    40%      { transform:translateY(-12px); }
    60%      { transform:translateY(-6px); }
}

/* ======================================
   HEADER
====================================== */
header {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    padding: .7rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--green);
    gap: 8px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo img {
    height: 46px;
    object-fit: contain;
    border-radius: 10px;
    transition: transform .3s;
    flex-shrink: 0;
}
.logo img:hover { transform: scale(1.1) rotate(-4deg); }

.logo-text {
    font-family: 'Pacifico', cursive, 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 2px 4px rgba(0,0,0,.3);
}
.logo-text span { color: var(--green); }

nav ul { 
    list-style: none; 
    display: flex; 
    gap: .35rem; 
    align-items: center; 
    flex-wrap: nowrap; 
    margin: 0; 
    padding: 0; 
}
nav a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-weight: 700;
    font-size: .9rem;
    padding: 7px 13px;
    border-radius: 22px;
    transition: all .3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
nav a:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(46,204,113,.4);
}

.cart-nav-link {
    background: var(--yellow) !important;
    color: var(--blue-dark) !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    white-space: nowrap !important;
    padding: 6px 14px !important;
    animation: pulse 2.2s ease-in-out infinite;
}
.cart-nav-link:hover { 
    background: var(--orange) !important; 
    color: #fff !important; 
}

.cart-badge-count {
    background: var(--blue-dark);
    color: #fff;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

/* ======================================
   HERO
====================================== */
.hero {
    background: linear-gradient(135deg, #1a3a6b, #0d5c2f, #1565c0, #1e8449);
    background-size: 400% 400%;
    animation: bgShift 9s ease infinite;
    color: #fff;
    padding: 70px 6%;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Orbes decorativos */
.hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(46,204,113,.22) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 7s ease-in-out infinite;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(241,196,15,.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 9s ease-in-out infinite reverse;
    pointer-events: none;
}

/* Partículas */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.particle {
    position: absolute;
    font-size: 1.5rem;
    animation: twinkle 3s ease-in-out infinite;
}

/* Contenido del hero en dos columnas */
.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Texto — lado izquierdo */
.hero-text {
    flex: 1 1 400px;
    animation: slideLeft .9s ease both;
}

.hero-badge {
    display: inline-block;
    background: rgba(46,204,113,.2);
    border: 2px solid var(--green);
    color: #5dfc9e;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 18px;
    text-shadow: 1px 3px 8px rgba(0,0,0,.3);
}
.hero h1 .highlight { color: var(--green); }
.hero p {
    font-size: 1.1rem;
    opacity: .92;
    max-width: 480px;
    margin-bottom: 30px;
    line-height: 1.8;
}
.hero-buttons { display:flex; gap:14px; flex-wrap:wrap; width: 100%; }

.btn-hero-primary {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 800;
    font-size: .97rem;
    transition: all .3s;
    box-shadow: 0 7px 22px rgba(46,204,113,.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 14px 38px rgba(46,204,113,.5);
}

.btn-hero-secondary {
    background: rgba(255,255,255,.14);
    color: #fff;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 800;
    font-size: .97rem;
    border: 2px solid rgba(255,255,255,.4);
    backdrop-filter: blur(8px);
    transition: all .3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,.25);
    transform: translateY(-4px);
    border-color: #fff;
}

/* Mascota — lado derecho */
.hero-mascot {
    flex: 0 0 270px;
    position: relative;
    animation: slideRight .9s ease both;
}

.hero-mascot img {
    width: 100%;
    mix-blend-mode: multiply;          /* elimina el fondo blanco del JPEG */
    filter: drop-shadow(0 15px 35px rgba(0,0,0,.35));
    animation: float 4s ease-in-out infinite;
    cursor: pointer;
    transition: transform .3s;
}
.hero-mascot img:hover { transform: scale(1.08) rotate(5deg); }

.speech-bubble {
    position: absolute;
    top: -38px;
    right: -10px;
    background: #fff;
    color: var(--blue);
    padding: 10px 16px;
    border-radius: 20px 20px 20px 5px;
    font-weight: 800;
    font-size: .88rem;
    box-shadow: 0 8px 25px rgba(0,0,0,.2);
    white-space: nowrap;
    z-index: 3;
    animation: bounce 2.8s ease-in-out infinite;
}
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 14px;
    border: 10px solid transparent;
    border-top-color: #fff;
    border-bottom: 0;
}

/* ======================================
   STATS STRIP
====================================== */
.stats-strip {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    padding: 28px 5%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.stat-item { text-align:center; color:#fff; }
.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    display: block;
    text-shadow: 1px 2px 4px rgba(0,0,0,.2);
    line-height: 1.1;
}
.stat-label {
    font-size: .85rem;
    opacity: .9;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 4px;
    display: block;
}

/* ======================================
   SECTION HEADINGS
====================================== */
.section-title {
    text-align: center;
    color: var(--blue);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
}
.section-title .emoji {
    display: inline-block;
    animation: wiggle 2s ease-in-out infinite;
}

/* ======================================
   PLAGAS SECTION
====================================== */
.plagas-section {
    padding: 75px 5%;
    background: var(--bg);
}

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

.plaga-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .35s cubic-bezier(.175,.885,.32,1.275),
                box-shadow .35s ease;
    position: relative;
    cursor: default;
}

/* Barra de color lateral */
.plaga-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 6px; height: 100%;
    background: var(--card-accent, var(--green));
    border-radius: 0 0 0 0;
    transition: width .3s ease;
}
.plaga-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.plaga-card:hover::before { width: 10px; }

.plaga-card:nth-child(1) { --card-accent: #3498db; }
.plaga-card:nth-child(2) { --card-accent: #8e44ad; }
.plaga-card:nth-child(3) { --card-accent: #e74c3c; }
.plaga-card:nth-child(4) { --card-accent: #f39c12; }

.plaga-card-header {
    padding: 24px 22px 14px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.plaga-icon {
    font-size: 2.6rem;
    display: block;
    transition: transform .3s ease;
}
.plaga-card:hover .plaga-icon {
    transform: scale(1.25) rotate(12deg);
}
.plaga-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.35;
}
.plaga-card h3 small {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}
.plaga-card-body { padding: 0 22px 22px 28px; }
.plaga-card p {
    color: var(--text-muted);
    font-size: .94rem;
    line-height: 1.7;
}
.plaga-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 13px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    background: rgba(46,204,113,.13);
    color: #1a7a3d;
}

/* ======================================
   MASCOTA BANNER
====================================== */
.floating-mascot-section {
    background: linear-gradient(135deg, var(--blue) 0%, #1e8449 100%);
    padding: 65px 6%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 55px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
/* Patrón de puntos */
.floating-mascot-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 28px 28px;
}

.floating-mascot-text { color:#fff; max-width:480px; position:relative; z-index:2; }
.floating-mascot-text h2 {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 14px;
    line-height: 1.3;
}
.floating-mascot-text h2 em { color: var(--green); font-style:normal; }
.floating-mascot-text p {
    font-size: 1.05rem;
    opacity: .9;
    margin-bottom: 26px;
    line-height: 1.8;
}

.btn-whatsapp-big {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 15px 34px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.05rem;
    transition: all .3s;
    box-shadow: 0 8px 24px rgba(37,211,102,.4);
    animation: pulse 2.5s ease-in-out infinite;
}
.btn-whatsapp-big:hover {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 14px 38px rgba(37,211,102,.5);
    animation: none;
    background: #1ebe5d;
}

.floating-mascot-img {
    width: 240px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.floating-mascot-img img {
    width: 100%;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 18px 40px rgba(0,0,0,.45));
    animation: float 3.5s ease-in-out infinite;
}
.mascot-ring {
    position: absolute;
    inset: -22px;
    border: 3px dashed rgba(46,204,113,.45);
    border-radius: 50%;
    animation: spin 14s linear infinite;
}

/* ======================================
   FEATURES SECTION
====================================== */
.features-section {
    padding: 75px 5%;
    background: #fff;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 28px;
    margin-top: 10px;
}
.feature-card {
    text-align: center;
    padding: 36px 18px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 2px solid transparent;
    transition: all .3s ease;
}
.feature-card:hover {
    background: linear-gradient(135deg, #f0fff4, #eafaf1);
    border-color: var(--green);
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}
.feature-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    display: block;
    animation: float 4s ease-in-out infinite;
}
.feature-card:nth-child(2) .feature-icon { animation-delay:.5s; }
.feature-card:nth-child(3) .feature-icon { animation-delay:1s; }
.feature-card:nth-child(4) .feature-icon { animation-delay:1.5s; }
.feature-card:nth-child(5) .feature-icon { animation-delay:2s; }
.feature-card h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 8px;
}
.feature-card p { font-size:.87rem; color:var(--text-muted); line-height:1.6; }

/* ======================================
   CONTACT SECTION
====================================== */
.contact-section {
    padding: 75px 5%;
    background: var(--bg);
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    align-items: stretch;
}
.contact-info {
    flex: 1 1 300px;
    background: #fff;
    border-radius: var(--radius);
    padding: 38px 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.contact-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--green), var(--blue), var(--yellow));
}
.contact-info h2 {
    color: var(--blue);
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 24px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--bg);
    transition: all .3s ease;
}
.contact-item:hover {
    background: #e8f8f0;
    transform: translateX(5px);
}
.contact-item-icon { font-size:1.7rem; min-width:42px; text-align:center; }
.contact-item-text strong {
    display: block;
    color: var(--blue);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}
.contact-item-text a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: color .3s;
}
.contact-item-text a:hover { color: var(--green); }
.contact-item-text span {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.contact-mascot {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 2px dashed #e0e0e0;
}
.contact-mascot img {
    width: 90px;
    mix-blend-mode: multiply;
    animation: wiggle 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
}
.contact-mascot p { font-size:.88rem; color:var(--text-muted); margin-top:8px; font-weight:600; }

.contact-map {
    flex: 1.5 1 300px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 350px;
}
.contact-map iframe { display:block; width:100%; height:100%; min-height:350px; border:0; }

/* ======================================
   BTN GENERAL
====================================== */
.btn-add {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 800;
    font-size: .93rem;
    transition: all .3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(46,204,113,.3);
    font-family: inherit;
}
.btn-add:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 28px rgba(46,204,113,.45);
}

/* ======================================
   FOOTER
====================================== */
footer {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: rgba(255,255,255,.88);
    text-align: center;
    padding: 45px 5%;
}
.footer-mascot { margin-bottom: 18px; }
.footer-mascot img {
    height: 75px;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 5px 14px rgba(0,0,0,.3)) brightness(1.5);
    animation: float 4s ease-in-out infinite;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.footer-links a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    transition: color .3s;
}
.footer-links a:hover { color: var(--green); }
.footer-copy { font-size:.88rem; color:rgba(255,255,255,.55); }
.footer-copy strong { color: var(--green); }

/* ======================================
   CART WIDGET
====================================== */
.cart-widget {
    position: fixed;
    bottom: 25px; right: 25px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 38px rgba(0,0,0,.2);
    width: 310px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 2px solid var(--green);
}
.cart-header {
    background: linear-gradient(135deg, var(--blue), #1565c0);
    color: #fff;
    padding: 14px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cart-items { padding:12px; overflow-y:auto; flex-grow:1; }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    font-size: .9rem;
}
.cart-footer { padding:12px; text-align:center; border-top:1px solid #f0f0f0; }
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #1ebe5d);
    color: #fff;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    transition: all .3s;
}
.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,211,102,.4);
}

/* ======================================
   PRODUCTS PAGE
====================================== */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 24px;
    padding: 20px 5%;
}
.product-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all .35s cubic-bezier(.175,.885,.32,1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green), var(--blue));
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(46,204,113,.3);
}
.product-card img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 14px;
    transition: transform .3s;
}
.product-card:hover img { transform: scale(1.08); }
.product-card h3 { font-size:1.02rem; font-weight:800; color:var(--blue); margin-bottom:8px; }
.product-card .price {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--green);
    margin-bottom: 14px;
}

/* ======================================
   SIDEBAR (PRODUCTS PAGE)
====================================== */
.products-page-layout {
    display: flex;
    flex-wrap: wrap;
    padding: 30px 5%;
    gap: 30px;
    align-items: flex-start;
}
.sidebar { flex:1; min-width:240px; max-width:275px; }
.main-products { flex:3; min-width:300px; }

.sidebar-box {
    background: linear-gradient(135deg, var(--blue), #1565c0);
    color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.sidebar-box h3 { text-align:center; font-size:1.05rem; font-weight:800; margin-bottom:14px; }

.search-form { display:flex; flex-direction:column; gap:10px; }
.search-form input[type="text"] {
    padding: 11px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 10px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: .93rem;
    font-family: inherit;
}
.search-form input::placeholder { color:rgba(255,255,255,.6); }
.search-form input:focus { border-color:var(--green); outline:none; }
.search-form button {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: .93rem;
    transition: all .3s;
    font-family: inherit;
}
.search-form button:hover { background:var(--green-dark); transform:translateY(-2px); }

.category-box {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.category-box h3 {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--blue), #1565c0);
    color: #fff;
    font-weight: 800;
    font-size:1rem;
}
.category-list { list-style:none; padding:0; }
.category-list li { border-bottom:1px solid #f0f0f0; }
.category-list li:last-child { border-bottom:none; }
.category-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    color: var(--text);
    text-decoration: none;
    transition: all .3s;
    font-size: .93rem;
    font-weight: 600;
}
.category-list a:hover, .category-list a.active {
    background: linear-gradient(135deg, #f0fff4, #eafaf1);
    color: var(--blue);
    padding-left: 26px;
}

.main-products .products-container {
    padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

/* ======================================
   ADMIN
====================================== */
.admin-container {
    max-width: 640px;
    margin: 40px auto;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-group { margin-bottom:18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--blue);
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .3s, box-shadow .3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46,204,113,.15);
}
.btn-submit {
    background: linear-gradient(135deg, var(--blue), #1565c0);
    color: #fff;
    padding: 13px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 800;
    font-size: .97rem;
    transition: all .3s;
    font-family: inherit;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,58,107,.3);
}

/* ======================================
   SERVICIOS SECTION
====================================== */
.servicios-section {
    padding: 80px 5%;
    background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 30px;
    margin-top: 10px;
}

.servicio-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .38s cubic-bezier(.175,.885,.32,1.275),
                box-shadow .38s ease;
    display: flex;
    flex-direction: column;
}
.servicio-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

/* Imagen con overlay */
.servicio-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}
.servicio-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}
.servicio-card:hover .servicio-img-wrap img {
    transform: scale(1.08);
}

.servicio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,58,107,.75), rgba(39,174,96,.65));
    opacity: 0;
    transition: opacity .35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.servicio-card:hover .servicio-overlay {
    opacity: 1;
}
.servicio-cta {
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.servicio-cta:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 30px rgba(37,211,102,.5);
}

/* Cuerpo de la card */
.servicio-body {
    padding: 22px 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.servicio-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--badge-color, var(--green)) 15%, white);
    color: var(--badge-color, var(--green));
    border: 1.5px solid var(--badge-color, var(--green));
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
    width: fit-content;
}

.servicio-body h3 {
    font-size: 1.13rem;
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 10px;
    line-height: 1.3;
}

.servicio-body p {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 16px;
}

.servicio-list {
    list-style: none;
    padding: 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.servicio-list li {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.servicio-list li i {
    color: var(--green);
    font-size: .9rem;
    flex-shrink: 0;
}

/* ======================================
   PRODUCTOS PROMO SECTION
====================================== */
.productos-promo-section {
    padding: 80px 6%;
    background: linear-gradient(135deg, var(--blue-dark) 0%, #1a5c36 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.productos-promo-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.productos-promo-img {
    flex: 0 0 360px;
    position: relative;
    z-index: 2;
}
.productos-promo-img img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
    transition: transform .4s ease, box-shadow .4s ease;
    object-fit: cover;
    max-height: 340px;
}
.productos-promo-img img:hover {
    transform: scale(1.03) rotate(-1deg);
    box-shadow: 0 32px 70px rgba(0,0,0,.55);
}

.productos-promo-text {
    flex: 1 1 340px;
    max-width: 500px;
    color: #fff;
    position: relative;
    z-index: 2;
}
.productos-promo-text h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 16px;
    text-shadow: 1px 2px 8px rgba(0,0,0,.2);
}
.productos-promo-text p {
    font-size: 1.02rem;
    line-height: 1.8;
    opacity: .9;
    margin-bottom: 22px;
}

.productos-promo-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.productos-promo-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .97rem;
    font-weight: 700;
    opacity: .92;
}
.productos-promo-list li i {
    width: 36px;
    height: 36px;
    background: rgba(46,204,113,.25);
    border: 1.5px solid rgba(46,204,113,.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: #5dfc9e;
    flex-shrink: 0;
}

/* ======================================
   PLAGAS IMG CARDS
====================================== */
.plagas-section {
    padding: 80px 5%;
    background: var(--bg);
}

.plagas-grid-img {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 10px;
}

.plaga-img-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .38s cubic-bezier(.175,.885,.32,1.275),
                box-shadow .38s ease;
    display: flex;
    flex-direction: column;
}
.plaga-img-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.plaga-img-top {
    position: relative;
    height: 210px;
    overflow: hidden;
}
.plaga-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}
.plaga-img-card:hover .plaga-img-top img {
    transform: scale(1.07);
}

.plaga-img-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--plaga-color, var(--green));
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 5px 13px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
}

.plaga-img-body {
    padding: 22px 22px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.plaga-img-body h3 {
    font-size: 1.18rem;
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plaga-emoji {
    font-size: 1.3rem;
}
.plaga-subtitle {
    font-size: .78rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
    font-weight: 600;
}
.plaga-img-body > p:not(.plaga-subtitle) {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 16px;
}

.plaga-info-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg);
    border-radius: 10px;
    padding: 12px 14px;
}
.plaga-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}
.plaga-info-item i {
    font-size: .9rem;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.plaga-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, #25D366, #1ebe5d);
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: .9rem;
    transition: all .3s ease;
    box-shadow: 0 6px 18px rgba(37,211,102,.35);
    margin-top: auto;
}
.plaga-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(37,211,102,.45);
}

/* ======================================
   SCROLL ANIMATIONS
====================================== */
.anim {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.175,.885,.32,1.275);
}
.anim.show {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================
   CARRITO / PRESUPUESTO PAGE
====================================== */
.cart-page-wrapper {
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
}
.cart-card-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid rgba(0,0,0,0.06);
}
.cart-header-title {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px dashed #edf2f7;
}
.cart-header-title h2 {
    color: var(--blue);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.cart-header-title p {
    color: var(--text-muted);
    font-size: .95rem;
}
.cart-empty-state {
    text-align: center;
    padding: 45px 20px;
}
.cart-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.2s ease;
}
.cart-item-card:last-child {
    border-bottom: none;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.4;
    word-break: break-word;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.qty-control {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 3px 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.qty-btn:hover {
    background: var(--green);
    color: #fff;
    transform: scale(1.06);
}
.qty-btn:active {
    transform: scale(0.95);
}
.qty-val {
    min-width: 34px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
}
.btn-remove-item {
    background: #fff0f0;
    color: #e74c3c;
    border: 1px solid #fed7d7;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}
.btn-remove-item:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.25);
}
.cart-footer-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}
.cart-whatsapp-cta {
    background: linear-gradient(135deg, #25D366, #1ebe5d);
    color: #fff;
    border: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    text-decoration: none;
    font-family: inherit;
}
.cart-whatsapp-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(37,211,102,0.45);
}
.cart-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 18px;
    transition: color 0.2s ease;
}
.cart-back-link:hover {
    color: var(--green);
}

/* ======================================
   RESPONSIVE (TABLETS & DESKTOPS)
====================================== */
@media (max-width: 850px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }
    .hero-mascot { width: 190px; }
    .hero h1 { font-size: 1.85rem; }
    .hero p { font-size: 1rem; margin-left:auto; margin-right:auto; }
    .hero-buttons { justify-content: center; }
    .speech-bubble { right: auto; left: 50%; transform: translateX(-50%); top:-40px; }
    .speech-bubble::after { left: 50%; transform: translateX(-50%); }

    .floating-mascot-section { flex-direction: column; text-align: center; }
    .sidebar { max-width: 100%; }

    .productos-promo-section { flex-direction: column; text-align: center; gap: 36px; }
    .productos-promo-img { flex: 0 0 auto; width: 100%; max-width: 380px; }
    .productos-promo-list li { justify-content: center; }
    .servicios-grid { grid-template-columns: 1fr; }
}

/* ======================================
   RESPONSIVE (SMARTPHONES < 768px)
====================================== */
@media (max-width: 768px) {
    /* Header / Nav - iconos limpios sin apretar */
    header { 
        padding: .65rem 3%; 
        gap: 8px; 
    }
    .logo img { 
        height: 40px; 
        max-width: 110px;
    }
    .logo-text { 
        font-size: 1.1rem; 
    }
    nav ul { 
        gap: .25rem; 
    }
    nav a {
        padding: 8px 11px;
        font-size: .95rem;
        border-radius: 50px;
    }
    /* Ocultar etiquetas de texto para que los 5 botones quepan perfectamente */
    nav a .nav-label { 
        display: none !important; 
    }
    .cart-nav-link { 
        padding: 6px 12px !important; 
        font-size: .95rem !important;
        border-radius: 50px !important;
    }
    .cart-badge-count {
        padding: 2px 6px;
        font-size: .72rem;
    }
}

/* ======================================
   MOBILE COMPACT — (< 580px)
====================================== */
@media (max-width: 580px) {
    /* --- Header extra compacto --- */
    header { padding: .55rem 2.5%; gap: 4px; }
    .logo img { height: 36px; max-width: 95px; }
    nav ul { gap: 3px; }
    nav a {
        padding: 7px 9px;
        font-size: .9rem;
    }
    .cart-nav-link {
        padding: 5px 9px !important;
    }

    /* --- Hero --- */
    .hero { padding: 40px 5%; min-height: auto; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: .95rem; }
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: .92rem;
    }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .hero-mascot { width: 150px; }

    /* Promo section buttons full width */
    .promo-buttons {
        flex-direction: column !important;
        width: 100%;
        gap: 10px !important;
    }
    .promo-buttons a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* --- Stats --- */
    .stats-strip { gap: 18px; padding: 20px 4%; }
    .stat-number { font-size: 1.8rem; }

    /* --- Productos page sidebar --- */
    .products-page-layout { padding: 16px 3%; gap: 16px; }
    .sidebar { min-width: 100%; max-width: 100%; }
    .main-products .products-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .product-card { padding: 14px; }
    .product-card img { height: 120px; }

    /* --- Cart page (carrito.php) en celular --- */
    .cart-page-wrapper {
        margin: 15px auto !important;
        padding: 0 10px !important;
    }
    .cart-card-container {
        padding: 18px 14px !important;
        border-radius: 14px !important;
    }
    .cart-header-title {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }
    .cart-header-title h2 {
        font-size: 1.4rem;
    }
    .cart-item-card {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
        padding: 14px 0;
    }
    .cart-item-info {
        width: 100%;
    }
    .cart-item-name {
        font-size: .95rem;
    }
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .qty-val {
        min-width: 28px;
        font-size: .92rem;
    }
    .btn-remove-item {
        padding: 7px 12px;
        font-size: .8rem;
    }
    .cart-whatsapp-cta {
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 1.05rem !important;
        border-radius: 14px !important;
    }
    .btn-whatsapp-big {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
    }

    /* --- Contact section --- */
    .contact-section { padding: 40px 4%; }
    .contact-info { padding: 22px 16px; }

    /* --- Features --- */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .feature-card { padding: 20px 10px; }
    .feature-icon { font-size: 2rem; }

    /* --- Plagas grid --- */
    .plagas-grid-img {
        grid-template-columns: 1fr;
    }

    /* --- Footer --- */
    footer { padding: 30px 5%; }
    .footer-links { gap: 12px; }
}
