/*
 * ===== Shared responsive base layer =====
 * Breakpoints (Bootstrap 4): mobile <576px · tablet 576-991px · desktop >=992px.
 * Prefer `max-width: 767.98px` / `min-width: 576px` to stay aligned with the grid.
 * This block holds transversal responsive rules reused across all pages so that
 * fixes stay systemic (one rule) instead of per-page patches.
 */

/* Horizontal-overflow containment. Se usa overflow-x: clip (no hidden) a
 * proposito: `hidden` convierte overflow-y en `auto` (regla CSS visible->auto),
 * lo que junto a height:100% del tema padre convertia html/body en un contenedor
 * de scroll de altura fija y hacia aparecer siempre scroll vertical. `clip` clipa
 * el desbordamiento horizontal sin tocar overflow-y (sigue `visible`), de modo
 * que el documento scrollea con normalidad (solo cuando el contenido excede).
 * NOTE: never rely on this to hide real content — fix fixed-width offenders too. */
html,
body {
    overflow-x: clip;
}

/* El tema padre pone body{overflow:hidden} (ambos ejes). Eso, con height:100%,
   dejaba el body como caja fija que recortaba/forzaba scroll. Restauramos el
   scroll vertical normal del documento. */
body {
    overflow-y: visible;
}

/* Fluid media: images/videos never overflow their container nor deform ratio. */
img,
video {
    max-width: 100%;
    height: auto;
}

/* Long unbreakable strings (SKUs, URLs, long product names) wrap instead of
 * pushing the layout wider than the viewport. */
