/* ==========================================================================
   MODERN CUSTOM STYLES FOR BELLAVISTA OVEJA TOMÉ
   Mobile-First Responsive Design
   ========================================================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-secondary: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Typography Improvements */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Modern Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: var(--white);
}

/* Top Bar Modern Design */
#topBar {
    background: var(--dark-color);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--primary-color);
}

#topBar .top-links a {
    color: var(--light-color);
    font-size: 0.875rem;
    transition: var(--transition);
    text-decoration: none;
}

#topBar .top-links a:hover {
    color: var(--primary-color);
}

/* Header Improvements */
#header {
    background: var(--white);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    transition: var(--transition);
}

#header.sticky {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Logo Enhancements */
.logo img {
    filter: none !important;
    max-height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

/* Navigation Modern Design */
.nav-main .nav-link {
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.nav-main .nav-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Mobile Menu Improvements */
.btn-mobile {
    background: var(--primary-color);
    border: none;
    color: var(--white);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-mobile:hover {
    background: var(--dark-color);
    transform: scale(1.1);
}

/* Search Box Modern Design */
.search-box {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background: var(--white);
}

.search-box .form-control {
    border: none;
    padding: 1rem;
    font-size: 1rem;
}

.search-box .btn {
    padding: 1rem 1.5rem;
}

/* Shopping Cart Modern Design */
.quick-cart a {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.quick-cart a:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
    color: var(--white);
}

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

.quick-cart-box {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    border: none;
    padding: 1.5rem;
    min-width: 300px;
}

/* Product Cards Modern Design */
.shop-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    margin-bottom: 2rem;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.shop-item .thumbnail {
    position: relative;
    overflow: hidden;
}

.shop-item-image img {
    transition: var(--transition);
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.shop-item:hover .shop-item-image img {
    transform: scale(1.1);
}

.shop-item-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.shop-item-info .badge {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-item-summary {
    padding: 1.5rem;
}

.shop-item-summary h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.shop-item-summary h5 {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.shop-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.shop-item-price .line-through {
    color: var(--secondary-color) !important;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Footer Modern Design */
#footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-logo {
    filter: brightness(0) invert(1);
    max-width: 200px;
}

.footer-list a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.footer-list a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile-first adjustments */
    .container {
        padding: 0 1rem;
    }
    
    #topBar {
        padding: 0.25rem 0;
    }
    
    #topBar .top-links {
        font-size: 0.75rem;
    }
    
    #topBar .text-welcome {
        display: none !important;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    #header {
        padding: 0.5rem 0;
    }
    
    .nav-main-collapse {
        background: var(--white);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-medium);
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .nav-main .nav-link {
        display: block;
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .quick-cart a {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .search-box {
        margin-top: 1rem;
        width: 100%;
    }
    
    .shop-item {
        margin-bottom: 1rem;
    }
    
    .shop-item-image img {
        height: 200px;
    }
    
    .shop-item-summary {
        padding: 1rem;
    }
    
    .shop-item-summary h2 {
        font-size: 1rem;
    }
    
    .featured .owl-carousel {
        margin: 0 -0.5rem;
    }
    
    #footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer-logo {
        max-width: 150px;
        margin: 0 auto 1rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .shop-item-image img {
        height: 180px;
    }
    
    .shop-item-summary {
        padding: 0.75rem;
    }
    
    .quick-cart-box {
        min-width: 250px;
        padding: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Animated Background Elements */
.bg-animated {
    position: relative;
    overflow: hidden;
}

.bg-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(0,0,0,0.05) 25%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(0,0,0,0.05) 75%, 
        rgba(255,255,255,0.1) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced Color Scheme */
.section-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--white);
}

.section-light {
    background: linear-gradient(135deg, #ecf0f1 0%, #ffffff 100%);
    color: var(--dark-color);
}

.section-contrast {
    background: linear-gradient(135deg, #000000 0%, #2c3e50 100%);
    color: var(--white);
}

.section-accent {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark-color);
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

/* Modern Typography Effects */
.text-shadow-soft {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.text-shadow-medium {
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.text-shadow-strong {
    text-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.text-glow {
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

/* Enhanced Product Cards */
.shop-item-enhanced {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.shop-item-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(40, 167, 69, 0.05) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-item-enhanced:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.shop-item-enhanced:hover::before {
    opacity: 1;
}

/* Floating Elements */
.float-element {
    animation: floating 3s ease-in-out infinite;
}

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

/* Interactive Buttons */
.btn-interactive {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: var(--white);
}

.btn-interactive:hover::before {
    left: 100%;
}

/* Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    margin: 3rem 0;
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--white), 0 0 0 7px var(--primary-color);
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

/* Enhanced Footer Styles */
#footer {
    position: relative;
    overflow: hidden;
}

#footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    z-index: -1;
}

.footer-logo-section {
    transition: transform 0.3s ease;
}

.footer-logo-section:hover {
    transform: translateY(-5px);
}

.footer-list a {
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}

.footer-list a:hover {
    color: var(--primary-color) !important;
    padding-left: 10px;
    text-decoration: none;
}

.contact-item {
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.social-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    color: var(--white);
    text-decoration: none;
}

.social-facebook:hover {
    background: #3b5998;
    box-shadow: 0 5px 15px rgba(59, 89, 152, 0.4);
}

.social-twitter:hover {
    background: #1da1f2;
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4);
}

.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4);
}

.copyright-section {
    background: rgba(0,0,0,0.2) !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

/* Enhanced Header Styles */
#header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#header.sticky {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Enhanced Product Cards Hover Effects */
.shop-item-enhanced:hover .img-fluid {
    transform: scale(1.05);
}

.shop-item-enhanced .img-fluid {
    transition: transform 0.4s ease;
}

.shop-item-enhanced:hover .position-absolute {
    opacity: 1 !important;
}

.shop-item-enhanced .position-absolute {
    top: 0 !important;
    left: 0 !important;
    background: rgba(0,0,0,0.1) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive Enhancements */
@media (max-width: 991px) {
    .nav-main-collapse {
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        padding: 1.5rem;
        margin-top: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-main .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: 10px;
        background: rgba(40, 167, 69, 0.05);
        border: 1px solid rgba(40, 167, 69, 0.1);
    }
}

@media (max-width: 768px) {
    .section-divider::after {
        width: 8px;
        height: 8px;
        box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--primary-color);
    }
    
    .float-element {
        animation-duration: 2s;
    }
    
    .footer-logo-section {
        text-align: center !important;
        margin-bottom: 2rem;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .social-section {
        text-align: center;
    }
    
    #footer h5, #footer h6 {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .shop-item-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-interactive {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 10px;
        right: 10px;
    }
    
    .section-divider {
        margin: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    #topBar,
    .social-icon,
    .btn-interactive {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    .section-light {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: var(--white);
    }
    
    .shop-item-enhanced {
        background: #34495e;
        color: var(--white);
    }
}
