/* ============================================
   REVENDE DIRECTO - ESTILOS PRINCIPALES
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    display: block;
}

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

/* ---------- BOTONES ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25a83b;
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: #1e8a32;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #25a83b;
    border: 2px solid #25a83b;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #25a83b;
    color: #fff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-condition {
    background: #e9ecef;
    color: #495057;
}

/* ---------- HEADER ---------- */
header {
    background: #fff;
    border-bottom: 2px solid #e9ecef;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo span {
    color: #25a83b;
}

.logo small {
    font-size: 0.7rem;
    font-weight: 400;
    color: #6c757d;
    margin-left: 4px;
}

.logo i {
    color: #25a83b;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-links a {
    font-weight: 500;
    color: #495057;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #25a83b;
}

/* ---------- FLASH MESSAGES ---------- */
.flash-message {
    padding: 12px 0;
    border-bottom: 3px solid transparent;
}

.flash-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.flash-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.flash-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.flash-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.flash-message i {
    margin-right: 8px;
}

/* ---------- HERO ---------- */
.hero {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 60px 0;
    border-bottom: 2px solid #a5d6a7;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-content h1 span {
    color: #25a83b;
}

.hero-content p {
    font-size: 1.15rem;
    color: #2d3748;
    max-width: 500px;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.hero-stats span {
    font-weight: 500;
    color: #2d3748;
}

.hero-stats i {
    color: #25a83b;
    margin-right: 6px;
}

.hero-image {
    font-size: 5rem;
    background: rgba(37, 168, 59, 0.1);
    padding: 40px;
    border-radius: 50%;
    color: #25a83b;
}

/* ---------- PRODUCT GRID ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

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

.product-image i {
    font-size: 4rem;
    color: #dee2e6;
}

.video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sold-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: 16px 18px 18px;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info h3 a:hover {
    color: #25a83b;
}

.product-info .seller {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.product-info .seller i {
    margin-right: 4px;
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* ---------- SECCIONES ---------- */
.featured,
.products-section,
.how-it-works {
    padding: 48px 0;
}

.featured {
    background: #fff;
}

.products-section {
    background: #f8f9fa;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

h2 .highlight {
    color: #25a83b;
}

/* ---------- FILTROS ---------- */
.filters {
    margin: 20px 0 24px;
}

.filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form select {
    padding: 10px 16px;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    background: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 180px;
}

.filter-form select:focus {
    border-color: #25a83b;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* ---------- CÓMO FUNCIONA ---------- */
.how-it-works {
    background: #fff;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.step {
    text-align: center;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: #25a83b;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step i {
    font-size: 2.5rem;
    color: #25a83b;
    margin: 16px 0 12px;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.step p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* ---------- FOOTER ---------- */
footer {
    background: #1a1a2e;
    color: #adb5bd;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-grid h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li {
    margin-bottom: 6px;
}

.footer-grid ul li a {
    color: #adb5bd;
    transition: color 0.3s;
}

.footer-grid ul li a:hover {
    color: #25a83b;
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        font-size: 3rem;
        padding: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 0.85rem;
    }

    .product-info .price {
        font-size: 1rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .filter-form select {
        min-width: 100%;
    }

    .btn-primary,
    .btn-outline {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}