/* =====================================================
   TIENDA DE JUAN - Estilos Principales
   Diseño inspirado en AmazCart
   ===================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   CSS Variables - Sistema de Diseño
   ===================================================== */
:root {
    /* Colores Primarios */
    --primary: #FF3D57;
    --primary-dark: #E62E47;
    --primary-light: #FF6B7A;

    /* Colores Secundarios */
    --secondary: #2D3748;
    --secondary-light: #4A5568;

    /* Fondos */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #EDF2F7;
    --bg-dark: #1A202C;

    /* Textos */
    --text-dark: #1A202C;
    --text-gray: #718096;
    --text-light: #A0AEC0;
    --text-white: #FFFFFF;

    /* Estados */
    --success: #38A169;
    --warning: #DD6B20;
    --danger: #E53E3E;
    --info: #3182CE;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Bordes */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Espaciado */
    --container-max: 1400px;
    --header-height: 140px;
}

/* =====================================================
   Reset y Base
   ===================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

ul {
    list-style: none;
}

/* =====================================================
   Container
   ===================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   Header
   ===================================================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-white);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 20px;
}

.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Main Header */
.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-gray);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 400;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-bar form {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 61, 87, 0.15);
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-dark);
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar button {
    padding: 14px 25px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.header-action:hover {
    background: var(--bg-light);
}

.header-action-icon {
    width: 42px;
    height: 42px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
}

.header-action:hover .header-action-icon {
    background: var(--primary);
    color: white;
}

.header-action-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.header-action-text {
    display: flex;
    flex-direction: column;
}

.header-action-text small {
    font-size: 12px;
    color: var(--text-gray);
}

.header-action-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Navigation Bar */
.nav-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--bg-gray);
}

.nav-bar .container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.categories-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.categories-btn:hover {
    background: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    padding: 15px 18px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color var(--transition-fast), background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(255, 61, 87, 0.08);
}

/* =====================================================
   Main Content Layout
   ===================================================== */
.main-content {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.filter-list {
    max-height: 300px;
    overflow-y: auto;
}

.filter-list::-webkit-scrollbar {
    width: 5px;
}

.filter-list::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 14px;
    color: var(--text-gray);
}

.filter-item:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.filter-item.active {
    background: rgba(255, 61, 87, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.filter-item input[type="radio"],
.filter-item input[type="checkbox"] {
    display: none;
}

.filter-item span {
    flex: 1;
}

.filter-item .count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 20px;
}

.clear-filters {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.clear-filters:hover {
    background: var(--danger);
    color: white;
}

/* Products Area */
.products-area {
    flex: 1;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.products-count {
    font-size: 14px;
    color: var(--text-gray);
}

.products-count strong {
    color: var(--text-dark);
    font-weight: 600;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sort label {
    font-size: 14px;
    color: var(--text-gray);
}

.products-sort select {
    padding: 8px 15px;
    border: 1px solid var(--bg-gray);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-card-image {
    position: relative;
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    max-height: 180px;
    max-width: 90%;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--info);
    color: white;
}

.badge-sale {
    background: var(--primary);
    color: white;
}

.badge-stock {
    background: var(--success);
    color: white;
}

.badge-out {
    background: var(--text-light);
    color: white;
}

.product-quick-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all var(--transition-fast);
}

.product-card:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-gray);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-card-body {
    padding: 18px;
}

.product-brand {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    margin-bottom: 10px;
}

.product-title a:hover {
    color: var(--primary);
}

.product-sku {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 12px;
}

.product-availability.in-stock {
    color: var(--success);
}

.product-availability.out-of-stock {
    color: var(--danger);
}

.product-availability::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: currentColor;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-card-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-add-cart:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-add-cart:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-view {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-gray);
    border-radius: var(--radius-md);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.btn-view:hover {
    background: var(--secondary);
    color: white;
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
}

.pagination .active {
    background: var(--primary);
    color: white;
}

.pagination .disabled {
    background: var(--bg-gray);
    color: var(--text-light);
    cursor: not-allowed;
}

/* =====================================================
   Cart Page
   ===================================================== */
.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

.cart-items {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-gray);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
}

.cart-item-brand {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.cart-item-sku {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--bg-gray);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.cart-item-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-unit-price {
    font-size: 13px;
    color: var(--text-gray);
}

.cart-item-total-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.cart-item-remove {
    color: var(--text-light);
    font-size: 20px;
    padding: 5px;
    transition: color var(--transition-fast);
}

.cart-item-remove:hover {
    color: var(--danger);
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 160px;
}

.cart-summary h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
}

.summary-row.total {
    border-top: 2px solid var(--bg-gray);
    margin-top: 15px;
    padding-top: 20px;
    font-size: 18px;
    font-weight: 700;
}

.summary-row.total .amount {
    color: var(--primary);
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn-continue {
    display: block;
    text-align: center;
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-continue:hover {
    background: var(--bg-gray);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--text-gray);
    margin-bottom: 25px;
}

.btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-shop:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* =====================================================
   Checkout Page
   ===================================================== */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.checkout-form h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--bg-gray);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-dark);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 61, 87, 0.15);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-summary {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 160px;
}

