/* Estilos personalizados para Tienda Online */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
}

/* Général */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

main {
    flex: 1;
}

/* Promo Banner */
.promo-banner {
    font-size: 0.85rem;
    position: relative;
    z-index: 1050;
}

.navbar {
    z-index: 1040;
}

/* Megamenú */
.mega-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0;
    width: 700px;
    border-radius: 0 0 12px 12px;
    border-top: 2px solid #0d6efd;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
}

/* Countdown Banner */
.countdown-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.countdown-timer span {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Hero Slider */
.hero-slider {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

/* Paginación dentro del banner, estilo pill */
.hero-slider .swiper-pagination {
    bottom: 16px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 6px 14px;
    border-radius: 20px;
}

.hero-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    margin: 0 !important;
}

.hero-slider .swiper-pagination-bullet-active {
    background: #ffffff;
    width: 10px;
    height: 10px;
}

@media (max-width: 768px) {

    .hero-slider,
    .hero-slider .swiper-slide img {
        height: 200px;
    }
}



/* Category Cards Mini */
.category-card-mini {
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Product Cards - Estilo DermaExpress */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    background: #fff;
}

.product-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

.product-old-price {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: line-through;
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.badge-discount-small {
    background: var(--danger-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

/* Rating */
.rating {
    font-size: 0.75rem;
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* Brand Logos */
.brand-logo {
    display: inline-block;
    padding: 10px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.brand-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Category Banner */
.category-banner h3 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Trust Items */
.trust-item {
    padding: 1.5rem;
}

.trust-item i {
    margin-bottom: 0.5rem;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
}

.navbar-light .navbar-nav .nav-link {
    font-weight: 500;
    color: #495057;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Botones */
.btn-primary {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary {
    border-radius: 8px;
}

/* .btn-orange {
    background-color: rgb(248, 218, 194);
    border-color: rgb(248, 218, 194);
    color: #000000;
}

.btn-orange:hover {
    background-color: rgb(248, 218, 194);
    border-color: rgb(248, 218, 194);
    color: #000000;
} */

.btn-orange {
    position: relative;
    background-color: rgb(248, 218, 194);
    border-color: rgb(248, 218, 194);
    color: #000000;
    overflow: visible !important;
    isolation: isolate;
    /* crea stacking context propio */
}

.btn-orange::after {
    content: '';
    position: absolute;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: rgb(0, 0, 0);
    z-index: -1;

    /* Centrado respecto al botón */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.btn-orange:hover {
    background-color: rgb(248, 218, 194);
    border-color: rgb(248, 218, 194);
    color: rgb(0, 0, 0);

}

.btn-orange:hover::after {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.06;
}

/* Formularios */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Cart Item */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-summary {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Responsive */
@media (max-width: 991px) {
    .mega-menu {
        width: 100%;
        max-height: 400px;
        overflow-y: auto;
    }

    .hero-slider {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .countdown-banner {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }

    .hero-slider {
        height: 200px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-section {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .promo-banner .container {
        flex-direction: column;
        gap: 5px;
    }
}

/* Card de producto hover */
.product-card .btn {
    font-size: 0.85rem;
    padding: 0.5rem;
}

.product-card:hover .btn-primary {
    background: #0b5ed7;
}

/* WhatsApp float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Cart float */
.car-float {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgb(29, 137, 121);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s;
}

.car-float:hover {
    transform: scale(1.1);
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: #1a1a2e;
    /* cambia el color de fondo aquí */
    padding: 5px 0;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 22s linear infinite;
}

/* Pausa al hacer hover (opcional, quita si no quieres) */
.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    white-space: nowrap;
    padding: 0 48px;
    font-size: 15px;
    color: #ffffff;
    /* cambia el color del texto aquí */
    font-family: sans-serif;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.categorias-menu {
    font-size: 12px;
    font-style: normal !important;
    letter-spacing: 1px;
}

.nav-link.active,
.nav-link:hover {
    border-bottom: 2px solid #afafaf;
    /* color naranja del logo */
    color: #616161 !important;
}

@media (min-width: 992px) {
    .navbar>.container {
        flex-wrap: nowrap;
    }

    .navbar-nav.d-lg-flex {
        flex-direction: row !important;
    }
}

.nav-item {
    margin: 5px !important;
}

/* Barra de busqueda */
.search-overlay {
    position: fixed;
    top: 0;
    /* ajusta al alto de tu navbar si es necesario */
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1050;
    padding: 46px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    /* Animación */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (min-width: 992px) {
    .search-overlay {
        padding: 49px 24px;
    }
}

.search-overlay.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.search-overlay-inner {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.search-overlay-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.search-overlay-input::placeholder {
    color: #aaa;
}

.search-overlay-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #555;
    line-height: 1;
}

.search-overlay-close:hover {
    color: #000;
}

.btn-custom::hover {
    background-color: rgb(229, 248, 242);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* o 4/3, según tu catálogo */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #fff;
    /* fondo neutro si la imagen no llena el espacio */
}