:root {
    --primary: #7fb069;
    --primary-dark: #6a9b57;
    --secondary: #fffbda;
    --accent: #e6aa68;
    --dark: #283618;
    --light: #f8f9fa;
    --border: #e0e0e0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #fafafa;
    line-height: 1.6;
}

.main-content {
    min-height: calc(100vh - 400px);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    z-index: 1050 !important; /* Añade esto para que siempre esté por encima */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.nav-link {
    font-weight: 500;
    color: #555 !important;
    transition: color 0.3s;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Botones */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 176, 105, 0.3);
}

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

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

/* Badge del carrito */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.product-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-card-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-card-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.product-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.product-meta i {
    color: var(--primary);
}

/* Interactions */
.product-interactions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-interaction {
    border: 1px solid #ddd;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-interaction:hover {
    background-color: #f5f5f5;
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* Filters */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.page-link {
    color: var(--primary);
    border-color: #ddd;
}

.page-link:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--dark);
    margin-top: 5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer a:hover {
    color: var(--primary) !important;
}

.social-links a {
    font-size: 1.5rem;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(127, 176, 105, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark);
}

/* Auth Pages */
.auth-card {
    max-width: 450px;
    margin: 3rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.auth-card h2 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-subscription {
    background-color: var(--primary);
    color: white;
}

.badge-purchase {
    background-color: var(--accent);
    color: white;
}

/* Image Gallery */
.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f5f5f5;
}

.product-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.product-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.whatsapp { background-color: #25d366; }
.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.copy { background-color: #666; }

/* Subscription Plans */
.plan-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
    height: 100%;
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.plan-card.featured {
    border: 3px solid var(--primary);
    position: relative;
}

.plan-card.featured::before {
    content: 'Recomendado';
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.plan-duration {
    color: #666;
    font-size: 1rem;
}

.plan-benefits {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.plan-benefits li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.plan-benefits li i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .product-card-img {
        height: 220px;
    }

    .product-main-image {
        height: 300px;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Promotion Bar */
.promotion-bar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
    z-index: 1040;
    transition: background-color 0.3s ease;
}

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

/* Animation Effects */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.3;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

.promotion-bar.effect-pulse {
    animation: slideDown 0.3s ease-out, pulse 2s infinite;
}

.promotion-bar.effect-flash {
    animation: slideDown 0.3s ease-out, flash 1s infinite;
}

.promotion-bar.effect-bounce {
    animation: slideDown 0.3s ease-out, bounce 1s infinite;
}

.promotion-bar.effect-glow {
    animation: slideDown 0.3s ease-out, glow 2s infinite;
}

.promotion-bar.effect-slide {
    overflow: hidden;
    --slide-speed: 10s;
}

.promotion-bar.effect-slide .flex-grow-1 {
    display: inline-block;
    white-space: nowrap;
    animation: slideText var(--slide-speed) linear infinite;
}

.promotion-bar.effect-slide:hover .flex-grow-1 {
    animation-play-state: paused;
}

@keyframes slideText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw - 80px));
    }
}

.promotion-bar a {
    transition: opacity 0.2s ease;
}

.promotion-bar a:hover {
    opacity: 0.9;
}

.promotion-bar .btn-close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.promotion-bar .btn-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .promotion-bar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .promotion-bar .text-white {
        font-size: 0.9rem;
    }
}

