/* ========================================
   HOME PAGE ENHANCED SECTIONS
   ======================================== */

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Featured Products Section */
.featured-products {
    padding: 5rem 0;
    background: var(--gray-50);
}

.featured-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.featured-product {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.featured-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.featured-product:nth-child(1) { animation-delay: 0.1s; }
.featured-product:nth-child(2) { animation-delay: 0.2s; }
.featured-product:nth-child(3) { animation-delay: 0.3s; }
.featured-product:nth-child(4) { animation-delay: 0.4s; }
.featured-product:nth-child(5) { animation-delay: 0.5s; }
.featured-product:nth-child(6) { animation-delay: 0.6s; }

.featured-product:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.featured-product .product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px 8px 0 0;
    width: 100%;
}

.featured-product .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: all 0.4s ease;
    filter: brightness(0.95);
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.featured-product:hover .product-image img {
    transform: scale(1.08);
    filter: brightness(1);
}


.featured-product .product-info {
    padding: 1.8rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-product .product-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.featured-product:hover .product-info h3 {
    color: var(--accent);
}

.featured-product .product-description {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-product .product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.featured-product .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.featured-product .price::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.featured-product .product-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.featured-product .add-to-cart-btn {
    width: auto;
    min-width: 140px;
    max-width: 200px;
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    pointer-events: auto;
    margin: 0 auto;
}

.featured-product .add-to-cart-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-product .add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.featured-product .login-to-buy-btn {
    width: auto;
    min-width: 140px;
    max-width: 200px;
    background: var(--gray-600);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    pointer-events: auto;
    margin: 0 auto;
}

.featured-product .login-to-buy-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-product .login-to-buy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.featured-product .show-details-btn {
    width: auto;
    min-width: 100px;
    max-width: 140px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    margin: 0;
}

.featured-product .show-details-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-product .show-details-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.no-products-message,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
}

.no-products-message i,
.error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.error-message i {
    color: var(--error);
}

/* Coffee Beans Animation Section */
.coffee-beans-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #2c1810 0%, #8B4513 50%, #D2691E 100%);
    position: relative;
    overflow: hidden;
}

.coffee-beans-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="coffee-beans" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="40" cy="40" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="15" cy="35" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="35" cy="15" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23coffee-beans)"/></svg>');
    opacity: 0.3;
}

.coffee-beans-section .section-header h2 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.coffee-beans-section .section-header p {
    color: rgba(255, 255, 255, 0.9);
}

.coffee-journey {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.journey-step {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.journey-step:nth-child(1) { animation-delay: 0.1s; }
.journey-step:nth-child(2) { animation-delay: 0.2s; }
.journey-step:nth-child(3) { animation-delay: 0.3s; }
.journey-step:nth-child(4) { animation-delay: 0.4s; }

.journey-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #8B4513);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.journey-step:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.journey-step:hover .step-icon {
    transform: scale(1.1) rotate(10deg);
}

.step-icon i {
    font-size: 2rem;
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.step-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

.coffee-bean {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    transition: all 0.5s ease;
    animation: beanFloat 3s ease-in-out infinite;
}

.journey-step:hover .coffee-bean {
    opacity: 1;
    animation: beanBounce 1s ease-in-out infinite;
}

.bean-1 {
    top: 20px;
    right: 20px;
    animation-delay: 0s;
}

.bean-2 {
    top: 30px;
    left: 20px;
    animation-delay: 0.5s;
}

.bean-3 {
    bottom: 20px;
    right: 30px;
    animation-delay: 1s;
}

.bean-4 {
    bottom: 30px;
    left: 30px;
    animation-delay: 1.5s;
}

.floating-beans {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-bean {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: floatAround 8s ease-in-out infinite;
}

.bean-float-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bean-float-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.bean-float-3 {
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.bean-float-4 {
    top: 70%;
    right: 10%;
    animation-delay: 3s;
}

.bean-float-5 {
    top: 40%;
    left: 50%;
    animation-delay: 4s;
}

.bean-float-6 {
    top: 80%;
    right: 30%;
    animation-delay: 5s;
}

/* Coffee Beans Animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes beanFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

@keyframes beanBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.2); }
}

@keyframes floatAround {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-10px) translateX(-10px) rotate(180deg);
        opacity: 0.4;
    }
    75% { 
        transform: translateY(-30px) translateX(5px) rotate(270deg);
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 0;
    background: var(--gray-50);
    position: relative;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.testimonial-card.active {
    display: block;
}

.testimonial-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: var(--accent);
    font-family: serif;
}

.stars {
    margin-bottom: 1.5rem;
}

.stars i {
    color: #FFD700;
    font-size: 1.2rem;
    margin: 0 2px;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.author-info span {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-prev,
.testimonial-next {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.1);
}

/* Newsletter Section */
.newsletter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.newsletter-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.newsletter-form {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
    color: var(--primary);
}

.newsletter-form input::placeholder {
    color: var(--gray-500);
}

.newsletter-form button {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.newsletter-form button.success {
    background: var(--success);
    animation: pulse 0.6s ease-out;
}

/* Button Styles */
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

/* Home Page Responsive Design */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .featured-products .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .testimonial-content {
        padding: 2rem;
    }

    .newsletter-form .form-group {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    .coffee-journey {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .journey-step {
        padding: 2rem 1.5rem;
    }
    
    .featured-products .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .featured-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .featured-product {
        padding: 0.5rem;
    }
    
    .featured-product .product-image {
        height: 180px;
    }
    
    .featured-product .product-info {
        padding: 1.2rem;
    }
    
    .featured-product .product-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .featured-product .product-description {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
        -webkit-line-clamp: 1;
    }
    
    .featured-product .price {
        font-size: 1.2rem;
    }
    
    
    .featured-product .add-to-cart-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        min-width: 120px;
        max-width: 180px;
    }
    
    .featured-product .login-to-buy-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        min-width: 120px;
        max-width: 180px;
    }
    
    .featured-product .show-details-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-width: 80px;
        max-width: 120px;
    }

    .coffee-journey {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .journey-step {
        padding: 2rem 1.5rem;
    }

    .step-icon {
        width: 60px;
        height: 60px;
    }

    .step-icon i {
        font-size: 1.5rem;
    }

    .coffee-bean {
        font-size: 1.5rem;
    }

    .floating-bean {
        font-size: 1.2rem;
    }

    .testimonial-content {
        padding: 1.5rem;
    }

    .newsletter-text h2 {
        font-size: 2rem;
    }
}
