/* =============================================
   VARIABLES DEL SISTEMA DE DISEÑO
   ============================================= */
:root {
    /* Paleta clara profesional */
    --bg-color: #f0f2f5;
    --surface-color: #ffffff;
    --surface-alt: #f8f9fa;

    /* Rojo Ingenierando */
    --primary-red: #D32F2F;
    --primary-red-hover: #B71C1C;
    --primary-red-light: rgba(211, 47, 47, 0.08);

    /* Header oscuro */
    --header-bg: #1a1a1a;
    --header-border: #2a2a2a;

    /* Textos */
    --text-main: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #9ca3af;
    --text-white: #ffffff;

    /* Bordes y sombras */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);

    --youtube-red: #FF0000;
    --radius: 10px;
}

/* =============================================
   RESET Y BASE
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =============================================
   BARRA SUPERIOR INFORMATIVA
   ============================================= */
.top-bar {
    background-color: var(--header-bg);
    color: #aaa;
    font-size: 0.8rem;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.top-bar a {
    color: #ccc;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: var(--primary-red);
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* =============================================
   HEADER
   ============================================= */
.header {
    background-color: var(--header-bg);
    border-bottom: 2px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
}

/* Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.logo-img {
    height: 48px;
    width: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    box-shadow: 0 0 12px rgba(211, 47, 47, 0.4);
    transition: transform 0.3s ease;
}

.logo-section:hover .logo-img {
    transform: rotate(10deg) scale(1.05);
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff 30%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Barra de Búsqueda en el Header */
.search-section {
    flex-grow: 1;
    max-width: 550px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.search-bar:focus-within {
    border-color: var(--primary-red);
}

.search-bar input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: var(--primary-red-hover);
}

/* Botones de Acción del Header */
.actions-section {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
    color: var(--text-white);
    font-size: 1.3rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
}

.cart-icon-container:hover {
    color: var(--primary-red);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: 2px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.cart-badge.bump {
    transform: scale(1.4);
}

.login-btn {
    background: #e8eaed;
    border: 1px solid #d0d4da;
    color: #2d2d2d;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.login-btn:hover {
    background: #ffffff;
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.youtube-btn {
    background-color: var(--youtube-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

.youtube-btn:hover {
    opacity: 0.85;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 50%, #1a1a1a 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-red);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(211,47,47,0.15) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 0.8rem;
}

.hero-content h2 span {
    color: var(--primary-red);
}

.hero-content p {
    color: #aaa;
    font-size: 1.1rem;
}

/* =============================================
   LAYOUT PRINCIPAL: SIDEBAR + PRODUCTOS
   ============================================= */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.shop-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* =============================================
   SIDEBAR DE CATEGORÍAS
   ============================================= */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: var(--surface-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    overflow: hidden;
}

.sidebar-header {
    background-color: var(--primary-red);
    color: white;
    padding: 1rem 1.2rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Outfit', sans-serif;
}

.category-list {
    list-style: none;
    padding: 0.5rem 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.category-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.category-item:hover {
    background-color: var(--primary-red-light);
    color: var(--primary-red);
    border-left-color: var(--primary-red);
}

.category-item:hover i {
    color: var(--primary-red);
}

.category-item.active {
    background-color: var(--primary-red-light);
    color: var(--primary-red);
    border-left-color: var(--primary-red);
    font-weight: 600;
}

.category-item.active i {
    color: var(--primary-red);
}

/* =============================================
   SECCIÓN DE PRODUCTOS
   ============================================= */
.products-section {
    flex-grow: 1;
    min-width: 0;
}

.products-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title i {
    color: var(--primary-red);
}

.products-count {
    background-color: var(--primary-red-light);
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* =============================================
   GRID DE TARJETAS DE PRODUCTOS
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

/* Tarjeta de Producto */
.product-card {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(211, 47, 47, 0.2);
}

.product-img-wrapper {
    background-color: var(--surface-alt);
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.product-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-red);
    font-family: 'Outfit', sans-serif;
}

.stock-info {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stock-available {
    color: #16a34a;
}

.stock-empty {
    color: var(--primary-red);
}

.buy-btn {
    margin-top: auto;
    width: 100%;
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.buy-btn:hover:not(:disabled) {
    background-color: var(--primary-red-hover);
    transform: translateY(-1px);
}

.buy-btn:disabled {
    background-color: #e2e8f0;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Badge SIN STOCK */
.out-of-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    letter-spacing: 1px;
    z-index: 2;
}

/* =============================================
   MODALES (OVERLAY BASE)
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

/* =============================================
   MODAL DE AUTENTICACIÓN
   ============================================= */
.modal-content {
    background-color: #1e1e2e;
    border: 1px solid #2a2a3e;
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    color: white;
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-modal:hover {
    background: var(--primary-red);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
}

.input-group input {
    background-color: #2a2a3e;
    border: 1px solid #3a3a5e;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-red);
}

.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-hover));
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.auth-error {
    color: #ff8888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-align: center;
    min-height: 21px;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0 1rem;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #2a2a3e;
    z-index: 1;
}

.auth-divider span {
    background-color: #1e1e2e;
    padding: 0 10px;
    color: #777;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.social-auth {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #3a3a5e;
    background-color: transparent;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.google-btn:hover {
    background-color: rgba(234, 67, 53, 0.1);
    border-color: #EA4335;
    color: #EA4335;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.2rem;
    color: #777;
    font-size: 0.9rem;
}

#toggleAuthLink {
    color: var(--primary-red);
    cursor: pointer;
    font-weight: 600;
}

#toggleAuthLink:hover {
    text-decoration: underline;
}

/* =============================================
   PANEL LATERAL DEL CARRITO
   ============================================= */
.cart-panel {
    background-color: var(--surface-color);
    width: 100%;
    max-width: 420px;
    height: 100vh;
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
    border-left: 1px solid var(--border-color);
}

#cartPanelOverlay.active .cart-panel {
    transform: translateX(0);
}

.cart-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-red);
    color: white;
}

.cart-header h2 {
    font-size: 1.3rem;
    color: white;
    margin: 0;
}

.cart-header .close-modal {
    background: rgba(255,255,255,0.2);
    position: static;
}

.cart-items-container {
    flex-grow: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--surface-alt);
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 3rem;
    font-size: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: contain;
    background-color: var(--surface-alt);
    padding: 0.4rem;
    border: 1px solid var(--border-color);
}

.cart-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: var(--surface-alt);
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: var(--primary-red);
    color: white;
}

.qty-value {
    font-size: 0.9rem;
    font-weight: 600;
    width: 28px;
    text-align: center;
    color: var(--text-main);
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.3rem;
}

.remove-btn:hover {
    color: var(--primary-red);
}

.cart-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

#cartTotalPrice {
    color: var(--primary-red);
    font-size: 1.3rem;
}

#checkoutBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   BOTÓN ADMIN EN HEADER
   ============================================= */
.admin-header-btn {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
}

.admin-header-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* =============================================
   OVERLAY DE ADMIN EN TARJETAS DE PRODUCTO
   ============================================= */
.product-card {
    cursor: pointer;
}

.admin-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: rgba(124, 58, 237, 0.92);
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.product-card:hover .admin-card-overlay {
    opacity: 1;
}

.admin-card-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.admin-card-btn:hover {
    background: rgba(255,255,255,0.35);
}

.admin-card-btn.delete {
    background: rgba(220, 38, 38, 0.7);
    border-color: rgba(220, 38, 38, 0.8);
}

.admin-card-btn.delete:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* =============================================
   MODAL DE DETALLE DE PRODUCTO
   ============================================= */
.product-detail-modal {
    background: var(--surface-color);
    border-radius: 16px;
    width: 90%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.detail-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(0,0,0,0.08);
    color: var(--text-main);
}

.detail-close-btn:hover {
    background: var(--primary-red);
    color: white;
}

.detail-img-col {
    width: 340px;
    flex-shrink: 0;
    background: var(--surface-alt);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    border-right: 1px solid var(--border-color);
    border-radius: 16px 0 0 16px;
    gap: 1rem;
}

.detail-img-col img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.detail-category-badge {
    background: var(--primary-red-light);
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.detail-info-col {
    flex-grow: 1;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-info-col h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    line-height: 1.3;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-red);
    font-family: 'Outfit', sans-serif;
}

.detail-stock-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-description-section {
    flex-grow: 1;
}

.detail-description-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-description-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.detail-cart-btn {
    flex: 1;
    min-width: 180px;
}

.datasheet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 7px;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.datasheet-btn:hover {
    background-color: var(--primary-red);
    color: white;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background-color: #1a1a2e;
    color: #a0aec0;
    margin-top: 3rem;
    border-top: 3px solid var(--primary-red);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 3rem;
}
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-red);
}