.order-summary h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-gray);
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-gray);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-item-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 4px;
}

.order-item-qty {
    font-size: 12px;
    color: var(--text-gray);
}

.order-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    margin-top: 15px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 17px;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    width: 24px;
    height: 24px;
}

/* =====================================================
   Product Detail Page
   ===================================================== */
.product-detail {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: 400px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-main-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

.product-thumbnail img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.product-info h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-gray);
}

.product-meta-item {
    font-size: 14px;
    color: var(--text-gray);
}

.product-meta-item strong {
    color: var(--text-dark);
}

.product-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-detail-availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 25px;
}

.product-detail-availability.in-stock {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
}

.product-detail-availability.out-of-stock {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.product-quantity label {
    font-weight: 500;
    color: var(--text-dark);
}

.product-quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-quantity-controls .qty-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.product-quantity-controls .qty-input {
    width: 60px;
    height: 40px;
    font-size: 16px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-actions .btn-add-cart {
    flex: 1;
    padding: 16px 30px;
    font-size: 16px;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    margin-top: 50px;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-about h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-about p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-widget h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: var(--text-light);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-widget ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* =====================================================
   Loading States
   ===================================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-gray);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    color: var(--text-gray);
    font-size: 14px;
}

/* =====================================================
   Alerts & Messages
   ===================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-warning {
    background: rgba(221, 107, 32, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.alert-info {
    background: rgba(49, 130, 206, 0.1);
    color: var(--info);
    border: 1px solid var(--info);
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-icon {
    font-size: 20px;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
}

.toast-close:hover {
    color: var(--text-dark);
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail {
        grid-template-columns: 400px 1fr;
    }
}

@media (max-width: 992px) {
    .main-header .container {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .cart-summary,
    .order-summary {
        position: static;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .top-bar-left {
        display: none;
    }

    .header-action-text {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item-price {
        width: 100%;
        text-align: left;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed var(--bg-gray);
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 18px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card-image {
        height: 180px;
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* =====================================================
   Mobile Bottom Navigation
   ===================================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav ul {
    display: flex;
    justify-content: space-around;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-gray);
    padding: 8px 15px;
}

.mobile-nav a.active {
    color: var(--primary);
}

.mobile-nav a span {
    font-size: 22px;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }
}

/* =====================================================
   No Products Found
   ===================================================== */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
}

.no-products-icon {
    font-size: 60px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-products p {
    color: var(--text-gray);
}

/* =====================================================
   Search Autocomplete / Sugerencias de Búsqueda
   ===================================================== */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-height: 450px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    border: 2px solid var(--primary);
    border-top: none;
}

.search-autocomplete.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.search-autocomplete::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.search-autocomplete::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--bg-gray);
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover {
    background: var(--bg-light);
}

.search-autocomplete-item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-autocomplete-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.search-autocomplete-item-info {
    flex: 1;
    min-width: 0;
}

.search-autocomplete-item-brand {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.search-autocomplete-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    margin-bottom: 4px;
}

.search-autocomplete-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.search-autocomplete-item-sku {
    color: var(--text-light);
}

.search-autocomplete-item-stock {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-autocomplete-item-stock.in-stock {
    color: var(--success);
}

.search-autocomplete-item-stock.out-of-stock {
    color: var(--danger);
}

.search-autocomplete-item-stock::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.search-autocomplete-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-autocomplete-footer {
    padding: 12px 16px;
    background: var(--bg-light);
    text-align: center;
    border-top: 1px solid var(--bg-gray);
}

.search-autocomplete-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    transition: color var(--transition-fast);
}

.search-autocomplete-footer a:hover {
    color: var(--primary-dark);
}

.search-autocomplete-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 10px;
    color: var(--text-gray);
}

.search-autocomplete-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.search-autocomplete-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-gray);
}

.search-autocomplete-empty i {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
    color: var(--text-light);
}

