/* ===================================
   BBR Fragrance - Custom Styles
   Premium Perfume Store
   =================================== */

/* Fuentes personalizadas */
body {
    font-family: 'Inter', sans-serif;
}

/* ===== Logo Styles ===== */
.nav-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(201, 169, 110, 0.4);
    padding: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.logo a:hover .nav-logo {
    border-color: rgba(201, 169, 110, 0.75);
    box-shadow: 0 4px 14px rgba(201, 169, 110, 0.22);
}

.logo a:hover span {
    color: #D4BA85;
}

.hero-logo {
    width: 14rem;
    height: 14rem;
    object-fit: contain;
    border-radius: 50%;
    padding: 1.75rem;
    background: #ffffff;
    border: 3px solid rgba(201, 169, 110, 0.6);
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.12),
        0 0 0 12px rgba(201, 169, 110, 0.08),
        0 0 50px rgba(201, 169, 110, 0.3),
        0 20px 45px -10px rgba(0, 0, 0, 0.45);
    animation: heroLogoFadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1), heroLogoFloat 6s ease-in-out infinite 1.4s;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-logo:hover {
    transform: scale(1.04);
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.16),
        0 0 0 14px rgba(201, 169, 110, 0.12),
        0 0 70px rgba(201, 169, 110, 0.45),
        0 24px 50px -10px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-logo {
        width: 19rem;
        height: 19rem;
    }
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heroLogoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.footer-logo {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(201, 169, 110, 0.35);
    padding: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.footer-logo:hover {
    border-color: rgba(201, 169, 110, 0.65);
    box-shadow: 0 4px 18px rgba(201, 169, 110, 0.2);
}

.admin-login-logo {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(201, 169, 110, 0.4);
    box-shadow: 0 4px 30px rgba(201, 169, 110, 0.15);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Colores personalizados */
:root {
    --color-gold: #C9A96E;
    --color-gold-light: #D4BA85;
    --color-gold-dark: #A8884E;
    --color-black: #000000;
    --color-gray-dark: #1F2937;
    --color-white: #FFFFFF;
}

/* Hero Pattern Background */
.hero-pattern {
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(201, 169, 110, 0.03) 35px, rgba(201, 169, 110, 0.03) 70px);
}

/* Animaciones personalizadas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    color: var(--color-white);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Cards de categorias */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: 0 10px 30px rgba(201, 169, 110, 0.2);
}

/* Cards de productos */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.1);
}

/* Input personalizado */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

/* Checkbox personalizado */
input[type="checkbox"] {
    accent-color: var(--color-gold);
    cursor: pointer;
}

input[type="radio"] {
    accent-color: var(--color-gold);
    cursor: pointer;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1F2937;
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}

/* Efectos de hover en enlaces */
a {
    transition: color 0.3s ease;
}

/* Tabs */
.tab-btn {
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn.active {
    color: var(--color-gold);
    background: rgba(201, 169, 110, 0.1);
}

/* Galeria de imagenes */
.image-gallery {
    position: relative;
}

.image-gallery .thumbnail {
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-gallery .thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--color-gold);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(201, 169, 110, 0.1);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #C9A96E 0%, #A8884E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Checkout step indicators */
.checkout-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Quantity input - hide spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Date input calendar icon - improve visibility on dark backgrounds */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(0.3) saturate(2) hue-rotate(5deg);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(0.8) sepia(0.5) saturate(3) hue-rotate(5deg);
}

/* ===== Products List View ===== */
#products-grid.list-view {
    grid-template-columns: 1fr !important;
    gap: 1rem;
}

#products-grid.list-view .product-item,
#products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

#products-grid.list-view .product-item > .relative,
#products-grid.list-view .product-card > .relative {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
}

#products-grid.list-view .product-item > .relative .h-64,
#products-grid.list-view .product-item > .relative .h-72,
#products-grid.list-view .product-card > .relative .h-64,
#products-grid.list-view .product-card > .relative .h-72 {
    height: 100% !important;
}

#products-grid.list-view .product-item > .p-6,
#products-grid.list-view .product-card > .p-6 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#products-grid.list-view .product-item:hover,
#products-grid.list-view .product-card:hover {
    transform: none !important;
}

@media (max-width: 640px) {
    #products-grid.list-view .product-item,
    #products-grid.list-view .product-card {
        flex-direction: column;
    }
    #products-grid.list-view .product-item > .relative,
    #products-grid.list-view .product-card > .relative {
        width: 100%;
        min-width: unset;
    }
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Social share buttons */
.social-share button {
    transition: all 0.3s ease;
}

.social-share button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(201, 169, 110, 0.3);
}

/* Filter sidebar */
.filter-sidebar {
    position: sticky;
    top: 100px;
}

/* Product badge */
.badge-new,
.badge-sale,
.badge-hot {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(201, 169, 110, 0);
    }
}

/* Testimonial card */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Newsletter input */
.newsletter-input {
    position: relative;
}

.newsletter-input input {
    padding-right: 120px;
}

.newsletter-input button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #1F2937;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Search bar */
.search-bar {
    position: relative;
}

.search-bar input {
    padding-left: 40px;
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

/* Mobile menu */

#mobile-menu {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(
        90deg,
        #1F2937 25%,
        #374151 50%,
        #1F2937 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh !important;
    }
}