.rw-break {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Data-table reflow helper: wrap a wide table in this to keep the scroll
 * contained inside the block instead of overflowing the whole page. */
.rw-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Minimum touch target on mobile for interactive controls that would otherwise
 * render below the 44px accessibility guideline. Apply via this class where the
 * markup renders tight controls. */
@media (max-width: 767.98px) {
    .rw-tap {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===== CSS Custom Properties ===== */
:root {
    /* Brand colors */
    --color-pink: #cd0e6b;
    --color-primary: var(--color-pink); /* alias del color de marca (paridad con reunidas/quevedo) */
    --pdp-thumb-selected: var(--color-primary); /* miniatura seleccionada (galería #17) */
    --color-blue: #3b8cc9;
    --color-dark-pink: #af1669;
    --color-purple: #4F177D;

    /* Neutral colors */
    --color-white: #fff;
    --color-gray-light-bg: #e8e9e9;
    --color-gray-border: #e5e7eb;
    --color-gray-text: #a3a0a0;
    --color-gray-dark: #7e7e7e;
    --color-gray-medium: #777;
    --color-gray-input: #9c9b9b;
    --color-text-dark: #333;
    --color-text-heading: #111;

    /* Fonts */
    --font-brand: 'vagroundedblackssibold';
    --font-body: "Open Sans", sans-serif;
    --font-body-condensed: "Open Sans Condensed", sans-serif;
    --font-montserrat: 'Montserrat', sans-serif;

    /* Ancho maximo del contenedor global (fuente unica de verdad por tienda) */
    --container-max-width: 1360px;

    /* Common values */
    --btn-height: 40px;
    --btn-radius: 20px;
    --btn-radius-lg: 25px;
    --input-radius: 25px;
    --section-min-height: 6.75rem;
    --transition-fast: 0.2s ease;
}

/* ===== Ancho del contenedor global =====
   Bootstrap da al .container anchos FIJOS por breakpoint (540/720/960/1140px),
   dejando margenes laterales sin aprovechar sobre todo en tablet (a 900px el
   container quedaba en 720px). Lo hacemos fluido en TODOS los tamaños: ocupa el
   ancho disponible (con su padding lateral de 15px) y solo se limita a
   --container-max-width en pantallas grandes. Va sin media query para pisar los
   width fijos del tema padre en cada breakpoint (misma especificidad, gana por
   orden de fuente al cargar despues). */
.container {
    width: 100%;
    max-width: var(--container-max-width);
}

/* En movil el padding lateral de 15px basta, pero al ser el container fluido en
   tablet/escritorio el contenido quedaba muy pegado a los bordes (solo 15px).
   Se amplia el padding lateral a partir de 768 para dar aire. */
@media (min-width: 768px) {
    .container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ===== Shared: Blue rounded button ===== */
.btn-brand,
.products-actions .button-add-cart,
.product-actions .add-to-cart,
.form-footer button,
.button-continue-checkout,
body#checkout .checkout-step .continue.btn-primary,
body#checkout section.checkout-step .edit-address,
body#checkout section.checkout-step .delete-address,
.page-my-account #content .links a,
.container-brands .container-title-btn .titulo .btn-brands,
.card-block.checkout .btn-primary,
#payment-confirmation .btn-primary,
.cart-grid-body .card-block .label {
    color: var(--color-white);
    background: var(--color-pink);
    border-color: transparent;
    border: none;
    height: var(--btn-height);
    border-radius: var(--btn-radius);
    padding: 0 25px;
    line-height: var(--btn-height);
    font-family: var(--font-brand);
    text-transform: uppercase;
    text-align: center;
    font-size: 14px;
    font-weight: normal;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-brand:hover,
.products-actions .button-add-cart:hover,
.product-actions .add-to-cart:hover,
.form-footer button:hover,
.button-continue-checkout:hover,
body#checkout .checkout-step .continue.btn-primary:hover,
body#checkout section.checkout-step .edit-address:hover,
body#checkout section.checkout-step .delete-address:hover,
.page-my-account #content .links a:hover,
.container-brands .container-title-btn .titulo .btn-brands:hover,
.card-block.checkout .btn-primary:hover,
#payment-confirmation .btn-primary:hover,
.cart-grid-body .card-block .label:hover {
    background: var(--color-blue);
    cursor: pointer;
}

/* ===== Shared: Section header block ===== */
.section-header,
.block-category,
.brands-container-title,
.header-cart-grid,
.block-footer-links {
    min-height: var(--section-min-height);
    position: relative;
    display: block;
    padding: 20px 20px 8px;
    border-radius: 0;
}

/* ===== Shared: Section header title ===== */
.section-header-title,
.block-category h1,
.brands-container-title .brands-title,
.header-cart-grid .title {
    font-family: var(--font-brand);
    font-size: 2rem;
    text-align: center;
    color: var(--color-dark-pink);
    margin-top: 1rem;
    font-weight: normal;
    line-height: 1.1;
    text-transform: uppercase;
}

/* ===== Shared: Form input style ===== */
.form-input-brand,
body#checkout section.checkout-step #customer-form .form-group input[type="text"],
body#checkout section.checkout-step #customer-form .form-group input[type="email"],
body#checkout section.checkout-step #checkout-login-form #field-password,
body#checkout section.checkout-step #checkout-login-form input[type="email"],
body#checkout section.checkout-step #customer-form .field-password-policy #field-password,
body#checkout section.checkout-step #delivery-address .form-fields input[type="text"],
body#checkout section.checkout-step #delivery-address .form-fields input[type="tel"],
body#checkout section.checkout-step #invoice-address .form-fields input[type="text"],
body#checkout section.checkout-step #invoice-address .form-fields input[type="tel"],
.login-form form .form-group input[type="email"],
.login-form form .form-group input[type="password"],
.register-form #customer-form .form-group input[type="text"],
.register-form #customer-form .form-group input[type="email"],
.register-form #customer-form .form-group input[type="password"],
.forgotten-password .form-group input[type="email"],
.renew-password .form-group input[type="password"],
.page-content:has(.contact-form) form .form-fields .form-group input[type="text"],
.page-content:has(.contact-form) form .form-fields .form-group input[type="email"] {
    display: block;
    width: 100%;
    height: var(--btn-height);
    padding: 10px 20px;
    font-size: 13px;
    line-height: 1.42857;
    color: var(--color-gray-input);
    vertical-align: middle;
    background-color: var(--color-gray-light-bg);
    border: none;
    border-radius: var(--input-radius);
}

#wrapper {
    padding-top: 3rem;
}

body#index #wrapper {
    padding-top: 0;
}

/* En móvil/tablet el header fijo ya deja su hueco (margin-top del wrapper), así
   que el padding-top de 3rem separa demasiado el primer contenido (breadcrumb o
   título) del header. Se reduce en <=991px. El home no se ve afectado: la regla
   body#index #wrapper (más específica) sigue ganando con padding-top:0. */
@media (max-width: 991.98px) {
    #wrapper {
        padding-top: 0.75rem;
    }
}

/* ===== Shared: Modal styling ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 2px solid var(--color-pink);
    padding: 1.2rem 1.5rem;
}

.modal-header .modal-title,
.modal-header .h5,
.modal-header h5,
.wishlist-modal .modal-header h5 {
    font-family: var(--font-brand);
    font-weight: normal;
    color: var(--color-dark-pink);
    text-transform: uppercase;
    font-size: 1.1rem;
}

.modal-header .close {
    color: var(--color-gray-dark);
    opacity: 0.6;
    font-size: 1.5rem;
}

.modal-body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1rem 1.5rem 1.5rem;
}

.modal-footer .btn-primary {
    color: var(--color-white);
    background: var(--color-pink);
    border: none;
    border-radius: var(--btn-radius);
    font-family: var(--font-brand);
    font-weight: normal;
    text-transform: uppercase;
    padding: 0 25px;
    height: var(--btn-height);
    line-height: var(--btn-height);
    transition: background var(--transition-fast);
}

.modal-footer .btn-primary:hover {
    background: var(--color-blue);
}

.modal-footer .btn-secondary,
.modal-footer .btn-outline-secondary {
    border-radius: var(--btn-radius);
    height: var(--btn-height);
    line-height: var(--btn-height);
    padding: 0 25px;
    font-family: var(--font-body);
    font-weight: 600;
}

/* ===== Shared: Alert styling ===== */
.ps-alert-success,
.ps-alert-error {
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
}

.ps-alert-success .item,
.ps-alert-error .item {
    display: flex;
    align-items: center;
    border: none;
    border-radius: var(--btn-radius);
    margin-bottom: 0.5rem;
    padding: 14px 18px;
    gap: 12px;
}

.ps-alert-success .item {
    background-color: #f0faf4;
}

.ps-alert-error .item {
    background-color: #fdf0f5;
}

.ps-alert-success .item i,
.ps-alert-error .item i {
    border: none;
    padding: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-alert-success .item i {
    background-color: #2e7d32;
}

.ps-alert-error .item i {
    background-color: var(--color-pink);
}

.ps-alert-success .item i svg,
.ps-alert-error .item i svg {
    width: 16px;
    height: 16px;
    background-color: transparent;
}

.ps-alert-success .item p {
    font-family: var(--font-body);
    font-size: 14px;
    color: #1b5e20;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.ps-alert-error .item p {
    font-family: var(--font-body);
    font-size: 14px;
    color: #7a0a3a;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

/* ===== Shared: Bootstrap alert notifications ===== */
.alert {
    border: none;
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 14px 18px;
}

.alert.alert-success {
    background-color: #f0faf4;
    color: #1b5e20;
}

.alert.alert-danger,
.alert.alert-warning {
    background-color: #fdf0f5;
    color: #7a0a3a;
}

.alert.alert-info {
    background-color: #e8f4fd;
    color: #1a5276;
}

/* Campo de contraseña: icono de ojo en vez del texto "Mostrar/Ocultar" (login, registro, reset). */
/* El .btn del tema es flex y conserva el texto (a font-size:0) como item; por eso el icono va */
/* en un ::before absoluto que llena el botón y se centra, ignorando ese texto residual. */
.input-group-btn button[data-action="show-password"] {
  position: relative;
  font-size: 0 !important; /* colapsa el texto que inyecta el JS */
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}
.input-group-btn button[data-action="show-password"]::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Material Icons";
  content: "\E8F4"; /* visibility (ojo) */
  font-size: 1.375rem;
  line-height: 1;
}
.input-group input.js-visible-password[type="text"] ~ .input-group-btn button[data-action="show-password"]::before {
  content: "\E8F5"; /* visibility_off (ojo tachado) */
}