/* Highlight matching text */
.search-highlight {
    background: rgba(255, 61, 87, 0.2);
    color: var(--primary);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* =====================================================
   FAVORITES STYLES
   ===================================================== */

/* Favorite button in product cards */
.favorite-btn {
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    color: var(--primary) !important;
    transform: scale(1.1);
}

.favorite-btn.is-favorite i {
    color: var(--primary) !important;
}

.favorite-btn.is-favorite:hover {
    color: var(--text-gray) !important;
}

/* Quick action favorite button */
.product-quick-actions .favorite-btn {
    background: white;
    border: none;
    color: var(--text-gray);
}

.product-quick-actions .favorite-btn:hover {
    background: var(--primary);
    color: white !important;
}

.product-quick-actions .favorite-btn.is-favorite {
    background: var(--primary);
    color: white !important;
}

/* Favorites badge in header */
.favorites-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Heart animation keyframes */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.favorite-btn.animating {
    animation: heartBeat 0.6s ease;
}

/* Product page favorite button */
.btn-favorite:hover {
    background: var(--primary) !important;
    color: white !important;
}

.btn-favorite.is-favorite {
    background: var(--primary) !important;
    color: white !important;
}

/* Mobile responsive adjustments for favorites */
@media (max-width: 768px) {
    .header-action .header-action-text {
        display: none;
    }

    .header-action-icon {
        margin: 0;
    }

    .favorites-badge {
        top: -8px;
        right: -8px;
    }
}

/* =====================================================
   MOBILE HEADER COMPACT STYLES
   ===================================================== */

/* Tablets and small screens */
@media (max-width: 992px) {
    .top-bar {
        display: none;
    }

    .main-header .container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {

    /* Hide top bar completely */
    .top-bar {
        display: none !important;
    }

    /* Main header compact */
    .main-header {
        padding: 10px 0;
    }

    .main-header .container {
        flex-wrap: nowrap;
        gap: 10px;
        align-items: center;
    }

    /* Logo compact */
    .logo {
        gap: 8px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-text span {
        display: none;
    }

    /* Search bar - icon only on mobile */
    .search-bar {
        order: 0;
        width: auto;
        margin: 0;
        flex: 0 0 auto;
    }

    .search-bar form {
        background: transparent;
        border: none;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .search-bar form:focus-within {
        border: none;
        box-shadow: none;
    }

    .search-bar input {
        display: none;
    }

    .search-bar button {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    /* Hide text in search button on mobile */
    .search-bar button::after {
        content: none !important;
    }

    .search-bar .search-text {
        display: none !important;
    }

    /* Header actions compact */
    .header-actions {
        gap: 8px;
    }

    .header-action {
        padding: 8px;
    }

    .header-action-icon {
        font-size: 18px;
    }

    .header-action .header-action-text {
        display: none !important;
    }

    /* Nav bar compact */
    .nav-bar {
        display: none;
    }

    /* Categories button hide */
    .categories-btn {
        display: none;
    }

    /* Nav links hide on mobile */
    .nav-links {
        display: none;
    }

    /* Sidebar hide on mobile */
    .sidebar {
        display: none;
    }

    /* Main content full width */
    .main-content {
        flex-direction: column;
    }

    .products-area {
        width: 100%;
    }

    /* Products grid adjustments */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Product card compact */
    .product-card-image {
        height: 140px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-title {
        font-size: 12px;
        height: 32px;
    }

    .product-price .price-current {
        font-size: 16px;
    }

    /* Page title compact */
    .page-title {
        font-size: 20px;
        padding: 15px 0;
    }

    /* Products header compact */
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 15px;
    }

    /* Container padding */
    .container {
        padding: 0 10px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .main-header .container {
        gap: 8px;
    }

    .logo-text h1 {
        font-size: 14px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .search-bar button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .header-action {
        padding: 6px;
    }

    .header-action-icon {
        font-size: 16px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card-image {
        height: 120px;
    }

    .product-card-body {
        padding: 10px;
    }

    .product-title {
        font-size: 11px;
        height: 28px;
    }

    .product-brand {
        font-size: 9px;
    }

    .product-sku {
        font-size: 9px;
    }

    .product-price .price-current {
        font-size: 14px;
    }

    .btn-add-cart {
        padding: 8px 10px;
        font-size: 11px;
    }

    .btn-view {
        width: 32px;
        height: 32px;
    }
}

/* Line clamp compatibility fix */
.search-autocomplete-item-name,
.favorite-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}