/* ========================================
   ZCWA Website - Main Stylesheet
   Critical CSS moved inline to <head>
   ======================================== */

/* ========================================
   Affiliate Notice
   ======================================== */

.footer-section .affiliate-notice {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.7;
    margin-top: 15px;
    font-style: italic;
    opacity: 0.9;
}

/* ========================================
   Products Section
   ======================================== */

.products {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 50px;
    font-weight: 700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 300px;
    background-color: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 25px;
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #ff9800;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.discount-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #cc0c39;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 700;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.product-rating .stars {
    color: #ffa500;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.product-rating .rating-text {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.product-rating .reviews-count {
    color: var(--text-light);
    font-size: 0.85rem;
}

.product-price {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-price .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #067d62;
}

.product-price .original-price {
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-features {
    margin-bottom: 25px;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 0;
    font-size: 0.95rem;
}

.product-features li strong {
    color: var(--text-dark);
    font-weight: 600;
}

.product-link {
    display: inline-block;
    background: #f2a842;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.product-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.product-link-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.product-link-disabled:hover {
    background-color: #ccc;
    transform: none;
}

/* ========================================
   Features List Section
   ======================================== */

.features-list {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    padding: 25px;
    background-color: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-item h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Testimonials Section
   ======================================== */

.testimonials {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--bg-white);
    padding: 35px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.customer-photo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-light);
}

.customer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card h4 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.rating {
    color: #ffa500;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.testimonial-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-style: italic;
}

.testimonial-text {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    position: relative;
}

.testimonial-text.expanded {
    max-height: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 10px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-block;
}

.read-more-btn:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Review Gallery Carousel */
.review-gallery-carousel {
    position: relative;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-gallery {
    display: flex;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    justify-content: center;
}

.review-gallery a {
    display: block;
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    opacity: 1;
}

.review-gallery a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.review-gallery a.hidden {
    display: none;
}

.review-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.carousel-nav:hover:not(:disabled) {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-nav:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.carousel-nav:active:not(:disabled) {
    transform: scale(0.95);
}

/* ========================================
   Video Section
   ======================================== */

.video-section {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.video-container {
    max-width: 900px;
    margin: 0 auto 40px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.video-container:last-child {
    margin-bottom: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* YouTube Facade Styles */
.youtube-facade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
}

.youtube-facade .youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.youtube-facade:hover .youtube-thumbnail {
    opacity: 0.85;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0;
    z-index: 1;
}

.youtube-play-button:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-play-button svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ========================================
   Gallery Section
   ======================================== */

.gallery {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

/* Product Gallery Carousel */
.product-gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-gallery-carousel .gallery-grid {
    display: flex;
    gap: 20px;
    overflow: hidden;
    flex: 1;
    justify-content: center;
}

.gallery-item {
    display: block;
    aspect-ratio: 1;
    background-color: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    opacity: 1;
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   About Section
   ======================================== */

.about {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 50px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-section p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ========================================
   Newsletter Section
   ======================================== */

.newsletter {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 15px 35px;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 50px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-section h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-section p {
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: #999;
    font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Simple mobile approach - can be enhanced with hamburger menu */
    }

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

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    /* Product Gallery - 2 items on tablets */
    .product-gallery-carousel .gallery-item {
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 480px) {
    .key-features .container,
    .products-grid,
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Product Gallery - 1 item on mobile */
    .product-gallery-carousel .gallery-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .product-gallery-carousel .gallery-grid {
        gap: 10px;
    }
}

/* ========================================
   Lazy Loading Styles (Lozad.js)
   ======================================== */

/* Images with lozad class start with opacity 0 */
img.lozad {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Once loaded, fade in the image */
img.lozad.loaded {
    opacity: 1;
}

/* Optional: Add a light background color as placeholder */
img.lozad:not(.loaded) {
    background-color: #f0f0f0;
    min-height: 200px;
}
