@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* Hero Section Enhancements */
.hero-gradient {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.9) 0%, rgba(76, 201, 76, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("../my-hero-background.jpg");
    opacity: 0.1;
}

.hero-image {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

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

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

/* Buttons - Standardized Styles */
.add-to-cart-btn,
.view-all-btn,
.learn-more-btn,
.subscribe-btn,
.send-message-btn,
.view-details-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn {
    padding: 8px 20px;
}

.view-all-btn,
.learn-more-btn,
.subscribe-btn,
.send-message-btn {
    padding: 12px 24px;
}

/* Cards - Improved Design */
.product-card,
.box-card,
.recipe-card,
.feature-card,
.testimonial-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* Product Cards */
.product-card img {
    height: 200px;
    object-fit: cover;
}

.product-card .text-lg.font-bold {
    font-size: 1.25rem;
}

/* Box Cards */
.box-card .box-image {
    height: 200px;
    object-fit: cover;
}

.box-card:hover .box-image {
    transform: scale(1.05);
}

.box-card:hover .box-overlay {
    opacity: 1;
}

/* Recipe Cards */
.recipe-card:hover .recipe-overlay {
    opacity: 1;
}

.recipe-overlay {
    transition: all 0.3s ease;
}

/* Feature Cards */
.feature-card {
    padding: 2rem;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Testimonial Cards */
.testimonial-card {
    padding: 1.5rem;
}

/* Navigation Links */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #22a7f0;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-top: 1px solid #e5e7eb;
}

.mobile-menu.active {
    max-height: 500px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    background-color: #22a7f0;
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    background-color: #f8f9fa;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    text-align: right;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close:hover,
.close:focus {
    color: #bbb;
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

.btn-modal {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 12px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-primary {
    background-color: #22a7f0;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-primary:hover,
.btn-secondary:hover {
    opacity: 0.9;
}

/* Product Detail Modal */
.product-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.product-detail-price {
    font-size: 1.75rem;
    font-weight: bold;
    color: #22a7f0;
}

.product-details-grid {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

/* Shopping Cart Modal */
#cart-items-container {
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.cart-item-info {
    flex-grow: 1;
}

.cart-item-price {
    font-weight: 500;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.2s;
}

.remove-item-btn:hover {
    color: #bd2130;
}

/* Newsletter Modal Specific */
.newsletter-modal .modal-header {
    background-color: #f97316;
}

.newsletter-modal .close {
    color: white;
}

.newsletter-modal .close:hover,
.newsletter-modal .close:focus {
    color: #bbb;
}

/* Footer Improvements */
footer .grid {
    gap: 2rem;
}

footer h3,
footer h4 {
    position: relative;
    padding-bottom: 0.5rem;
}

footer h3::after,
footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #f97316;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .hero-gradient {
        padding: 2rem 1rem;
    }
    
    .hero-gradient h1 {
        font-size: 2rem;
    }
    
    .feature-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
    }
    
    footer .grid > div {
        text-align: center;
    }
    
    footer .grid > div:last-child {
        text-align: left;
    }
    
    .newsletter-footer-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-footer-form input,
    .newsletter-footer-form button {
        width: 100%;
        border-radius: 25px;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #22a7f0;
    outline-offset: 2px;
}

/* Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Form Validation Styles */
input:invalid {
    border-color: #dc3545;
}

input:valid {
    border-color: #28a745;
}

/* --- Scrollable Gallery Styles --- */

/* Hide scrollbar for Chrome, Safari and Opera */
#gallery-wrapper::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
#gallery-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Optional: Style the navigation buttons if needed */
.gallery-nav-btn {
    /* Basic button styles are inherited or set inline */
    /* You can add specific styles here if desired */
    /* Example: box-shadow, border, etc. */
}

/* Optional: Add a subtle hover effect to gallery images */
#gallery-wrapper img {
    transition: transform 0.3s ease;
}

#gallery-wrapper img:hover {
    transform: scale(1.02); /* Slight zoom on hover */
}

/* --- End Scrollable Gallery Styles --- */

/* --- Barcode Section Styles --- */

#barcode-section {
    padding: 2rem 1rem; /* Adjust padding as needed */
    background-color: #f9fafb; /* Light background, adjust if needed */
    text-align: center;
}

#barcode-container {
    margin: 1rem auto;
    max-width: 320px; /* Adjust max width for the barcode */
    border: 1px solid #ddd; /* Optional border */
    border-radius: 8px; /* Optional rounded corners */
    overflow: hidden; /* Ensures border-radius clips the iframe */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Optional subtle shadow */
}

#barcode-container iframe {
    width: 100%;
    height: 400px; /* Adjust height as needed */
    border: none;
}

#barcode-title {
    font-size: 1.5rem; /* Adjust title size */
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333; /* Adjust title color */
}

#barcode-description {
    color: #666; /* Adjust description color */
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

#share-button-container {
    margin-top: 1rem;
}

#share-button {
    background-color: #4267B2; /* Facebook blue, change if needed */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px; /* Rounded button */
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* Space between icon and text */
    transition: background-color 0.3s ease;
}

#share-button:hover {
    background-color: #365899; /* Darker blue on hover */
}

#share-button i {
    font-size: 1rem; /* Adjust icon size */
}

/* Optional: Style for the share modal/menu if you implement one */
/* #share-modal { ... } */

/* --- End Barcode Section Styles --- */