/* ========================================
   Products Page - Catalog & Modal Styles
   ======================================== */

/* Products Catalog Section */
.products-catalog {
    padding: 5rem 0;
    background: var(--primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.6s ease-out both;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 167, 89, 0.15), var(--shadow-xl);
    border-color: var(--secondary);
}

/* Product Card Image */
.product-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

.product-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(0, 167, 89, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-placeholder-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-500);
}

.image-placeholder-card svg {
    width: 50px;
    height: 50px;
    opacity: 0.5;
}

.image-placeholder-card span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Product Card Content */
.product-card-content {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-content h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.product-card-content p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.view-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-details svg {
    transition: transform 0.3s ease;
}

.product-card:hover .view-details svg {
    transform: translateX(5px);
}

/* Product Card Hover - Text Color Changes */
.product-card:hover .product-card-content {
    background: var(--secondary);
    border-top-color: var(--secondary);
}

.product-card:hover .product-card-content h3 {
    color: white;
}

.product-card:hover .product-card-content p {
    color: rgba(255, 255, 255, 0.85);
}

.product-card:hover .product-card-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.product-card:hover .view-details {
    color: white;
}

.product-card:hover .view-details svg {
    stroke: white;
}

/* ========================================
   Product Detail Section (Full Page)
   ======================================== */

.product-detail-section {
    padding: 120px 0 5rem;
    background: var(--primary);
    min-height: 100vh;
    animation: fadeInUp 0.5s ease-out;
}

/* Back to Products Button */
.back-to-products {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.back-to-products:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateX(-5px);
}

.back-to-products:hover svg {
    transform: translateX(-3px);
}

.back-to-products svg {
    transition: transform 0.3s ease;
}

/* Product Detail Content */
.product-detail-section .section-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.product-detail-section .section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

/* Product Showcase in Detail */
.product-detail-section .product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.product-detail-section .product-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail-section .product-gallery {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--gray-200);
}

.product-detail-section .gallery-main {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.product-detail-section .gallery-main img,
.product-detail-section .gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-detail-section .gallery-main:hover img {
    transform: scale(1.03);
}

.product-detail-section .gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-100);
    justify-content: center;
    flex-wrap: wrap;
}

.product-detail-section .gallery-thumbs .thumb {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.product-detail-section .gallery-thumbs .thumb:hover,
.product-detail-section .gallery-thumbs .thumb.active {
    opacity: 1;
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 167, 89, 0.2);
}

.product-detail-section .gallery-thumbs .video-thumb {
    position: relative;
}

.product-detail-section .gallery-thumbs .video-thumb::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Product Info Cards in Detail */
.product-detail-section .product-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--gray-200);
}

/* Product Details Card */
.product-detail-section .product-details {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--gray-200);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.product-detail-section .product-details h3 {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.product-detail-section .product-description-wrapper {
    margin-bottom: 2rem;
}

.product-detail-section .product-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.9;
    text-align: justify;
}

.product-detail-section .product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.product-detail-section .product-actions .btn-primary,
.product-detail-section .product-actions .btn-secondary {
    flex: 1;
    justify-content: center;
    min-width: 150px;
}

/* Image Placeholder */
.product-detail-section .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-500);
}

.product-detail-section .image-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.5;
}

.product-detail-section .image-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-detail-section .product-showcase {
        grid-template-columns: 1fr;
    }

    .product-detail-section .product-details {
        position: relative;
        top: 0;
    }

    .product-detail-section .gallery-main {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .products-catalog {
        padding: 4rem 0;
    }

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

    .product-card-image {
        height: 220px;
    }

    .product-detail-section {
        padding: 100px 0 4rem;
    }

    .product-detail-section .gallery-main {
        height: 350px;
    }

    .product-detail-section .gallery-thumbs .thumb {
        width: 60px;
        height: 60px;
    }

    .product-detail-section .product-info-cards {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail-section .product-details {
        padding: 1.5rem;
    }

    .product-detail-section .product-details h3 {
        font-size: 1.35rem;
    }

    .product-detail-section .product-description {
        font-size: 1rem;
    }

    .product-detail-section .product-actions {
        flex-direction: column;
    }

    .product-detail-section .product-actions .btn-primary,
    .product-detail-section .product-actions .btn-secondary {
        width: 100%;
    }

    .back-to-products {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 1rem;
    }

    .product-card-image {
        height: 200px;
    }

    .product-card-content {
        padding: 1.25rem;
    }

    .product-card-content h3 {
        font-size: 1.1rem;
    }

    .product-detail-section .gallery-main {
        height: 280px;
    }

    .product-detail-section .gallery-thumbs .thumb {
        width: 50px;
        height: 50px;
    }

    .product-detail-section .product-info-cards {
        padding: 1rem;
        gap: 0.75rem;
    }

    .feature-item {
        padding: 0.75rem;
        min-height: auto;
    }

    .feature-label {
        font-size: 0.7rem;
    }

    .feature-value {
        font-size: 0.9rem;
    }
}

/* ========================================
   Additional Animations
   ======================================== */

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

@keyframes cardPulse {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 167, 89, 0.1);
    }
}

/* Hover animation for cards */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 167, 89, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

/* Gradient border animation on hover */
.product-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light), var(--secondary-dark));
    border-radius: calc(var(--radius-xl) + 2px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::after {
    opacity: 1;
}

/* Make cards position relative for pseudo-elements */
.product-card {
    position: relative;
}

/* Lightbox Navigation */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e; /* Dark color for icon */
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 2.5;
}

@media (max-width: 1200px) {
    .lightbox-prev { left: 20px; }
    .lightbox-next { right: 20px; }
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

