/**
 * Product Template Styles
 * Additional styles for the Product Template page
 */

/* Product Template Main Container */
.product-template-main {
    padding: 40px 0;
}

/* Spacer between shortcode and product */
.product-template-spacer {
    height: 60px;
}

/* Product Breadcrumbs */
.product-template-main .product-breadcrumb-wrapper {
    margin-bottom: 30px;
}

.product-template-main .pxl-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #666;
}

.product-template-main .pxl-breadcrumb li {
    display: flex;
    align-items: center;
    margin: 0;
}

.product-template-main .pxl-breadcrumb li:after {
    content: "›";
    margin: 0 10px;
    color: #999;
    font-size: 16px;
}

.product-template-main .pxl-breadcrumb li:last-child:after {
    content: none;
}

.product-template-main .pxl-breadcrumb a.breadcrumb-entry {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-template-main .pxl-breadcrumb a.breadcrumb-entry:hover {
    color: #75B543;
    text-decoration: underline;
}

.product-template-main .pxl-breadcrumb li:last-child span.breadcrumb-entry {
    color: #999;
    font-weight: 500;
}

/* Product Gallery Section */
.product-template-main .woocommerce-gallery {
    padding-right: 30px;
}

.product-template-main .product-images {
    position: relative;
}

.product-template-main .product-gallery-disclaimer {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    margin-bottom: 0;
    font-style: italic;
}

/* Main Image */
.product-template-main .product-main-image-wrap {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
}

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

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

.product-template-main .no-image-placeholder {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Gallery Navigation */
.product-template-main .product-gallery-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-template-main .gallery-nav-btn {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057 !important;
    font-size: 16px;
    padding: 0 !important;
    line-height: 1 !important;
}

.product-template-main .gallery-nav-btn:hover {
    background-color: var(--primary-color, #007bff) !important;
    border-color: var(--primary-color, #007bff) !important;
    color: #fff !important;
    transform: scale(1.1);
}

.product-template-main .gallery-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.product-template-main .gallery-nav-btn .arrow-icon {
    font-size: 32px !important;
    line-height: 1 !important;
    display: block !important;
    font-weight: 300;
    font-family: Arial, sans-serif;
}

/* Thumbnails Container */
.product-template-main .product-gallery-thumbnails {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.product-template-main .thumbnails-wrapper {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.product-template-main .gallery-thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.product-template-main .gallery-thumbnail-item:hover,
.product-template-main .gallery-thumbnail-item.active {
    border-color: var(--primary-color, #007bff);
}

.product-template-main .gallery-thumbnail-item:not(.active) {
    opacity: 0.6;
}

.product-template-main .gallery-thumbnail-item.active {
    opacity: 1;
}

/* Product Summary Section */
.product-template-main .summary {
    padding-left: 30px;
}

.product-template-main .woocommerce-sg-product-title {
    margin-bottom: 15px;
}

.product-template-main .product_title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
    color: #75B543;
}

.product-template-main .product-subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    color: #666;
}

.product-template-main .product-size-disclaimer {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    margin-bottom: 0;
    font-style: italic;
}

/* Product Rating */
.product-template-main .woocommerce-sg-product-rating {
    margin-bottom: 15px;
}

.product-template-main .star-rating-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-template-main .star-rating {
    position: relative;
    height: 1em;
    font-size: 1em;
    line-height: 1;
    width: 5.5em;
}

.product-template-main .star-rating::before {
    content: "\2605\2605\2605\2605\2605";
    color: #d3ced2;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

.product-template-main .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.product-template-main .star-rating span::before {
    content: "\2605\2605\2605\2605\2605";
    top: 0;
    position: absolute;
    left: 0;
    color: #ffc107;
}

/* Product Price */
.product-template-main .woocommerce-sg-product-price {
    margin-bottom: 20px;
}

.product-template-main .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color, #007bff);
    margin: 0;
}

.product-template-main .price del {
    color: #999;
    font-weight: 400;
    font-size: 20px;
    margin-right: 10px;
}

.product-template-main .price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Product Excerpt */
.product-template-main .woocommerce-sg-product-excerpt {
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Product Enquiry Form (Gravity Forms) */
.product-template-main .product-enquiry-form {
    background-color: #75B543;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.product-template-main .product-enquiry-form .gform_wrapper {
    margin: 0 !important;
}

.product-template-main .product-enquiry-form .gform_body {
    margin-bottom: 0 !important;
}

.product-template-main .product-enquiry-form .gfield {
    margin-bottom: 15px !important;
}

.product-template-main .product-enquiry-form .gfield_label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.product-template-main .product-enquiry-form input[type="text"],
.product-template-main .product-enquiry-form input[type="email"],
.product-template-main .product-enquiry-form input[type="tel"],
.product-template-main .product-enquiry-form input[type="number"],
.product-template-main .product-enquiry-form select,
.product-template-main .product-enquiry-form textarea {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
    height: auto !important;
    min-height: 44px !important;
}

.product-template-main .product-enquiry-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px !important;
}

.product-template-main .product-enquiry-form input[type="text"]:focus,
.product-template-main .product-enquiry-form input[type="email"]:focus,
.product-template-main .product-enquiry-form input[type="tel"]:focus,
.product-template-main .product-enquiry-form input[type="number"]:focus,
.product-template-main .product-enquiry-form select:focus,
.product-template-main .product-enquiry-form textarea:focus {
    border-color: #fff !important;
    outline: none !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.product-template-main .product-enquiry-form textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

.product-template-main .product-enquiry-form .gform_footer {
    margin-top: 20px !important;
    padding: 0 !important;
}

.product-template-main .product-enquiry-form .gform_button,
.product-template-main .product-enquiry-form input[type="submit"] {
    background-color: #fff !important;
    color: #75B543 !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
}

.product-template-main .product-enquiry-form .gform_button:hover,
.product-template-main .product-enquiry-form input[type="submit"]:hover {
    background-color: #f8f9fa !important;
    color: #5fa035 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.product-template-main .product-enquiry-form .validation_error {
    background-color: #fff !important;
    border: 2px solid #ffc107 !important;
    color: #856404 !important;
    padding: 12px 15px !important;
    border-radius: 4px !important;
    margin-bottom: 15px !important;
}

.product-template-main .product-enquiry-form .gfield_error {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.product-template-main .product-enquiry-form .gfield_error input,
.product-template-main .product-enquiry-form .gfield_error textarea,
.product-template-main .product-enquiry-form .gfield_error select {
    border-color: #dc3545 !important;
    background-color: #fff !important;
}

.product-template-main .product-enquiry-form .validation_message {
    color: #fff !important;
    font-size: 13px !important;
    margin-top: 5px !important;
    background-color: rgba(220, 53, 69, 0.9);
    padding: 5px 10px;
    border-radius: 3px;
}

.product-template-main .product-enquiry-form .gfield_required {
    color: #fff;
}

.product-template-main .product-enquiry-form ::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Add to Cart Section */
.product-template-main .cart {
    margin-bottom: 25px;
}

.product-template-main .single_add_to_cart_button {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--primary-color, #007bff);
    color: #fff;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.product-template-main .single_add_to_cart_button:hover {
    background-color: var(--primary-hover-color, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-template-main .single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-template-main .single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-template-main .single_add_to_cart_button.added {
    background-color: #28a745;
}

/* Product Meta */
.product-template-main .woocommerce-product-info-meta {
    margin-bottom: 20px;
    padding: 15px 0;
}

.product-template-main .product_meta span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.product-template-main .product_meta span a {
    color: var(--primary-color, #007bff);
    text-decoration: none;
}

.product-template-main .product_meta span a:hover {
    text-decoration: underline;
}

/* Product Delivery Info */
.product-template-main .woocommerce-product-info-delivery {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.product-template-main .product-info-delivery {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.product-template-main .product-info-delivery:last-child {
    margin-bottom: 0;
}

.product-template-main .product-info-delivery i {
    color: var(--primary-color, #007bff);
    font-size: 18px;
}

/* Social Share */
.product-template-main .woocommerce-social-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
}

.product-template-main .woocommerce-social-share label {
    font-weight: 600;
    margin: 0;
}

.product-template-main .woocommerce-social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-template-main .woocommerce-social-share a:hover {
    transform: translateY(-3px);
}

.product-template-main .woocommerce-social-share .fb-social:hover {
    background-color: #3b5998;
    color: #fff;
}

.product-template-main .woocommerce-social-share .tw-social:hover {
    background-color: #1da1f2;
    color: #fff;
}

.product-template-main .woocommerce-social-share .lin-social:hover {
    background-color: #0077b5;
    color: #fff;
}

/* USPs Section */
.product-template-main .product-usps {
    margin-top: 25px;
    padding-top: 25px;
}

.product-template-main .usps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-template-main .usp-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-template-main .usp-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.product-template-main .usp-icon svg {
    display: block;
}

.product-template-main .usp-text {
    font-size: 18px;
    line-height: 1.5;
    color: #333;
}

/* Product Tabs */
.product-template-main .woocommerce-tabs {
    margin-top: 40px;
    /* padding-top: 30px; */
    background-color: #f5f5f5;
    padding: 40px;
    border-radius: 12px;
}

.product-template-main .wc-tabs {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-wrap: wrap;
    background-color: #fff;
    border-radius: 50px;
    padding: 5px;
}

.product-template-main .wc-tabs li {
    margin: 0;
    padding: 0;
    flex: 1;
}

.product-template-main .wc-tabs li a {
    display: block;
    padding: 14px 30px;
    font-weight: 600;
    font-size: 16px;
    color: #666;
    text-decoration: none;
    background-color: transparent;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.product-template-main .wc-tabs li a:hover {
    color: #333;
}

.product-template-main .wc-tabs li.active a {
    background-color: #75B543;
    color: #fff;
}

.product-template-main .woocommerce-Tabs-panel {
    padding: 20px 0;
}

.product-template-main .woocommerce-Tabs-panel h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* FAQ Accordion */
.product-template-main .product-faqs-accordion {
    margin: 0;
}

.product-template-main .faq-item {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-template-main .faq-item:last-child {
    margin-bottom: 0;
}

.product-template-main .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.product-template-main .faq-question:hover {
    background-color: #e9ecef;
}

.product-template-main .faq-item.active .faq-question {
    background-color: #75B543;
}

.product-template-main .faq-item.active .faq-question h3,
.product-template-main .faq-item.active .faq-question .faq-toggle {
    color: #fff;
}

.product-template-main .faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    transition: color 0.3s ease;
}

.product-template-main .faq-toggle {
    font-size: 28px;
    font-weight: 300;
    color: #666;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.product-template-main .faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.product-template-main .faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.product-template-main .faq-item.active .faq-answer {
    padding: 20px 25px;
    max-height: 1000px;
}

.product-template-main .faq-answer p {
    margin: 0 0 15px 0;
}

.product-template-main .faq-answer p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 991px) {
    .product-template-main .woocommerce-gallery,
    .product-template-main .summary {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .product-template-main .product_title {
        font-size: 28px;
    }
    
    .product-template-main .price {
        font-size: 24px;
    }
    
    /* Reduce visible thumbnails on tablets */
    .product-template-main .gallery-thumbnail-item {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 767px) {
    .product-template-main .woocommerce-gallery {
        margin-bottom: 30px;
    }
    
    .product-template-main .product_title {
        font-size: 24px;
    }
    
    .product-template-main .price {
        font-size: 20px;
    }
    
    .product-template-main .single_add_to_cart_button {
        width: 100%;
        text-align: center;
    }
    
    .product-template-main .wc-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .product-template-main .wc-tabs li a {
        border-bottom: 1px solid #e5e5e5;
        border-left: 3px solid transparent;
    }
    
    .product-template-main .wc-tabs li.active a {
        border-left-color: var(--primary-color, #007bff);
        border-bottom-color: #e5e5e5;
    }
    
    /* Smaller thumbnails and nav buttons on mobile */
    .product-template-main .gallery-thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .product-template-main .gallery-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .product-template-main .gallery-nav-btn i {
        font-size: 12px;
    }
    
    .product-template-main .product-gallery-nav {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    /* Stack thumbnails vertically on very small screens */
    .product-template-main .gallery-thumbnail-item {
        width: 50px;
        height: 50px;
    }
}
