/* Product Container */
.product-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    width: 100%;
}

.product-gallery-container {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 30px;
}

.summary.entry-summary {
    flex: 0 0 50%;
    padding: 0 15px;
    box-sizing: border-box;
}

.main-image-container {
    margin-bottom: 15px;
    overflow: hidden;
    background: #fff;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-image-link {
    display: block;
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f9f9f9;
    cursor: zoom-in;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.03);
}

.thumbnail-slider-container {
    position: relative;
    margin-top: 15px;
}

.thumbnail-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.thumbnail-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.thumbnail-item {
    flex: 0 0 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.thumbnail-item:hover {
    opacity: 0.9;
    border-color: #ddd;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: #036666;
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.thumbnail-item:hover .thumbnail-image {
    transform: scale(1.05);
}

/* Navigation arrows for thumbnails */
.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    font-size: 16px;
    color: #333;
}

.thumbnail-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.thumbnail-nav:hover:not(:disabled) {
    background: #f5f5f5;
    color: #000;
}

.thumbnail-nav.prev {
    left: 0;
}

.thumbnail-nav.next {
    right: 0;
}

.thumbnail-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Fancybox customizations */
.fancybox-slide--image .fancybox-content {
    max-width: 90%;
    max-height: 90%;
    padding: 0;
    background: #fff;
}

.fancybox-thumbs {
    background: rgba(0, 0, 0, 0.1);
}

.fancybox-thumbs > ul > li {
    border-color: rgba(255, 255, 255, 0.2);
}

.fancybox-thumbs > ul > li::before {
    border: 3px solid #4d9eff;
}

/* Mobile & tablet */
@media (max-width: 768px) {
    .woocommerce-product-gallery__image.slick-slide {
        width: auto !important;
    }

    .slick-list {
        height: auto !important;
    }
    .woocommerce div.product .product_title {
        font-size: 22px;
    }
}

.woocommerce-Tabs-panel .specification-group {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.woocommerce-Tabs-panel .specification-group table {
    border: none;
    margin: 0;
}

.woocommerce-Tabs-panel .specification-group tbody tr {
    border: none;
}

.woocommerce-Tabs-panel .specification-group tbody tr td {
    padding: 14px 20px;
    line-height: 1.6;
    border: none;
}

.woocommerce-Tabs-panel .specification-group tbody tr td:first-child {
    width: 32%;
    font-weight: 500;
    color: #666;
    background: linear-gradient(90deg,
            rgba(248, 248, 248, 0.8),
            rgba(255, 255, 255, 0));
    border-radius: 8px 0 0 8px;
}

.woocommerce-Tabs-panel .specification-group tbody tr td:last-child {
    color: #222;
}

.woocommerce-Tabs-panel .specification-group tbody tr:not(:last-child) td {
    padding-bottom: 18px;
}

.woocommerce-Tabs-panel .specification-group i,
.woocommerce-Tabs-panel .specification-group svg {
    opacity: 0.85;
}

.woocommerce-Tabs-panel .specification-group table,
.woocommerce-Tabs-panel .specification-group tr,
.woocommerce-Tabs-panel .specification-group td {
    background: transparent !important;
}

.woocommerce-Tabs-panel .specification-group tbody tr td {
    padding: 14px 20px;
    line-height: 1.6;
    border: none;
}

.woocommerce-Tabs-panel .specification-group tbody tr:not(:last-child) td {
    border-bottom: 1px solid #eee;
}

.woocommerce-Tabs-panel .specification-group tbody tr td:first-child {
    width: 32%;
    font-weight: 500;
    color: #666;
}

.woocommerce-Tabs-panel .specification-group tbody tr td:last-child {
    color: #222;
}

@media (max-width: 768px) {
    .woocommerce-Tabs-panel .specification-group tbody tr td {
        display: block;
        width: 100%;
        padding: 10px 16px;
    }

    .woocommerce-Tabs-panel .specification-group tbody tr td:first-child {
        font-size: 12px;
        color: #888;
        margin-bottom: 4px;
    }

    .woocommerce-Tabs-panel .specification-group tbody tr:not(:last-child) td:last-child {
        border-bottom: 1px solid #eee;
        padding-bottom: 16px;
    }
}

/* Custom styles for the modal */
.fancybox-skin {
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Close button styling */
.fancybox-close {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
}

.fancybox-close:after {
    content: '×';
    color: #fff;
    font-size: 28px;
    line-height: 36px;
    text-align: center;
    display: block;
}

/* Navigation arrows */
.fancybox-nav {
    width: 60px;
}

.fancybox-prev span {
    left: 20px;
}

.fancybox-next span {
    left: auto;
    right: 20px;
}

/* Prevent scrolling when modal is open */
body.fancybox-open {
    overflow: hidden;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100% !important;
}

@media (max-width: 767px) {

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: 48% !important;
    }
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    padding: 0;
    position: relative;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    margin: 0 0 0.5em;
    padding: 0.5em 0;
    font-size: 1em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.5em;
    max-height: 3.5em;
    line-height: 1.5em;
    flex: 0 0 auto;
}

.woocommerce ul.products li.product a.woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
