* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', sans-serif;
    background: #fff;
    color: #333;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* PROMO BAR */
.ps-promo-bar {
    background: #e31b23;
    color: white;
    text-align: center;
    padding: 9px 0;
    font-size: 13.5px;
    letter-spacing: 0.3px;
}

/* UTILITY NAV */
.ps-utility-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 40px;
    font-size: 11.5px;
    border-bottom: 1px solid #eee;
}
.ps-utility-nav a { color: #2b7cf1; text-decoration: none; }
.ps-utility-nav a:hover { text-decoration: underline; }
.ps-sep { margin: 0 7px; color: #bbb; }

/* HEADER */
.ps-header { padding: 10px 40px; border-bottom: 1px solid #e8e8e8; }
.ps-header__inner {
    display: flex; align-items: center;
    max-width: 1400px; margin: 0 auto; gap: 20px;
}
.ps-logo { flex-shrink: 0; display: flex; align-items: center; }
.ps-logo img { height: 42px; width: auto; display: block; }

.ps-search {
    flex: 1; display: flex; align-items: center;
    position: relative; max-width: 680px; margin: 0 10px;
}
.ps-search__input {
    width: 100%; padding: 9px 44px 9px 14px;
    border: 1px solid #ccc; border-radius: 4px;
    font-size: 14px; outline: none; font-family: 'Roboto', sans-serif;
}
.ps-search__input:focus { border-color: #2b7cf1; }
.ps-search__btn {
    position: absolute; right: 0; top: 0; bottom: 0; width: 42px;
    background: none; border: none; border-left: 1px solid #ccc;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.ps-account { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-shrink: 0; }
.ps-account__text { display: flex; flex-direction: column; line-height: 1.3; }
.ps-account__title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 3px; cursor: pointer; }
.ps-arrow-down::after { content: '▾'; font-size: 12px; }
.ps-account__sub { font-size: 11px; color: #555; }
.ps-cart { cursor: pointer; margin-left: 6px; display: flex; align-items: center; }

/* NAV */
.ps-main-nav { background: #2b7cf1; }
.ps-main-nav__inner {
    display: flex; justify-content: center;
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
}
.ps-nav-link {
    color: white; text-decoration: none;
    padding: 13px 18px; font-size: 14px; font-weight: 500;
    display: inline-block; white-space: nowrap; transition: background 0.15s;
}
.ps-nav-link:hover { background: rgba(0,0,0,0.12); }

/* FEEDBACK */
.ps-feedback-tab {
    position: fixed; right: -28px; top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    background: #2b7cf1; color: white;
    padding: 7px 14px; font-size: 12px; font-weight: 500;
    border-radius: 4px 4px 0 0; cursor: pointer; z-index: 100;
}

/* HERO */
.ps-hero-container { padding: 0 40px; }
.ps-hero { max-width: 1400px; margin: 0 auto; }
.ps-hero img { width: 100%; display: block; }

/* SAVE BIG */
.ps-save-big { text-align: center; padding: 28px 0 8px; }
.ps-save-big__title { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.ps-save-big__link { color: #2b7cf1; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* PRODUCTS GRID */
.ps-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 16px auto 50px;
    padding: 0 40px;
}

/* PRODUCT CARD */
.ps-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ps-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.ps-product-card > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.ps-product-card__label {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: #111;
    padding: 10px 8px 2px;
    width: 100%;
}
.ps-product-card__price {
    font-size: 15px;
    font-weight: 900;
    color: #e31b23;
    padding: 2px 8px 8px;
}

/* WA BUTTON ON CARD */
.ps-card__wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25d366;
    color: white;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    padding: 8px 12px;
    width: calc(100% - 16px);
    margin: 0 8px 10px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
    animation: waPulse 2.5s ease-in-out infinite;
}
.ps-card__wa-btn:hover {
    background: #1da851;
    transform: scale(1.04);
    animation: none;
}

@keyframes waPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(37,211,102,0); }
}

/* MODAL */
.ps-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}
.ps-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.ps-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 780px;
    width: 100%;
    display: flex;
    gap: 0;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.25s ease;
    max-height: 90vh;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.ps-modal__close {
    position: absolute; top: 12px; right: 14px;
    background: rgba(0,0,0,0.1); border: none;
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 20px; cursor: pointer; color: #333;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; transition: background 0.15s;
}
.ps-modal__close:hover { background: rgba(0,0,0,0.2); }

.ps-modal__img {
    width: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.ps-modal__info {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    flex: 1;
}
.ps-modal__info h2 {
    font-size: 24px;
    font-weight: 900;
    color: #111;
}
.ps-modal__desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.ps-modal__price {
    font-size: 28px;
    font-weight: 900;
    color: #e31b23;
}
.ps-modal__wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    padding: 13px 20px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.15s;
    animation: waPulse 2.5s ease-in-out infinite;
    margin-top: 6px;
}
.ps-modal__wa-btn:hover {
    background: #1da851;
    transform: scale(1.03);
    animation: none;
}

/* =====================
   RESPONSIVE - TABLET
   ===================== */
@media (max-width: 1024px) {
    .ps-products-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 20px;
        gap: 16px;
    }
    .ps-hero-container { padding: 0 20px; }
    .ps-header { padding: 10px 20px; }
    .ps-utility-nav { padding: 7px 20px; }
}

/* =====================
   RESPONSIVE - MOBILE
   ===================== */
@media (max-width: 640px) {

    /* Promo bar */
    .ps-promo-bar { font-size: 11px; padding: 8px 12px; line-height: 1.4; }

    /* Utility nav — ocultar en móvil */
    .ps-utility-nav { display: none; }

    /* Header compacto */
    .ps-header { padding: 10px 14px; }
    .ps-header__inner { gap: 10px; }
    .ps-logo img { height: 32px; }

    /* Buscador ocupa todo el ancho disponible */
    .ps-search { margin: 0; max-width: none; flex: 1; }
    .ps-search__input { padding: 8px 40px 8px 10px; font-size: 13px; }

    /* Ocultar texto de cuenta, mostrar solo íconos */
    .ps-account__text { display: none; }
    .ps-account { gap: 8px; }
    .ps-account__hearts svg { width: 26px; height: 22px; }
    .ps-cart svg { width: 22px; height: 22px; }

    /* Nav scrollable horizontal */
    .ps-main-nav__inner {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 10px;
    }
    .ps-main-nav__inner::-webkit-scrollbar { display: none; }
    .ps-nav-link { padding: 11px 12px; font-size: 12px; }

    /* Feedback tab oculto en móvil */
    .ps-feedback-tab { display: none; }

    /* Hero sin padding lateral */
    .ps-hero-container { padding: 0; }

    /* Save BIG */
    .ps-save-big { padding: 20px 0 6px; }
    .ps-save-big__title { font-size: 22px; }

    /* Grid 2 columnas en móvil */
    .ps-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 12px;
        margin: 12px auto 30px;
    }

    /* Card más compacta */
    .ps-product-card { border-radius: 10px; }
    .ps-product-card__label { font-size: 12px; padding: 8px 6px 2px; }
    .ps-product-card__price { font-size: 13px; padding: 2px 6px 6px; }
    .ps-card__wa-btn {
        font-size: 11px;
        padding: 7px 8px;
        gap: 4px;
        width: calc(100% - 12px);
        margin: 0 6px 8px;
        border-radius: 7px;
    }
    .ps-card__wa-btn svg { width: 13px; height: 13px; }

    /* Modal vertical en móvil */
    .ps-modal-overlay { padding: 10px; align-items: flex-end; }
    .ps-modal {
        flex-direction: column;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        overflow-y: auto;
    }
    .ps-modal__img {
        width: 100%;
        height: 240px;
        object-fit: cover;
    }
    .ps-modal__info {
        padding: 20px 20px 28px;
        gap: 10px;
    }
    .ps-modal__info h2 { font-size: 20px; }
    .ps-modal__price { font-size: 24px; }
    .ps-modal__desc { font-size: 13px; }
    .ps-modal__wa-btn { font-size: 14px; padding: 12px 16px; }
    .ps-modal__close { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 18px; }
}

/* Extra pequeño — 1 columna si es muy angosto */
@media (max-width: 360px) {
    .ps-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 8px;
    }
    .ps-save-big__title { font-size: 19px; }
}

