/* Product Detail Page Styles */

/* ==================== Product Detail Section ==================== */
.product-detail-section {
    padding: 60px 0;
    background: #fff;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* ==================== Product Gallery ==================== */
.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-gallery .main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-gallery .main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

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

.thumbnail:hover {
    border-color: #2eb058;
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: #2eb058;
    box-shadow: 0 2px 8px rgba(46, 176, 88, 0.3);
}

/* ==================== Product Info ==================== */
.product-info {
    padding: 20px 0;
}

.product-meta {
    margin-bottom: 16px;
}

.product-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #a6cb5d 0%, #2eb058 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 30px;
    font-weight: 700;
    color: #054326;
    margin-bottom: 24px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==================== Price Section ==================== */
.product-price-section {
    padding: 16px;
    background: linear-gradient(135deg, #f8fdf5 0%, #e8f5e9 100%);
    border-radius: 12px;
    margin-bottom: 32px;
    border: 2px solid #2eb058;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.price-current {
    font-size: 26px;
    font-weight: 700;
    color: #2eb058;
    line-height: 1;
}

.price-original {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
}

.price-discount {
    display: inline-block;
    padding: 6px 12px;
    background: #ff4444;
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

/* ==================== Description ==================== */
.product-description {
    margin-bottom: 32px;
}

.product-description h3 {
    font-size: 24px;
    font-weight: 700;
    color: #054326;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2eb058;
}

.description-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.description-content h3,
.description-content h4 {
    color: #054326;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 700;
}

.description-content h3 {
    font-size: 20px;
}

.description-content h4 {
    font-size: 18px;
}

.description-content ul,
.description-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.description-content li {
    margin-bottom: 8px;
}

.description-content p {
    margin-bottom: 12px;
}

.description-content strong {
    font-weight: 700;
    color: #054326;
}

/* ==================== Product Actions ==================== */
.product-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-actions .btn--primary {
    background: linear-gradient(135deg, #a6cb5d 0%, #2eb058 100%);
    color: #fff;
    border-color: #2eb058;
}

.product-actions .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 176, 88, 0.3);
}

.product-actions .btn--outline {
    background: transparent;
    color: #2eb058;
    border-color: #2eb058;
}

.product-actions .btn--outline:hover {
    background: #2eb058;
    color: #fff;
}

.product-actions .btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* ==================== Related Products Section ==================== */
.related-products-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.related-products-section .section-title-wrapper {
    margin-bottom: 48px;
}

.related-products-section .section-title {
    font-size: 36px;
    font-weight: 700;
    color: #054326;
    position: relative;
    display: inline-block;
}

.related-products-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #a6cb5d 0%, #2eb058 100%);
    border-radius: 2px;
}

/* Related Products Carousel */
.related-products-carousel {
    position: relative;
}

.related-products-carousel .owl-nav {
    margin-top: 0;
}

.related-products-carousel .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #054326;
    z-index: 10;
}

.related-products-carousel .owl-nav button:hover {
    background: #2eb058 !important;
    color: #fff;
    box-shadow: 0 6px 16px rgba(46, 176, 88, 0.3);
}

.related-products-carousel .owl-nav button.owl-prev {
    left: -25px;
}

.related-products-carousel .owl-nav button.owl-next {
    right: -25px;
}

.related-products-carousel .owl-dots {
    margin-top: 20px;
    text-align: center;
}

/* Simplified dots: small circular indicators, green when active */
.related-products-carousel .owl-dots .owl-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #d0d0d0 !important;
    border-radius: 50%;
    margin: 0 6px;
    transition: transform 0.18s ease, background 0.18s ease;
}

.related-products-carousel .owl-dots .owl-dot.active {
    background: #2eb058 !important;
    transform: scale(1.25);
}

/* Hide nav arrows on very small screens via CSS as a fallback */
@media (max-width: 767px) {
    .related-products-carousel .owl-nav { display: none !important; }
}

/* Product Card - Vertical Layout */
.related-product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.related-product-item .product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.related-product-item .product-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.related-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-product-item .product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-item .product-title {
    font-size: 18px;
    font-weight: 700;
    color: #054326;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-product-item .product-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.related-product-item .product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.related-product-item .price {
    font-size: 22px;
    font-weight: 700;
    color: #2eb058;
}

.related-product-item .price-promo {
    font-size: 22px;
    font-weight: 700;
    color: #2eb058;
}

.related-product-item .price-old {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

/* ==================== Mobile Responsive ==================== */
@media (max-width: 991px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: 28px;
    }

    .price-current {
        font-size: 32px;
    }

    .price-original {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .product-detail-section {
        padding: 40px 0;
    }

    .product-detail-wrapper {
        gap: 30px;
    }

    .product-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .product-price-section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .price-current {
        font-size: 28px;
    }

    .price-original {
        font-size: 18px;
    }

    .price-discount {
        font-size: 14px;
        padding: 4px 8px;
    }

    .product-description h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .description-content {
        font-size: 15px;
        line-height: 1.7;
    }

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

    .product-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .related-products-section {
        padding: 60px 0;
    }

    .related-products-section .section-title {
        font-size: 28px;
    }

    .related-products-carousel .owl-nav button {
        width: 40px;
        height: 40px;
    }

    .related-products-carousel .owl-nav button.owl-prev {
        left: -10px;
    }

    .related-products-carousel .owl-nav button.owl-next {
        right: -10px;
    }

    .related-product-item .product-content {
        padding: 16px;
    }

    .related-product-item .product-title {
        font-size: 16px;
    }

    .related-product-item .product-excerpt {
        font-size: 13px;
    }

    .related-product-item .price,
    .related-product-item .price-promo {
        font-size: 18px;
    }

    .related-product-item .price-old {
        font-size: 14px;
    }

    .thumbnail-images {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .product-detail-section {
        padding: 30px 0;
    }

    .product-title {
        font-size: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .price-current {
        font-size: 24px;
    }

    .product-category {
        font-size: 11px;
        padding: 4px 12px;
    }

    .description-content {
        font-size: 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .description-content h3 {
        font-size: 16px;
        word-wrap: break-word;
    }

    .description-content h4 {
        font-size: 15px;
        word-wrap: break-word;
    }

    .related-products-section .section-title {
        font-size: 24px;
    }

    .related-products-carousel .owl-nav button {
        width: 35px;
        height: 35px;
    }

    .related-products-carousel .owl-nav button.owl-prev {
        left: -5px;
    }

    .related-products-carousel .owl-nav button.owl-next {
        right: -5px;
    }

    .related-product-item .product-content {
        padding: 14px;
    }

    .related-product-item .product-title {
        font-size: 15px;
    }

    .related-product-item .product-excerpt {
        font-size: 13px;
    }

    .related-product-item .price,
    .related-product-item .price-promo {
        font-size: 18px;
    }

    .related-product-item .price-old {
        font-size: 13px;
    }
}

/* ==================== Price Display in Homepage ==================== */
.product-item .product-price {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-item .price {
    font-size: 20px;
    font-weight: 700;
    color: #2eb058;
}

.product-item .price-original {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.product-item .price-promo {
    font-size: 20px;
    font-weight: 700;
    color: #2eb058;
}
