/* ============================================================
   DECIBE Servicios - Estilos Globales
   ============================================================ */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #25D366;
    --color-dark: #0b1727;
    --color-text: #334155;
    --color-muted: #64748b;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8fafc;
    color: var(--color-text);
}

/* ---- Botones ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.625rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 600;
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.375rem;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--color-primary);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: scale(1.05);
}

/* ---- Nav mobile ---- */
.nav-mobile-link {
    display: block;
    color: #1e293b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all var(--transition);
    text-align: center;
}

.nav-mobile-link:hover {
    background: #f1f5f9;
    color: var(--color-primary);
}

/* ---- Product cards ---- */
.product-card {
    transition: all var(--transition);
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: #93c5fd;
    box-shadow: var(--shadow-card-hover);
}

.product-card .product-image-wrap {
    height: 12rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-card .product-image-wrap {
        height: 16rem;
    }
}

.product-card .product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.08);
}

.product-card h3 {
    transition: color var(--transition);
}

.product-card:hover h3 {
    color: var(--color-primary);
}

/* ---- Ribbon NUEVO ---- */
.ribbon-wrapper {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    z-index: 50;
    pointer-events: none;
}

.ribbon {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(45deg);
    position: absolute;
    top: 24px;
    right: -30px;
    width: 160px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    padding: 6px 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* ---- Category badge ---- */
.category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
    z-index: 40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---- Hero slider ---- */
.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-content {
    transform: translateY(24px);
    opacity: 0;
    transition: all 1s ease 0.3s;
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

/* ---- Brand carousel ---- */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
    display: flex;
    width: max-content;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ---- Social & WhatsApp ---- */
.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all var(--transition);
}

.social-icon:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.whatsapp-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition);
}

.whatsapp-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 50;
    transition: all var(--transition);
}

.whatsapp-float:hover {
    background: #1ebe5d;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 3.25rem;
        height: 3.25rem;
        font-size: 1.5rem;
    }
}

/* ---- Page hero (tienda) ---- */
.page-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ---- Category sidebar ---- */
.category-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all var(--transition);
    color: var(--color-muted);
}

.category-link:hover {
    color: var(--color-primary);
    background: #f8fafc;
}

.category-link.active {
    color: var(--color-primary);
    font-weight: 700;
    background: #eff6ff;
}

/* ---- Product detail ---- */
.product-detail-image {
    background: #0a0a0a;
    border-radius: 1rem;
    border: 1px solid #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 320px;
    width: 100%;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-detail-image {
        height: 480px;
    }
}

.product-detail-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-detail-image:hover img {
    transform: scale(1.03);
}

/* ---- Section divider ---- */
.section-divider {
    width: 4rem;
    height: 4px;
    background: var(--color-primary);
    border-radius: 9999px;
    margin: 1rem auto 0;
}

/* ---- Navbar scroll effect ---- */
#navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb .separator {
    color: #cbd5e1;
}

/* ---- Empty state ---- */
.empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--color-muted);
    background: #fff;
    border: 2px dashed #e2e8f0;
    border-radius: 1rem;
}

/* ---- Mobile category pills ---- */
.category-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--color-muted);
    transition: all var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--color-primary);
}

/* ---- Focus visible ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---- Line clamp utility ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 404 page ---- */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.error-code {
    font-size: clamp(5rem, 15vw, 8rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
