/* Custom styles for single product page */

/* Full width main product image */
.woocommerce div.product div.images {
    width: 100% !important;
    margin: 0;
}

.woocommerce div.product div.images img,
#main-product-image {
    border-radius: 4px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    background: #fff;
}

/* Make gallery image area larger */
.woocommerce-product-gallery__wrapper {
    min-height: unset;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent !important;
    box-shadow: none !important;
}

/* New layout with vertical thumbnails on the right */
.gallery-layout-wrapper.thumbnails-right {
    display: flex;
    width: 100%;
    gap: 0;
    flex-direction: row;
    background: #fff;
    padding: 0;
}

.gallery-layout-wrapper.thumbnails-right .main-image-wrapper {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #ffffff;
}

.gallery-layout-wrapper.thumbnails-right .product-thumbnails-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100px;
    flex-shrink: 0;
    align-items: center;
    background: transparent;
}

.woocommerce-product-gallery__image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gallery thumbnails */
.thumbnail-item {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.thumbnail-item:hover {
    border-color: #FCD326 !important;
    transform: translateY(-2px);
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-item.active,
.thumbnail-item.selected {
    border-color: #FCD326 !important;
}

.woocommerce div.product .product_title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.woocommerce div.product p.price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.stock {
    font-size: 0.875rem;
    color: #22c55e;
    font-weight: 500;
}

.woocommerce div.product form.cart {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.woocommerce div.product form.cart div.quantity {
    margin-right: 1rem;
}

.woocommerce .quantity .qty {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background-color: #f97316;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background-color: #ea580c;
}

.product-meta {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

/* Vertikalūs blokai vietoj skirtukų */
.woocommerce-tabs {
    margin-top: 1.5rem;
}
.woocommerce-Tabs-panel {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.woocommerce-Tabs-panel h2 {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
}
.woocommerce-Tabs-panel > div {
    padding: 1.5rem;
}

/* Aprašymo ir papildomos informacijos stiliai */
.woocommerce-Tabs-panel h3, 
.woocommerce-Tabs-panel h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.woocommerce-Tabs-panel p {
    margin-bottom: 1rem;
    line-height: 1.6;
}
.woocommerce-Tabs-panel ul,
.woocommerce-Tabs-panel ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.woocommerce-Tabs-panel li {
    margin-bottom: 0.5rem;
}
.woocommerce-Tabs-panel table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.woocommerce-Tabs-panel th,
.woocommerce-Tabs-panel td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
}
.woocommerce-Tabs-panel th {
    background-color: #f9fafb;
    font-weight: 600;
    text-align: left;
}

/* Wishlist and compare buttons */
.wishlist-compare a {
    transition: all 0.2s;
}

.wishlist-compare a:hover {
    color: #2563eb;
}

/* Stock status */
.stock-status {
    margin-top: 0.5rem;
}

/* Sale badge */
.woocommerce span.onsale {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 9;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
    min-height: auto;
    min-width: auto;
    line-height: normal;
}

/* Pulse animation for sale badge */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    }
}

/* View larger image link */
.lightbox-trigger {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.lightbox-trigger:hover {
    background-color: #f1f3f5;
}

/* Full width gallery on medium screens */
@media (min-width: 768px) {
    .product-image-wrapper {
        padding: 0;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .gallery-layout-wrapper.thumbnails-right {
        flex-direction: column-reverse;
        gap: 0;
    }
    .gallery-layout-wrapper.thumbnails-right .main-image-wrapper {
        min-height: 200px;
    }
    .gallery-layout-wrapper.thumbnails-right .product-thumbnails-vertical {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        margin-top: 10px;
        justify-content: center;
        gap: 10px;
        align-items: flex-start;
        background: transparent;
    }
    .thumbnail-item {
        width: 60px;
        height: 60px;
        flex: 0 0 60px;
    }
}

/* Pašaliname seną woocommerce-variation-price stilių ir užrašome jį */
.woocommerce-variation-price {
    /* Slėpsime standartinį variacijos kainų rodymą, bet naudosime jo turinį */
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important; /* Vis dar reikia rodyti, kad galėtume nuskaityti */
}

/* Nauji kainos stiliai */
.price-container {
    position: relative;
}

.price-container .original-price {
    transition: opacity 0.3s;
}

.price-container .variation-price-display {
    position: relative;
    left: 0;
    top: 0;
}

.price-container.has-variation .original-price {
    display: none;
}

.price-container.has-variation .variation-price-display {
    display: block;
}

/* Užtikrinti, kad variacijos-kaina turi tinkamą dydį ir stilių */
.variation-price-display .price {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Variacijų pasirinkimai: side by side - tiesioginis sprendimas */
.variations {
    display: block;
    width: 100%;
}
.variations tbody {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
.variations tr {
    width: 50%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
}
.variations td.label {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0 0 5px 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}
.variations td.value {
    display: block;
    width: 100%;
}
@media (max-width: 767px) {
    .variations tr {
        width: 100%;
    }
}

/* Pasirinkimų validacija */
.selection-needed .choices__inner {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    animation: pulse-red 1s;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Paryškinti "Add to cart" mygtuką kai jis aktyvus */
.single_add_to_cart_button:not(:disabled) {
    animation: button-ready 0.5s;
}

@keyframes button-ready {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Delivery Options Improvements */
.delivery-option-item {
    transition: all 0.2s ease;
}

.delivery-option-item:hover {
    background-color: #f9fafb;
}

.delivery-option-item .stock-status {
    margin-top: 0;
    display: flex;
    align-items: center;
}

.delivery-option-item .stock-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.delivery-option-item .stock-status.text-green-600::before {
    background-color: #22c55e;
}

.delivery-option-item .stock-status.text-red-600::before {
    background-color: #ef4444;
}

/* Enhance delivery method title */
.delivery-option-item .text-gray-700.block {
    font-weight: 500;
}

/* Badge for free delivery */
.text-green-600.font-semibold {
    display: inline-flex;
    align-items: center;
    background-color: rgba(34, 197, 94, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
}

/* Quantity Input Styling */
.quantity {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 140px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-right: 15px;
}

.quantity .qty {
    width: 100% !important;
    border: none !important;
    background-color: transparent !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    position: relative !important;
}

.quantity-button {
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.quantity-button:hover,
.quantity-button:focus {
    background-color: #eee;
    color: #000;
}

.quantity-button svg {
    fill: none;
    stroke: #fff !important;
    stroke-width: 2;
}

/* Fix cart form layout */
.woocommerce div.product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Add to cart button styling enhancement */
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt,
.single_add_to_cart_button.button.alt {
    background-color: #FCD426 !important;
    color: #000000 !important;
    min-width: 220px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover,
.single_add_to_cart_button.button.alt:hover {
    background-color: #eac118 !important;
    color: #000000 !important;
}

/* Add cursor pointer to +/- areas */
.quantity-button {
    cursor: pointer;
}

/* Fix touch target on mobile */
@media (max-width: 767px) {
    .quantity::before,
    .quantity::after,
    .quantity-button {
        width: 44px;
    }
    
    .woocommerce .quantity {
        width: 120px;
    }
}

/* Additional fixes for simple products quantity buttons */
.product-type-simple .quantity .quantity-button {
    pointer-events: auto; /* Ensure clicks register */
}

.product-type-simple .quantity {
    position: relative;
    overflow: visible; /* Ensure buttons are not cut off */
}

/* Ensure adequate contrast for buttons */
.quantity-button svg {
    fill: none;
    stroke: #000 !important;
    stroke-width: 2;
}

/* Fix potential positioning issues */
.product-type-simple .quantity-button.minus {
    left: 0;
}

.product-type-simple .quantity-button.plus {
    right: 0;
}

/* Prevent overlaps with other elements */
.woocommerce div.product form.cart div.quantity {
    float: none;
    margin: 0 21px 0 0;
    border: 1px solid #003334;
}

.quantity-button.plus {
    color: #fff;
}

/* Swap quantity and add to cart button for variable products */
.woocommerce-variation-add-to-cart {
    display: flex !important;
    align-items: center;
}
.woocommerce-variation-add-to-cart .quantity {
    order: 0;
    margin-right: 10px;
}
.woocommerce-variation-add-to-cart .single_add_to_cart_button {
    order: 1;
}

/* Remove pseudo-elements from related products list */
.related.products ul.products::before,
.related.products ul.products::after {
    content: none !important;
    display: none !important;
}

/* Remove pseudo-elements from upsells products list only */
.up-sells.upsells.products ul.products::before,
.up-sells.upsells.products ul.products::after {
    content: none !important;
    display: none !important;
}

/* Stack variation selects vertically */
.woocommerce div.product table.variations tbody {
    display: block !important;
}
.woocommerce div.product table.variations tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 1rem;
}
.woocommerce div.product table.variations td.label,
.woocommerce div.product table.variations td.value {
    display: block !important;
    width: 100% !important;
}

/* Enhanced custom dropdown UI for variation selects */
.woocommerce div.product .variations td.value select {
    height: 3rem !important;
    padding: 0 1rem !important;
    padding-right: 2.5rem !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06) !important;
    background-color: #FFFFFF !important;
    border-radius: 0.75rem !important;
    font-size: 1rem !important;
    color: #1F2937 !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%237C3AED' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
}
.woocommerce div.product .variations td.value {
    position: relative;
}
.woocommerce div.product .variations td.value select:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.4) !important;
}

/* Contact info block alignment and style */
.woocommerce div.product .delivery-options .delivery-option-item:last-child {
    box-shadow: none !important;
    background: #ffffff !important;
    display: block !important;
    text-align: left !important;
}

.woocommerce div.product .delivery-options .delivery-option-item:last-child p {
    margin: 0 auto;
    display: inline-block;
}

/* Slider pagination dots color scheme */
.swiper-pagination-bullet,
.splide__pagination__page,
.glide__bullet,
.owl-dot span,
.flickity-page-dots .dot {
    background-color: #003334 !important; /* inactive dot */
    opacity: 1 !important;
}
.swiper-pagination-bullet-active,
.splide__pagination__page.is-active,
.glide__bullet--active,
.owl-dot.active span,
.flickity-page-dots .dot.is-selected {
    background-color: #FCD426 !important; /* active dot yellow */
}

/* Vienos kainos dydis (pvz. variable product) */
.price-container .woocommerce-Price-amount {
    font-size: 20px !important;
}

.price-prefix {
    font-size: 18px !important;
} 