/* assets/css/styles.css */

:root {
    --primary-color: #dc3545;
    --secondary-color: #fd7e14;
    --success-color: #20c997;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    --gradient-secondary: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary-custom:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    color: white;
}

/* Header & Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card {
    border-radius: 20px;
    overflow: hidden;
}

.product-card .card-body {
    padding: 1.5rem;
}

/* Spice Level Indicators */
.spice-level {
    display: flex;
    gap: 2px;
    align-items: center;
}

.spice-drop {
    width: 12px;
    height: 16px;
    background: #ddd;
    border-radius: 0 0 50% 50%;
    position: relative;
}

.spice-drop.active {
    background: var(--gradient-primary);
}

.spice-drop::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: inherit;
    border-radius: 50%;
}

/* Price Display */
.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-old {
    font-size: 1rem;
    color: #6c757d;
    text-decoration: line-through;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="chile" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23chile)"/></svg>');
}

.hero-container {
    background: rgba(50, 50, 50, 0.35);
    border-radius: 12px;
    padding: 2rem;
    height: 500px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

/* Blog/Recipe Cards */
.recipe-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.recipe-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Cart */
.cart-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.25rem;
}

/* Admin Dashboard */
.admin-card {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.admin-icon {
    font-size: 3rem;
    opacity: 0.1;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.checkout-step {
    background: white;
    border: 3px solid #e9ecef;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
    position: relative;
    z-index: 2;
}

.checkout-step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.checkout-step.completed {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

/* FAQ Accordion */
.accordion-button {
    background: white;
    border: none;
    box-shadow: none;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background: var(--light-color);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.contact-info {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    padding: 3rem;
}

.contact-info h5 {
    margin-bottom: 1.5rem;
}

.contact-info .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-info .contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

/* Product Detail */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-product-image {
    border-radius: 20px;
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

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

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

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Price Range */
.price-range {
    margin: 1rem 0;
}

.price-range input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Badge Customizations */
.badge-spice {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-stock {
    background: var(--success-color);
    color: white;
}

.badge-out-of-stock {
    background: #6c757d;
    color: white;
}

/* Newsletter */
.newsletter-section {
    background: var(--gradient-secondary);
    color: white;
    padding: 4rem 0;
    border-radius: 0;
}

.newsletter-section .form-control {
    border-radius: 25px;
    border: none;
    padding: 0.75rem 1.5rem;
}

.newsletter-section .btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

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

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

    .contact-form,
    .contact-info {
        padding: 2rem;
    }

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

    .product-gallery {
        position: static;
    }

    .filter-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

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

    .checkout-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Custom Utilities */
.rounded-custom {
    border-radius: 20px !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md) !important;
}

.gradient-bg {
    background: var(--gradient-primary) !important;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Spinner */
.spinner-custom {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid rgba(220, 53, 69, 0.2);
    border-top: 0.3rem solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Messages */
.alert-custom {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
}

.alert-success-custom {
    background: rgba(32, 201, 151, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger-custom {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.back-to-top.show {
    display: flex;
}

/* ===== Contacto (scoped) ===== */
#contacto .contacto-card,
#contacto .contacto-side {
    border-radius: 16px;
}

#contacto .form-control {
    border-radius: 12px;
    padding: 0.7rem 1rem;
}

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

#contacto .btn-primary:hover {
    filter: brightness(0.95);
}

#contacto .btn-success {
    background: #25D366;
    border-color: #25D366;
}

#contacto .contacto-side {
    background: #fff6f3;
    /* tono suave */
}

@media (max-width: 991.98px) {
    #contacto .contacto-side {
        order: 2;
    }

    #contacto .contacto-card {
        order: 1;
    }
}


.list-ubicaciones .list-group-item {
    border-radius: 10px;
    margin-bottom: .5rem;
    cursor: pointer;
}

.list-ubicaciones .list-group-item.active {
    background: var(--secondary-color, #0d6efd);
    border-color: var(--secondary-color, #0d6efd);
}

.list-ubicaciones .small-mute {
    color: #6c757d;
    font-size: .85rem;
}