/* Estilos propios de COMMERCE.SITE. Los colores provienen del tema Bootswatch activo. */

/* Barra superior de mensajes */
.topbar { padding: .35rem 0; }
.topbar a { color: inherit; text-decoration: underline; }
.topbar .carousel-item { transition-duration: .6s; }

/* Cabecera */
.brand-logo { max-height: 60px; max-width: 100%; width: auto; }
.brand-text { font-weight: 800; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.02em; }
/* Buscador, lupa y "Descargar comprobante" comparten el mismo alto en cualquier tema. */
:root { --search-height: 2.75rem; }
.search-form .form-control { height: var(--search-height); border-right: 0; }
.search-form .btn { font-size: 1.1rem; height: var(--search-height); }
.btn-receipt {
    display: inline-flex; align-items: center; justify-content: center;
    height: var(--search-height); margin-left: .5rem; padding-top: 0; padding-bottom: 0;
}
/* En celulares pasa a una línea propia, a todo el ancho, para no achicar el buscador. */
@media (max-width: 575.98px) {
    .btn-receipt { width: 100%; margin-left: 0; margin-top: .5rem; }
}
.header-contact .btn { white-space: nowrap; }

/* Menú principal */
.site-nav { padding-top: .25rem; padding-bottom: .25rem; }
.site-nav .nav-link { font-weight: 500; }
.site-nav .dropdown-menu { max-height: 70vh; overflow-y: auto; }

/* Carrusel de portada */
.home-carousel .banner-img { object-fit: cover; height: 440px; }
.home-carousel .carousel-caption {
    left: 8%; right: auto; bottom: 18%; max-width: 560px;
    background: rgba(0, 0, 0, .45); border-radius: .5rem; padding: 1.25rem 1.5rem;
}
.banner-title { font-weight: 800; font-size: 2.2rem; }
.banner-subtitle { font-size: 1.15rem; }
@media (max-width: 991.98px) { .home-carousel .banner-img { height: 320px; } .banner-title { font-size: 1.6rem; } }
@media (max-width: 767.98px) {
    .home-carousel .banner-img { height: 230px; }
    .home-carousel .has-mobile .banner-img { height: auto; max-height: 520px; }
    .home-carousel .carousel-caption { left: 5%; right: 5%; bottom: 2.2rem; padding: .6rem .8rem; }
    .banner-title { font-size: 1.15rem; margin-bottom: .25rem; }
    .banner-subtitle { font-size: .85rem; }
    .home-carousel .carousel-caption .btn { padding: .25rem .6rem; font-size: .85rem; }
}
.hero-default { background: linear-gradient(135deg, rgba(0,0,0,.03), rgba(0,0,0,.08)); }

/* Títulos de sección */
.section-title { font-weight: 800; font-size: 1.5rem; margin-bottom: 1.25rem; position: relative; }
.section-head .section-title::after, .section-title::after {
    content: ""; display: block; width: 48px; height: 4px; margin-top: .4rem;
    background: var(--primary); border-radius: 2px;
}

/* Categorías */
.category-tile:hover { text-decoration: none; }
.category-circle {
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    width: 96px; height: 96px; border-radius: 50%;
    background: rgba(0, 0, 0, .05); color: var(--primary); font-size: 2.4rem;
    border: 2px solid transparent; transition: transform .2s, border-color .2s;
}
.category-circle img { width: 100%; height: 100%; object-fit: cover; }
.category-tile:hover .category-circle { transform: translateY(-4px); border-color: var(--primary); }
.category-name { font-weight: 600; font-size: .9rem; line-height: 1.2; }
@media (max-width: 575.98px) { .category-circle { width: 72px; height: 72px; font-size: 1.8rem; } .category-name { font-size: .8rem; } }

/* Tarjetas de producto */
.product-card { position: relative; transition: box-shadow .2s, transform .2s; }
.product-card:hover { box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .12) !important; transform: translateY(-2px); }
.product-img-wrap { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; border-radius: inherit; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; transition: transform .25s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.5em; line-height: 1.25;
}
.product-brand { font-size: .7rem; letter-spacing: .04em; }
.badge-offer { position: absolute; top: .6rem; left: .6rem; z-index: 2; font-size: .85rem; }
.price-old { text-decoration: line-through; }

/* Detalle de producto */
.product-gallery .carousel-item { aspect-ratio: 1 / 1; background: #fff; }
.product-gallery .carousel-item img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.product-gallery .carousel-control-prev-icon,
.product-gallery .carousel-control-next-icon { background-color: rgba(0, 0, 0, .45); border-radius: 50%; padding: 1.1rem; background-size: 50%; }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: contain; background: #fff; cursor: pointer; margin: 0 .5rem .5rem 0; padding: 2px; border-width: 2px !important; }
.gallery-thumbs img.active { border-color: var(--primary) !important; }
.product-price-box { background: rgba(0, 0, 0, .04); }
.product-description { line-height: 1.7; }

/* Pie de página */
.site-footer a { color: inherit; opacity: .85; }
.site-footer a:hover { opacity: 1; }
.site-footer li { margin-bottom: .35rem; }
.footer-muted { opacity: .75; }
.footer-hr { border-color: currentColor; opacity: .2; }
.footer-contact i { width: 1.2rem; display: inline-block; }
.social-links a { font-size: 1.4rem; margin-right: .75rem; }

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 1030;
    width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #25d366; color: #fff !important; font-size: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); text-decoration: none; }

/* Pedidos: carrito y checkout (solo visibles si Pedidos está activado) */
/* Mismo alto que el buscador, la lupa y "Descargar comprobante" (variable --search-height). */
.cart-btn, .header-login {
    display: inline-flex; align-items: center; justify-content: center;
    height: var(--search-height); padding-top: 0; padding-bottom: 0; vertical-align: middle;
}
/* En botones flex el espacio inicial del texto se pierde: se separa el ícono con margen. */
.btn-label { margin-left: .4rem; }
.cart-btn .badge { margin-left: .35rem; }
.header-login { margin-left: .25rem; }
.qty-input { width: 80px; }
.cart-thumb { width: 64px; height: 64px; object-fit: contain; background: #fff; }
.cart-table td { vertical-align: middle; }
.step {
    display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
    border-radius: 50%; background: var(--primary); color: #fff; font-size: .85rem; margin-right: .4rem;
}
.ship-map { height: 340px; width: 100%; z-index: 0; }
.map-search { max-width: 420px; flex: 1 1 260px; }
.payment-option { cursor: pointer; }
.checkout-summary { position: sticky; top: 1rem; }
.yape-qr { width: 200px; height: 200px; object-fit: contain; background: #fff; }
.transfer-details { white-space: normal; line-height: 1.7; }
.shop-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); z-index: 1060;
    max-width: 92vw; margin: 0; opacity: 0; transition: transform .25s, opacity .25s;
}
.shop-toast.show { transform: translate(-50%, 0); opacity: 1; }
