/**
 * Single Product Page Styles
 * Professional styling matching the website's design aesthetic
 *
 * @package Tanisi_Insurge
 */

/* Single Product Wrapper - Flex Column Container */
.single-product-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
    background: #ffffff;
    border-radius: 16px;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 2rem 20px !important;
}

/* Breadcrumbs - In flex container */
.single-product-breadcrumbs {
    margin-bottom: 0;
}

/* Remove padding from single product article */
.single-product-no-padding {
    padding: 0 !important;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: #0e3e26;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breadcrumb-link:hover {
    color: #0a2e1f;
    background-color: rgba(14, 62, 38, 0.05);
}

.breadcrumb-separator {
    color: #ccc;
    margin: 0 0.25rem;
    font-weight: 300;
}

.breadcrumb-current span {
    color: #333;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

/* Product Title - Now in right column */
.single-product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0e3e26;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

/* Main Product Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Product Image Column */
.product-image-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-main-image {
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.product-main-image:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.product-main-image-placeholder {
    padding: 100px 20px;
    text-align: center;
    background: #f5f5f5;
    color: #999;
    font-size: 1.1rem;
}

/* Product Gallery */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-gallery img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Product Info Column */
.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-categories {
    margin-bottom: 0;
}

.product-categories strong {
    color: #0e3e26;
    font-weight: 600;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.product-category-link {
    display: inline-block;
    background-color: #0e3e26;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.product-category-link:hover {
    background-color: #0a2e1f;
    color: white;
    transform: translateY(-1px);
}

/* Product Price */
.product-price {
    font-size: 1.8rem;
    color: #0e3e26;
    font-weight: 700;
    margin: 1rem 0;
}

/* Product Short Description */
.product-short-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0e3e26;
}

/* Product Meta */
.product-meta {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.product-meta p {
    margin: 0.5rem 0;
    color: #666;
}

.product-meta strong {
    color: #0e3e26;
    font-weight: 600;
}

/* Product Description in Right Column */
.product-description-right-column {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.product-description-right-column h4 {
    color: #0e3e26;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.product-description-content {
    line-height: 1.6;
    color: #333;
}

.product-description-short {
    margin-bottom: 1rem;
}

.product-description-full {
    transition: all 0.3s ease;
}

.product-description-full.show {
    display: block !important;
}

.read-more-toggle,
.read-less-toggle {
    background: none;
    border: none;
    color: #0e3e26;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    text-decoration: underline;
}

.read-more-toggle:hover,
.read-less-toggle:hover {
    color: #0a2e1f;
}

.read-less-toggle {
    margin-top: 0;
    margin-left: 0.25rem;
}

/* Single Product CTA Section */
.single-product-cta-inner-container {
    background: linear-gradient(to right, rgb(14 62 38 / 84%) 0%, rgba(14, 62, 38, 1) 100%),
                linear-gradient(135deg, #0e3e26 0%, #1a5d3a 100%);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    border-radius: 16px;
    padding: 60px;
    color: white;
    box-shadow: 0 20px 40px rgba(14, 62, 38, 0.15);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.single-product-cta-inner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgb(14 62 38 / 84%) 0%, rgba(14, 62, 38, 1) 100%);
    z-index: 1;
}

.single-product-cta-inner-container .cta-enquiry-grid {
    position: relative;
    z-index: 2;
}

/* Responsive styling for single product CTA */
@media (max-width: 768px) {
    .single-product-cta-inner-container {
        padding: 40px 25px;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    .single-product-cta-inner-container {
        padding: 30px 20px;
    }
}

/* Center the CTA section container */
.single-product-cta-section .single-product-cta-inner-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Product Full Description */
.product-full-description {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e0e0e0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.product-full-description h2 {
    font-size: 2.5rem;
    color: #0e3e26;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.product-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.product-content h3 {
    color: #0e3e26;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.product-content p {
    margin-bottom: 1.5rem;
}

.product-content ul,
.product-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.product-content li {
    margin-bottom: 0.5rem;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-top: 3rem;
    border-top: 2px solid #e0e0e0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-products h2 {
    font-size: 2.5rem;
    color: #0e3e26;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.related-product-card {
    background: transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.related-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-product-image {
    height: 250px;
    background-color: #f8f8f8;
    overflow: hidden;
    position: relative;
}

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

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

.related-product-info {
    padding: 1.5rem;
}

.related-product-info h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #0e3e26;
    font-weight: 600;
}

.related-product-info h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.related-product-info h3 a:hover {
    color: #0a2e1f;
}

.related-product-link {
    color: #0e3e26;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.related-product-link:hover {
    color: #0a2e1f;
    transform: translateX(5px);
}

/* Related Products View All Button */
.related-products .view-all-link {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}


/* Animation Classes - Consistent with site */
.related-product-card.will-animate {
    opacity: 0;
    transform: translateY(60px);
}

.related-product-card.animate-in {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .product-layout {
        gap: 3rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body .single-product-wrapper {
        border-radius: 12px;
        padding: 1.5rem 20px !important;
        margin: 0 20px !important;
    }

    .single-product-cta-section .single-product-cta-inner-container {
        margin: 0 20px !important;
    }

    /* Responsive Breadcrumbs */
    .breadcrumb-list {
        font-size: 0.8rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .breadcrumb-link {
        padding: 0.15rem 0.35rem;
        font-size: 0.8rem;
    }

    .breadcrumb-separator {
        margin: 0 0.15rem;
        font-size: 0.7rem;
    }

    .breadcrumb-current span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: top;
        padding: 0.15rem 0.35rem;
    }

    /* Add gap between product area and CTA section */
    .single-product-cta-section {
        margin-top: 3rem;
    }

    .single-product-title {
        font-size: 2rem;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .related-products {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 576px) {
    body .single-product-wrapper {
        padding: 1rem 20px !important;
        margin: 0 20px !important;
    }

    .single-product-cta-section .single-product-cta-inner-container {
        margin: 0 20px !important;
    }

    /* Responsive Breadcrumbs - Smaller screens */
    .breadcrumb-list {
        font-size: 0.75rem;
        gap: 0.2rem;
    }

    .breadcrumb-current span {
        max-width: 120px;
        padding: 0.15rem 0.35rem;
    }

    /* Add gap between product area and CTA section - Smaller screens */
    .single-product-cta-section {
        margin-top: 2.5rem;
    }

    .single-product-title {
        font-size: 1.8rem;
    }

    .product-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .related-products {
        padding-left: 20px;
        padding-right: 20px;
    }

    .product-content {
        font-size: 1rem;
    }
}