/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo i {
    font-size: 2rem;
    color: var(--accent-color);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    position: relative;
}

.nav-list a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-box input {
    border: none;
    outline: none;
    padding: 0.75rem 1rem;
    background: transparent;
    min-width: 300px;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    position: relative;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: var(--text-dark);
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-primary, .btn-secondary {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature p {
    opacity: 0.8;
}

/* Categories */
.categories {
    padding: 4rem 0;
    background: var(--bg-white);
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
}

/* Products */
.products {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--warning-color);
}

.product-seller {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-cart {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-cart:hover {
    background: var(--primary-dark);
}

.btn-wishlist {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

.btn-wishlist:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.load-more {
    text-align: center;
}

/* Sell Section */
.sell-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.sell-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sell-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.sell-info p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.sell-benefits {
    margin-bottom: 2rem;
}

.benefit {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.benefit h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.benefit p {
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

.sell-stats {
    display: grid;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.stat h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-weight: 500;
}

/* About */
.about {
    padding: 4rem 0;
    background: var(--bg-light);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.payment-methods i {
    opacity: 0.8;
    transition: var(--transition);
}

.payment-methods i:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    text-align: center;
    margin-top: 1rem;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-dark);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-group small {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-detail-image {
    width: 100%;
    height: 300px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-light);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.product-detail-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-detail-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-detail-meta {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.product-detail-meta span {
    color: var(--text-light);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-controls {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity-controls button {
    background: var(--bg-light);
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-controls button:hover {
    background: var(--border-color);
}

.quantity-controls input {
    border: none;
    padding: 0.5rem;
    width: 60px;
    text-align: center;
    background: var(--bg-white);
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-remove {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

.cart-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.cart-total {
    text-align: right;
    margin-bottom: 1rem;
}

.cart-total h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

/* Checkout */
.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2rem;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
}

.step.active:not(:last-child)::after {
    background: var(--primary-color);
}

.step span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--border-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.step.active span {
    background: var(--primary-color);
}

.step p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.step.active p {
    color: var(--primary-color);
    font-weight: 500;
}

/* Seller Dashboard */
.seller-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.seller-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.seller-stat {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.seller-stat h4 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.seller-stat p {
    color: var(--text-light);
    margin: 0;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: var(--text-light);
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 4000;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: var(--error-color);
}

.toast.warning {
    background: var(--warning-color);
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    margin-left: auto;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.profile-tabs .tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    min-width: 120px;
}

.profile-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.avatar-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.avatar-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.avatar-info p {
    color: var(--text-light);
    margin: 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.profile-stat h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.profile-stat p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.order-item:hover {
    box-shadow: var(--shadow-md);
}

.order-image {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.order-info {
    flex: 1;
}

.order-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.order-details {
    font-size: 0.875rem;
    color: var(--text-light);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.confirmed {
    background: var(--success-color);
    color: white;
}

.order-status.processing {
    background: var(--warning-color);
    color: white;
}

.order-status.shipped {
    background: var(--primary-color);
    color: white;
}

.order-status.delivered {
    background: var(--success-color);
    color: white;
}

.address-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.address-card.default {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.address-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.address-type {
    font-weight: 600;
    color: var(--primary-color);
}

.address-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.payment-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.payment-details {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Reviews */
.rating-input {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.rating-input .star {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.rating-input .star:hover,
.rating-input .star.active {
    color: var(--warning-color);
}

.review-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.review-name {
    font-weight: 600;
    color: var(--text-dark);
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--warning-color);
}

.review-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.review-comment {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.review-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 500;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.review-helpful button {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.review-helpful button:hover {
    background: var(--bg-light);
}

.review-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.rating-overview {
    text-align: center;
}

.average-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.rating-bar-fill {
    flex: 1;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-progress {
    height: 100%;
    background: var(--warning-color);
    transition: width 0.3s ease;
}

/* Wishlist */
.wishlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.wishlist-item:hover {
    box-shadow: var(--shadow-md);
}

.wishlist-image {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

.wishlist-info {
    flex: 1;
}

.wishlist-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.wishlist-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.wishlist-actions {
    display: flex;
    gap: 0.5rem;
}

/* Product Compare */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.compare-table th,
.compare-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.compare-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.compare-product {
    text-align: center;
}

.compare-image {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: var(--text-light);
    font-size: 2rem;
}

/* Advanced Search */
.search-filters {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input {
    width: 100px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
}

/* Product condition badges */
.condition-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.condition-badge.new {
    background: var(--success-color);
    color: white;
}

.condition-badge.like-new {
    background: #10b981;
    color: white;
}

.condition-badge.good {
    background: var(--warning-color);
    color: white;
}

.condition-badge.fair {
    background: #f97316;
    color: white;
}

.condition-badge.poor {
    background: var(--error-color);
    color: white;
}

/* Shipping badges */
.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.shipping-badge.free {
    background: var(--success-color);
    color: white;
}

.shipping-badge.standard {
    background: var(--primary-color);
    color: white;
}

.shipping-badge.express {
    background: var(--warning-color);
    color: white;
}

.shipping-badge.pickup {
    background: var(--text-light);
    color: white;
}

/* Product badges */
.product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-stock {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.product-detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.default-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.reviews-container h4 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.reviews-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-tabs {
        justify-content: space-between;
    }
    
    .profile-tabs .tab-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
        min-width: auto;
    }
    
    .review-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .compare-table {
        font-size: 0.875rem;
    }
    
    .compare-table th,
    .compare-table td {
        padding: 0.5rem;
    }
}
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-box input {
        min-width: 200px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .filters {
        flex-direction: column;
        width: 100%;
    }
    
    .sell-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step::after {
        display: none;
    }
    
    .seller-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header .container {
        gap: 1rem;
    }
    
    .search-box {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .categories h2,
    .section-header h2,
    .about h2 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Product badges and advanced features */
.product-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-stock {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.product-detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.default-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.reviews-container h4 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.reviews-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .modal,
    .toast,
    .loading-overlay {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
    }
}

/* Barra de búsqueda principal tipo eBay */
.search-bar-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto 2.5rem auto;
    max-width: 600px;
    width: 100%;
}
.search-bar-main input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    outline: none;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.search-bar-main button {
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    cursor: pointer;
    transition: background 0.2s;
}
.search-bar-main button:hover {
    background: var(--primary-dark);
}

/* CTA para vender tipo eBay/Temu */
.sell-cta-ebay {
    background: var(--gradient-primary);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1rem 2rem 1rem;
    border-radius: var(--radius-xl);
    margin: 2rem auto 2.5rem auto;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
}
.sell-cta-ebay h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.sell-cta-ebay .btn-primary {
    font-size: 1.15rem;
    padding: 1rem 2.5rem;
    margin-bottom: 0.5rem;
}
.sell-cta-ebay .sell-cta-desc {
    font-size: 1.05rem;
    opacity: 0.92;
    margin-top: 0.5rem;
}