/* ============================================================
   Smiling Pet — Hoja de estilos principal
   Paleta: coral/durazno (marca), crema (fondo), turquesa (acento).
   Tipografía: Quicksand (títulos, redondeada) + Nunito (texto).
   Mobile-first: los estilos base son para móvil; @media agranda.
   ============================================================ */

:root {
    --color-coral: #ff8a65;
    --color-coral-dark: #f2673f;
    --color-cream: #fff8f0;
    --color-cream-soft: #fff1e3;
    --color-turquoise: #4ecdc4;
    --color-turquoise-dark: #339e96;
    --color-text: #3a3a3a;
    --color-text-light: #6b6b6b;
    --color-white: #ffffff;
    --color-agotado: #b5b5b5;

    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow-soft: 0 8px 24px rgba(58, 42, 30, 0.08);
    --shadow-hover: 0 12px 28px rgba(58, 42, 30, 0.14);

    --font-heading: 'Quicksand', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-cream);
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 0.5em;
    line-height: 1.2;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--color-coral-dark);
    text-decoration: none;
}

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

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-coral);
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--color-coral-dark);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-coral-dark);
    border: 2px solid var(--color-coral);
}

.btn-secondary:hover {
    background: var(--color-cream-soft);
}

.btn-whatsapp {
    background: #25d366;
    color: var(--color-white);
}

.btn-whatsapp:hover {
    background: #1fb958;
}

.btn:disabled,
.btn.is-disabled {
    background: var(--color-agotado);
    color: var(--color-white);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-block {
    width: 100%;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-cream);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand__logo {
    height: 120px;
    width: auto;
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
    padding: 4px;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--color-coral-dark);
}

.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-cream);
    flex-direction: column;
    padding: 10px 20px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-nav.is-open {
    display: flex;
}

.site-nav a {
    padding: 10px 0;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
}

.site-nav a:hover {
    color: var(--color-coral-dark);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, var(--color-cream-soft) 0%, var(--color-cream) 100%);
    padding: 48px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    color: var(--color-coral-dark);
}

.hero p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

/* ---------- Valores / propuesta ---------- */
.valores {
    padding: 40px 0;
}

.valores__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.valor-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.valor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.valor-card__icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.valor-card h3 {
    font-size: 1.1rem;
    color: var(--color-coral-dark);
}

.valor-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ---------- Catálogo de productos ---------- */
.productos {
    padding: 40px 0 60px;
}

.productos h2,
.valores h2 {
    text-align: center;
    color: var(--color-coral-dark);
}

.productos__intro {
    text-align: center;
    color: var(--color-text-light);
    max-width: 480px;
    margin: 0 auto 30px;
}

.productos__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.producto-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.producto-card__imagen-wrap {
    position: relative;
    background: var(--color-cream-soft);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.producto-card__imagen-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-card__imagen-wrap img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.badge-disponible {
    background: var(--color-turquoise-dark);
}

.badge-ultimas {
    background: var(--color-coral-dark);
}

.badge-agotado {
    background: var(--color-agotado);
}

.producto-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.producto-card__body h3 {
    font-size: 1.15rem;
    margin-bottom: 0;
}

.producto-card__desc {
    color: var(--color-text-light);
    font-size: 0.92rem;
    flex: 1;
}

.producto-card__precio {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-coral-dark);
    margin: 4px 0;
}

.producto-card__acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.producto-card__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1fb958;
}

.producto-card__whatsapp:hover {
    text-decoration: underline;
}

/* ---------- Formulario (comprar.php) ---------- */
.form-page {
    padding: 40px 0 60px;
}

.form-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 28px 24px;
    max-width: 520px;
    margin: 0 auto;
}

.form-card__producto {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-cream-soft);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 20px;
}

.form-card__producto img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 2px solid #eee0d3;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-cream);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-turquoise);
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #e3f8f2;
    color: var(--color-turquoise-dark);
    border: 1px solid var(--color-turquoise);
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

.form-divider {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.88rem;
    margin: 20px 0;
    position: relative;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-coral-dark);
    color: var(--color-white);
    padding: 40px 0 16px;
    margin-top: 40px;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
}

.site-footer__logo {
    height: 60px;
    margin: 0 auto 10px;
    border-radius: var(--radius-md);
    background: var(--color-white);
    padding: 4px;
}

.site-footer__brand p {
    opacity: 0.9;
    margin-bottom: 0;
}

.site-footer h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.site-footer a {
    color: var(--color-white);
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer__copy {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.75;
    margin: 30px 0 0;
}

/* ============================================================
   Widget de chat flotante (assets/js/chat-widget.js)
   ============================================================ */
.chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--color-turquoise);
    color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chat-widget-button:hover {
    background: var(--color-turquoise-dark);
    transform: scale(1.06);
}

.chat-widget-button svg {
    width: 26px;
    height: 26px;
}

.chat-widget-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: min(320px, calc(100vw - 40px));
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    z-index: 200;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: chat-pop-in 0.18s ease;
}

.chat-widget-panel.is-open {
    display: flex;
}

@keyframes chat-pop-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-widget-panel__header {
    background: var(--color-turquoise);
    color: var(--color-white);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 700;
}

.chat-widget-panel__close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.chat-widget-panel__body {
    padding: 18px 16px;
    font-size: 0.92rem;
    color: var(--color-text);
}

.chat-widget-panel__body p {
    margin-bottom: 14px;
}

/* ---------- Utilidades ---------- */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: 24px;
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
    .productos__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .valores__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }

    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .site-footer__logo {
        margin: 0 0 10px;
    }
}

@media (min-width: 860px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: flex;
        position: static;
        flex-direction: row;
        gap: 28px;
        background: none;
        border: none;
        padding: 0;
    }

    .site-nav a {
        padding: 0;
    }

    .hero {
        padding: 72px 0 60px;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .productos__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
