/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fed7aa;
    --secondary-color: #78716c;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #eab308;
    --dark-color: #292524;
    --light-color: #fffbf5;
    --border-color: #e7e5e4;
    --text-color: #44403c;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Header */
.top-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.top-header-content {
    display: grid;
    grid-template-columns: 250px 1fr auto;
    gap: 2rem;
    align-items: center;
}

.logo-section .site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.site-logo-img {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: bold;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-section {
    max-width: 600px;
    position: relative;
}

/* Live Search Dropdown */
.live-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
}
.live-search-results.active {
    display: block;
}
.ls-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: background 0.12s;
    border-bottom: 1px solid #f1f5f9;
}
.ls-item:last-child { border-bottom: none; }
.ls-item:hover { background: #f8fafc; }
.ls-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 0.25rem;
    background: #f8f9fa;
    flex-shrink: 0;
}
.ls-item-info {
    flex: 1;
    min-width: 0;
}
.ls-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-item-meta {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 0.1rem;
}
.ls-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-color);
}
.ls-item-price-old {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-decoration: line-through;
}
.ls-item-cat {
    font-size: 0.7rem;
    color: var(--secondary-color);
}
.ls-view-all {
    display: block;
    text-align: center;
    padding: 0.65rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    transition: background 0.12s;
}
.ls-view-all:hover { background: var(--primary-light, #fff3e6); }
.ls-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.search-form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.3s;
}

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

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.user-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.user-link,
.cart-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.user-link:hover,
.cart-link:hover {
    color: var(--primary-color);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}
.user-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}
.dropdown-arrow {
    transition: transform 0.2s;
}
.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0.4rem;
    padding-top: 0.6rem;
    list-style: none;
    margin: 0;
    z-index: 2000;
    animation: userDropIn 0.15s ease;
}
@keyframes userDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-dropdown:hover .user-dropdown-menu {
    display: block;
}
.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 0.35rem;
    transition: background 0.15s;
    white-space: nowrap;
}
.user-dropdown-menu li a:hover {
    background: #fff7ed;
    color: var(--primary-color);
}
.user-dropdown-logout:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
.user-dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.3rem 0.5rem;
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Main Navigation */
.main-nav {
    background-color: var(--primary-color);
    color: white;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.categories-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.categories-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.categories-toggle .arrow {
    transition: transform 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 0;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Categories Sidebar */
.categories-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.categories-sidebar.active {
    left: 0;
}

.categories-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.categories-sidebar-header h3 {
    margin: 0;
    color: var(--dark-color);
}

.close-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.close-sidebar:hover {
    color: var(--danger-color);
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    border-bottom: 1px solid var(--border-color);
}

.categories-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.categories-list a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Old navbar styles for admin */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.admin-navbar {
    background-color: var(--primary-color);
}

.admin-navbar .logo,
.admin-navbar .nav-menu a {
    color: white;
}

.admin-navbar .nav-menu a:hover {
    color: var(--primary-light);
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Action buttons for admin tables */
.action-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.2;
    font-family: inherit;
}
.action-btn svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px;
    max-height: 14px;
    flex-shrink: 0;
}
.action-btn-edit {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
.action-btn-edit:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.action-btn-view {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.action-btn-view:hover {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}
.action-btn-delete {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.action-btn-delete:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}
.action-btn-toggle {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.action-btn-toggle:hover {
    background: #d97706;
    color: white;
    border-color: #d97706;
}
.action-btn-products {
    background: #faf5ff;
    color: #7c3aed;
    border-color: #ddd6fe;
}
.action-btn-products:hover {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}
.action-btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.action-btn-order:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}
.pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}
.page-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.page-link svg {
    width: 16px;
    height: 16px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.btn-remove {
    color: var(--danger-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-remove:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #fb923c);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
}

/* Categories */
.categories {
    margin-bottom: 3rem;
}

.categories h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Products */
.products h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

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

.product-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.product-card .product-price {
    padding: 0 1rem;
    min-height: 3.2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: auto;
}
.product-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.product-card .stock {
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.product-card .category {
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.product-card .btn {
    margin: 0.5rem 1rem 1rem;
    width: calc(100% - 2rem);
}

/* Product Detail */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.product-image img {
    width: 100%;
    border-radius: 0.5rem;
}

.product-info h1 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-info .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.product-info .description {
    margin: 2rem 0;
}

.add-to-cart-form {
    margin: 2rem 0;
}

.quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.out-of-stock {
    color: var(--danger-color);
    font-weight: bold;
}

.login-message {
    margin: 1rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

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

.form-note {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
}

.auth-box h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.auth-forgot {
    text-align: right;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.auth-forgot a {
    color: var(--secondary-color);
    text-decoration: none;
}

.auth-forgot a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: var(--primary-color);
}

/* Cart */
.cart-table {
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
}

.cart-table thead {
    background-color: var(--dark-color);
    color: white;
}

.cart-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.quantity-form input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

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

.total-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.5rem;
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.checkout-form,
.checkout-summary {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.summary-items {
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-link {
    display: block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.alert-card {
    border-left: 4px solid var(--warning-color);
}

.alert-card .stat-number {
    color: var(--warning-color);
}

.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.recent-orders {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

/* Tables */
.orders-table,
.admin-table {
    width: 100%;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.orders-table th,
.orders-table td,
.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
}

.orders-table thead,
.admin-table thead {
    background-color: var(--dark-color);
    color: white;
}

.orders-table tbody tr,
.admin-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.orders-table tbody tr:hover,
.admin-table tbody tr:hover {
    background-color: var(--light-color);
}

.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.stock-warning {
    color: var(--danger-color);
    font-weight: bold;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-pendiente {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-procesando {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-enviado {
    background-color: #e0e7ff;
    color: #4338ca;
}

.badge-entregado {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-cancelado {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

/* Order Detail */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.order-info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.order-info-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.order-items {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.order-items-table {
    width: 100%;
    margin-top: 1rem;
}

.order-items-table th,
.order-items-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.order-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-product img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.text-right {
    text-align: right;
}

.order-actions {
    text-align: center;
}

/* Admin Panel */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.current-image {
    max-width: 200px;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

/* Filters */
.filters {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.no-products,
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 0.5rem;
}

.alert-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 4px solid var(--warning-color);
}

.recent-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: all 0.25s;
}
.social-icon:hover {
    transform: translateY(-3px);
}
.social-facebook:hover { background: #1877F2; color: white; }
.social-instagram:hover { background: #E4405F; color: white; }
.social-twitter:hover { background: #000; color: white; }
.social-youtube:hover { background: #FF0000; color: white; }
.social-whatsapp:hover { background: #25D366; color: white; }
.social-email:hover { background: #6B7280; color: white; }

/* MercadoPago Styles */
.mp-info-banner {
    background: linear-gradient(135deg, #009ee3, #00b0ff);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.mp-info-banner h3 {
    margin-bottom: 0.5rem;
}

.payment-methods {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 0.5rem;
}

.payment-methods h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.payment-icons span {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-shadow: var(--shadow);
}

.mp-security {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 0.5rem;
    text-align: center;
}

.mp-security h4 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

/* Payment Result Pages */
.payment-result {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-container {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    text-align: center;
}

.success-icon,
.error-icon,
.pending-icon,
.info-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.result-container h1 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.success-message {
    color: var(--success-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.error-message {
    color: var(--danger-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.pending-message {
    color: var(--warning-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.payment-details,
.error-reasons,
.pending-info,
.payment-methods-info,
.next-steps,
.order-info {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.payment-details h3,
.error-reasons h3,
.pending-info h3,
.payment-methods-info h3,
.next-steps h3,
.order-info h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.error-reasons ul,
.payment-methods-info ul,
.next-steps ul {
    list-style: none;
    padding: 0;
}

.error-reasons li,
.payment-methods-info li,
.next-steps li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.error-reasons li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--danger-color);
    font-weight: bold;
}

.payment-methods-info li:before,
.next-steps li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.action-buttons .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-detail-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cart-table {
        font-size: 0.875rem;
    }
    
    .cart-product img {
        width: 40px;
        height: 40px;
    }
    
    .result-container {
        padding: 2rem 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .payment-icons {
        flex-direction: column;
    }
}

/* Upselling & Cross-selling Styles */
.upselling-section,
.cross-selling-section,
.similar-products-section,
.cart-recommendations {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
}

.upselling-section h2,
.cross-selling-section h2,
.similar-products-section h2,
.cart-recommendations h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.upsell-card {
    position: relative;
    border: 2px solid var(--primary-color);
}

.upsell-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 1;
}

.price-diff {
    color: var(--success-color);
    font-weight: bold;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.recommendation-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.recommendation-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.recommendation-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    min-height: 2.5rem;
}

.recommendation-card .price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.recommendation-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Bundle Styles */
.bundle-card {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
}

.bundle-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.bundle-products {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.bundle-product-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.bundle-savings {
    background: var(--success-color);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 1rem;
}

.bundle-price-comparison {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
}

.bundle-price-comparison .original-price {
    text-decoration: line-through;
    opacity: 0.7;
}

.bundle-price-comparison .bundle-price {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .recommendation-card img {
        height: 120px;
    }
    
    .recommendation-actions {
        flex-direction: column;
    }
    
    .bundle-products {
        flex-direction: column;
    }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    max-width: 600px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.slide-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
    font-weight: bold;
}

.slide-description {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.slide-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

.slide-btn:hover {
    background-color: var(--primary-dark);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active,
.slider-dot:hover {
    background-color: white;
}

/* Benefits Section */
.benefits-section {
    background-color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 1.5rem;
}

.benefit-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.benefit-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.benefit-card p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .top-header-content {
        grid-template-columns: 200px 1fr auto;
        gap: 1rem;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.25rem;
    }
    
    .slide-description {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .top-header-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .user-actions span {
        display: none;
    }
    
    .nav-links {
        display: none;
    }
    
    .slider-container {
        height: 350px;
    }
    
    .slide-content {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        max-width: 90%;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .slide-description {
        font-size: 1.25rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Products Sections */
.products-section {
    padding: 2.5rem 0;
    background-color: white;
    margin-bottom: 0;
    border-bottom: 1px solid #f3f4f6;
}

.section-header-home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-home h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 0;
    font-weight: 700;
}

.section-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background-color: white;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.products-slider {
    overflow: hidden;
    position: relative;
}

.products-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-slide {
    flex: 0 0 calc(25% - 0.75rem);
    min-width: 0;
}

.product-card-home,
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-home:hover,
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.3s;
}

.product-card-home:hover .product-image img,
.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.5px;
}

.product-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 0.35rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.product-info {
    padding: 0.85rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--dark-color);
    line-height: 1.35;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info h3 a {
    color: inherit;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-final,
.price-offer {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--dark-color);
}

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

.product-category-tag {
    display: inline-block;
    background: var(--primary-light, #fff3e6);
    color: var(--primary-color);
    padding: 0.15rem 0.5rem;
    border-radius: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
    align-self: flex-start;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-product {
    flex: 1;
    display: block;
    padding: 0.6rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 0.35rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.btn-product:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-quick-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-quick-buy:hover {
    background: var(--primary-color);
}

/* Responsive para secciones de productos */
@media (max-width: 1400px) {
    .product-slide {
        flex: 0 0 calc(25% - 0.75rem);
    }
}

@media (max-width: 1100px) {
    .product-slide {
        flex: 0 0 calc(33.333% - 0.667rem);
    }
}

@media (max-width: 768px) {
    .product-slide {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .section-header-home h2 {
        font-size: 1.25rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .products-section {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .product-slide {
        flex: 0 0 100%;
    }
    
    .products-track {
        gap: 0.75rem;
    }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    padding: 0.75rem 1rem;
    animation: pwaSlideUp 0.4s ease-out;
}
@keyframes pwaSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.pwa-install-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.pwa-install-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.pwa-install-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}
.pwa-install-left strong {
    display: block;
    font-size: 0.9rem;
    color: #1f2937;
}
.pwa-install-left span {
    font-size: 0.78rem;
    color: #6b7280;
}
.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.pwa-install-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.pwa-install-btn:hover { opacity: 0.9; }
.pwa-close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}
.pwa-close-btn:hover { color: #374151; }