.footer-logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul li a i {
    font-size: 0.8rem;
    color: var(--primary-red);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-info-item {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    color: #94a3b8;
}

.footer-info-item i {
    color: var(--primary-red);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.hours-row.closed {
    color: #f87171;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.footer-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
    color: white;
}

.footer-contact-btn:hover { opacity: 0.9; }
.whatsapp-btn { background: #25D366; }
.email-btn { background: rgba(255,255,255,0.1); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
}

.footer-payments {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: #94a3b8;
}

.footer-payments span {
    font-size: 0.85rem;
    color: #64748b;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* =============================================
   CHECKOUT MODAL (DATOS DE ENVÍO)
   ============================================= */
.checkout-modal {
    background: var(--surface-color);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-header h2 {
    font-size: 1.6rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.checkout-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.checkout-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0;
}

.checkout-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.checkout-form input, 
.checkout-form textarea {
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--primary-red-light);
}

.checkout-summary-box {
    background: var(--surface-alt);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.checkout-total-row #checkoutFinalTotal {
    color: var(--primary-red);
}

.pay-btn {
    background: linear-gradient(135deg, #10b981, #059669); /* Verde seguro */
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.pay-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 900px) {
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .footer-container { grid-template-columns: 1fr; }
    .input-row { grid-template-columns: 1fr; }
}

/* =============================================
   MEDIA QUERIES PRINCIPALES (RESPONSIVENESS)
   ============================================= */
@media (max-width: 1024px) {
    .header-container { padding: 0 1rem; gap: 1rem; }
    .search-section { max-width: 400px; }
    .product-detail-modal { flex-direction: column; }
    .detail-img-col {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 16px 16px 0 0;
        padding: 1.5rem;
    }
    .detail-img-col img { max-height: 200px; }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        text-align: center;
    }
    
    .header-container { flex-wrap: wrap; }
    .logo-section { width: 100%; justify-content: center; margin-bottom: 0.5rem; }
    .actions-section { width: 100%; justify-content: center; }
    .search-section {
        width: 100%;
        max-width: 100%;
        order: 3;
        margin-top: 0.5rem;
    }
    
    .shop-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 1rem;
    }
    
    .category-list {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.5rem;
        scrollbar-width: none;
    }
    .category-list::-webkit-scrollbar { display: none; }
    
    .category-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        background: var(--surface-alt);
    }
    
    .category-item.active, .category-item:hover {
        border-left: none;
        border-bottom: none;
        background: var(--primary-red-light);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .product-info h3 { font-size: 0.85rem; }
    .price { font-size: 1.1rem; }
    .buy-btn { padding: 0.5rem; font-size: 0.85rem; }
    .cart-panel { width: 100%; max-width: none; }
    .detail-info-col { padding: 1.5rem; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 1.3rem; }
    .logo-img { width: 36px; height: 36px; }
    
    /* Make header buttons smaller on very small screens */
    .login-btn span, .youtube-btn span, .admin-header-btn span { display: none; }
    .login-btn, .youtube-btn, .admin-header-btn {
        padding: 0.6rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    .cart-icon-container { padding: 0.4rem; }
}