/* MODAL ACTIONS - two buttons side by side */
.ps-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.ps-modal__call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #2b7cf1;
    color: white;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    padding: 13px 20px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.15s;
    font-family: 'Roboto', sans-serif;
}
.ps-modal__call-btn:hover {
    background: #1a5fcf;
    transform: scale(1.02);
}

/* CONTACT FORM */
.ps-contact-form { margin-top: 4px; }

.ps-form__title {
    font-size: 17px;
    font-weight: 900;
    color: #111;
    margin-bottom: 4px;
}
.ps-form__subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.4;
}

.ps-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.ps-form__field label {
    font-size: 12px;
    font-weight: 700;
    color: #333;
}
.ps-form__field input {
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.ps-form__field input:focus { border-color: #2b7cf1; }

.ps-form__btns {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.ps-form__back {
    flex: 1;
    padding: 11px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #555;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s;
}
.ps-form__back:hover { background: #e0e0e0; }

.ps-form__submit {
    flex: 2;
    padding: 11px;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s, transform 0.15s;
    animation: waPulse 2.5s ease-in-out infinite;
}
.ps-form__submit:hover {
    background: #1da851;
    transform: scale(1.02);
    animation: none;
}
.ps-form__submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.ps-form__success {
    background: #e6f9ee;
    color: #1a7a3c;
    border: 1px solid #a3e4b7;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}
.ps-form__error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

/* Mobile adjustments for form */
@media (max-width: 640px) {
    .ps-modal__call-btn { font-size: 14px; padding: 11px 16px; }
    .ps-form__title { font-size: 15px; }
}

/* FIX — estado inicial del modal */
#contactForm  { display: none; }
#modalActions { display: flex; }