/* Print styles */
@media print {
    nav, footer, .modal-backdrop, .modal-overlay,
    #search-modal, #cart-modal, #admin-sidebar,
    [class*="fixed bottom-"][class*="right-"] {
        display: none !important;
    }
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Notification animation */
@keyframes fadeInUpNotif {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product item hover */
.product-item {
    transition: all 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.product-item img {
    transition: transform 0.3s ease;
}

.product-item:hover img {
    transform: scale(1.1);
}

/* Disabled button */
button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Transición base de botones */
button:not([disabled]) {
    transition: all 0.22s ease;
}

button:not([disabled]):active {
    transform: scale(0.96);
}

/* ── Botones ámbar / CTA ── */
button.bg-amber-500:not([disabled]):hover,
a.bg-amber-500:hover,
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.38);
}

/* ── Links de nav: subrayado deslizante ── */
nav ul a {
    position: relative;
    padding-bottom: 2px;
}
nav ul a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    border-radius: 2px;
    transition: width 0.28s ease;
}
nav ul a:hover::after,
nav ul a.text-amber-400::after {
    width: 100%;
}

/* ── Botones de vista (grid/list) ── */
#grid-view,
#list-view {
    transition: all 0.2s ease;
}
#grid-view:not(.bg-amber-500):hover,
#list-view:not(.bg-amber-500):hover {
    color: var(--color-gold);
    border-color: rgba(201, 169, 110, 0.5);
    background: rgba(201, 169, 110, 0.07);
}
#grid-view.bg-amber-500,
#list-view.bg-amber-500 {
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.2);
}

/* ── Tarjetas de categoría: lift dorado ── */
.category-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.category-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 14px 30px rgba(201, 169, 110, 0.18) !important;
    border-color: rgba(201, 169, 110, 0.45) !important;
}

/* ── Tarjetas de producto: lift suave ── */
.product-card,
.product-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}
.product-card:hover,
.product-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 36px rgba(201, 169, 110, 0.15) !important;
    border-color: rgba(201, 169, 110, 0.5) !important;
}

/* ── Labels del sidebar de filtros ── */
.filter-sidebar label {
    transition: color 0.18s ease;
}
.filter-sidebar label:hover {
    color: var(--color-gold);
}

/* ── Botones de borde ámbar (CTA outline) ── */
a.border-amber-500:hover,
button.border-amber-500:not([disabled]):hover {
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.28);
}

/* Selection color */
::selection {
    background-color: var(--color-gold);
    color: #000000;
}

/* ===========================
   Tema Claro / Light Theme
   =========================== */

/* Hero — imagen de fondo */
.hero-section {
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fondos de secciones */
#categorias {
    background: #f9fafb;
    background-image: none;
}

#productos {
    background: #ffffff;
}

#guia {
    background: #f9fafb;
    background-image: none;
}

#beneficios {
    background: #ffffff;
}

#testimonios {
    background: #ffffff;
}

#sobre-nosotros {
    background: #ffffff;
}

#contacto {
    background: #f9fafb;
}

/* Tarjetas de categoría */
.category-card {
    background: #ffffff !important;
    backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.category-card:hover {
    background: #fffbf0 !important;
    box-shadow: 0 8px 24px rgba(201, 169, 110, 0.2);
}

.category-card p {
    color: #6b7280 !important;
}

/* Tarjetas de familias olfativas */
#guia h4 {
    color: #111827;
}

#guia p {
    color: #6b7280;
}

/* Textos en secciones claras */
#categorias .text-gray-400,
#productos .text-gray-400 {
    color: #6b7280;
}

#beneficios .text-gray-400 {
    color: #4b5563;
}

#testimonios .text-gray-300 {
    color: #374151;
}

#testimonios .text-gray-400 {
    color: #6b7280;
}

#sobre-nosotros .text-gray-300 {
    color: #374151;
}

#sobre-nosotros .text-gray-400 {
    color: #6b7280;
}

#contacto .text-gray-300 {
    color: #374151;
}

#contacto .text-gray-400 {
    color: #4b5563;
}

/* Inputs en sección de contacto */
#contacto input,
#contacto textarea {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

/* Scrollbar tema claro */
::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* Tarjetas de productos (generadas por JS) */
.product-card,
.product-item {
    background: #ffffff !important;
    backdrop-filter: none;
    border-color: #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-card:hover,
.product-item:hover {
    box-shadow: 0 12px 30px rgba(201, 169, 110, 0.14) !important;
    border-color: rgba(201, 169, 110, 0.55) !important;
}

.product-card .text-gray-400,
.product-item .text-gray-400 {
    color: #6b7280;
}

/* Skeleton tema claro */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%) !important;
    background-size: 200% 100% !important;
}

/* Tabs en fondo claro */
.tab-btn {
    color: #374151;
}

.tab-btn:hover {
    background: #f9fafb;
}

.tab-btn.active {
    color: var(--color-gold);
    background: rgba(201, 169, 110, 0.08);
}

/* Contenido dinámico del detalle de producto */
#product-content .text-gray-300 { color: #374151; }
#product-content .text-gray-400 { color: #6b7280; }
#product-content .bg-gray-800   { background-color: #f3f4f6 !important; color: #374151; }
#product-content .border-gray-700,
#product-content .border-gray-800 { border-color: #e5e7eb; }
#product-content .hover\:bg-gray-800:hover { background-color: #f3f4f6 !important; }

/* Tabla de información del producto */
#tab-info-content .border-gray-700 { border-color: #e5e7eb; }
#tab-info-content .text-gray-400   { color: #6b7280; }

/* Texto de descripción del producto */
#tab-description-text { color: #374151; }
