/**
 * Webup Woo - Single Product Styles
 */

/* Single product container */
.webup-woo-single {
    padding: 40px 0;
    background-color: var(--webup-woo-bg, #ffffff);
}

/* Product layout */
.webup-woo-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Gallery */
.webup-woo-gallery {
    position: sticky;
    top: 100px;
}

.webup-woo-gallery-main {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.webup-woo-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.webup-woo-gallery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.webup-woo-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--webup-woo-bg, #ffffff);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 2;
}

.webup-woo-gallery-nav:hover {
    background-color: var(--webup-woo-primary, #333333);
    color: #ffffff;
}

.webup-woo-gallery-nav.prev {
    left: 15px;
}

.webup-woo-gallery-nav.next {
    right: 15px;
}

/* Gallery thumbnails */
.webup-woo-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.webup-woo-gallery-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.webup-woo-gallery-thumb:hover,
.webup-woo-gallery-thumb.active {
    border-color: var(--webup-woo-primary, #333333);
}

.webup-woo-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product summary */
.webup-woo-summary {
    padding: 10px 0;
}

.webup-woo-breadcrumb {
    font-size: 13px;
    color: var(--webup-woo-light-text, #666666);
    margin-bottom: 15px;
}

.webup-woo-breadcrumb a {
    color: var(--webup-woo-light-text, #666666);
    text-decoration: none;
    transition: color 0.2s ease;
}

.webup-woo-breadcrumb a:hover {
    color: var(--webup-woo-primary, #333333);
}

.webup-woo-breadcrumb .separator {
    margin: 0 8px;
}

.webup-woo-product-title {
    font-size: var(--webup-woo-heading-size, 32px);
    font-weight: 700;
    color: var(--webup-woo-text, #333333);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* Rating */
.webup-woo-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.webup-woo-stars {
    display: flex;
    gap: 2px;
}

.webup-woo-star {
    width: 18px;
    height: 18px;
    color: #ddd;
}

.webup-woo-star.filled {
    color: #ffc107;
}

.webup-woo-star.half {
    background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.webup-woo-review-count {
    font-size: 14px;
    color: var(--webup-woo-light-text, #666666);
}

.webup-woo-review-count a {
    color: var(--webup-woo-primary, #333333);
    text-decoration: none;
}

/* Price */
.webup-woo-product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 25px;
}

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

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

.webup-woo-save-badge {
    padding: 4px 10px;
    background-color: var(--webup-woo-sale, #e74c3c);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

/* Short description */
.webup-woo-short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--webup-woo-text, #333333);
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--webup-woo-border, #e0e0e0);
}

.webup-woo-short-description p:last-child {
    margin-bottom: 0;
}

/* Variations / Swatches */
.webup-woo-variations {
    margin-bottom: 25px;
}

.webup-woo-variation-row {
    margin-bottom: 20px;
}

.webup-woo-variation-row:last-child {
    margin-bottom: 0;
}

.webup-woo-variation-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--webup-woo-text, #333333);
    margin-bottom: 10px;
}

.webup-woo-variation-label span {
    font-weight: 400;
    color: var(--webup-woo-light-text, #666666);
}

/* Quantity */
.webup-woo-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.webup-woo-quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--webup-woo-border, #e0e0e0);
    border-radius: 6px;
    overflow: hidden;
}

.webup-woo-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--webup-woo-bg-alt, #f9f9f9);
    border: none;
    font-size: 20px;
    color: var(--webup-woo-text, #333333);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.webup-woo-qty-btn:hover {
    background-color: var(--webup-woo-border, #e0e0e0);
}

.webup-woo-qty-input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--webup-woo-border, #e0e0e0);
    border-right: 1px solid var(--webup-woo-border, #e0e0e0);
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--webup-woo-text, #333333);
}

.webup-woo-qty-input:focus {
    outline: none;
}

/* Stock status */
.webup-woo-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.webup-woo-stock.in-stock {
    color: var(--webup-woo-success, #27ae60);
}

.webup-woo-stock.out-of-stock {
    color: var(--webup-woo-sale, #e74c3c);
}

.webup-woo-stock.low-stock {
    color: #f39c12;
}

.webup-woo-stock svg {
    width: 18px;
    height: 18px;
}

/* Add to cart section */
.webup-woo-add-to-cart-section {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.webup-woo-add-to-cart-section .webup-woo-add-to-cart {
    flex: 1;
    padding: 16px 30px;
    font-size: 16px;
}

.webup-woo-add-to-cart-section .webup-woo-wishlist-btn {
    width: 54px !important;
    height: 54px !important;
    border: 1px solid var(--webup-woo-border, #e0e0e0) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
    color: var(--webup-woo-text, #333333) !important;
}

.webup-woo-add-to-cart-section .webup-woo-wishlist-btn svg {
    width: 24px !important;
    height: 24px !important;
    stroke: currentColor !important;
}

.webup-woo-add-to-cart-section .webup-woo-wishlist-btn:hover {
    border-color: var(--webup-woo-text, #333333) !important;
    background-color: #ffffff !important;
    color: var(--webup-woo-text, #333333) !important;
}

.webup-woo-add-to-cart-section .webup-woo-wishlist-btn.active {
    border-color: var(--webup-woo-sale, #e74c3c) !important;
    color: var(--webup-woo-sale, #e74c3c) !important;
    background-color: #ffffff !important;
}

/* Buy now */
.webup-woo-buy-now {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    background-color: var(--webup-woo-text, #333333);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-bottom: 25px;
}

.webup-woo-buy-now:hover {
    opacity: 0.9;
}

/* Meta info */
.webup-woo-meta {
    padding: 20px 0;
    border-top: 1px solid var(--webup-woo-border, #e0e0e0);
    border-bottom: 1px solid var(--webup-woo-border, #e0e0e0);
    margin-bottom: 25px;
}

.webup-woo-meta-row {
    display: flex;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 8px;
}

.webup-woo-meta-row:last-child {
    margin-bottom: 0;
}

.webup-woo-meta-label {
    font-weight: 600;
    color: var(--webup-woo-text, #333333);
}

.webup-woo-meta-value {
    color: var(--webup-woo-light-text, #666666);
}

.webup-woo-meta-value a {
    color: var(--webup-woo-primary, #333333);
    text-decoration: none;
}

/* Share */
.webup-woo-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.webup-woo-share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--webup-woo-text, #333333);
}

.webup-woo-share-links {
    display: flex;
    gap: 10px;
}

.webup-woo-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--webup-woo-bg-alt, #f9f9f9);
    border-radius: 50%;
    color: var(--webup-woo-light-text, #666666);
    transition: all 0.2s ease;
}

.webup-woo-share-link:hover {
    background-color: var(--webup-woo-primary, #333333);
    color: #ffffff;
}

/* Tabs */
.webup-woo-tabs {
    margin-top: 60px;
}

.webup-woo-tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--webup-woo-border, #e0e0e0);
    margin-bottom: 30px;
}

.webup-woo-tab-btn {
    padding: 15px 25px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--webup-woo-light-text, #666666) !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.webup-woo-tab-btn:hover {
    color: var(--webup-woo-text, #333333) !important;
    background: none !important;
    background-color: transparent !important;
    transform: none !important;
    opacity: 1 !important;
}

.webup-woo-tab-btn.active {
    color: var(--webup-woo-primary, #333333) !important;
}

.webup-woo-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--webup-woo-primary, #333333);
}

.webup-woo-tab-content {
    display: none;
}

.webup-woo-tab-content.active {
    display: block;
}

/* Description tab */
.webup-woo-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--webup-woo-text, #333333);
}

.webup-woo-description h2,
.webup-woo-description h3,
.webup-woo-description h4 {
    margin-top: 25px;
    margin-bottom: 15px;
}

.webup-woo-description p {
    margin-bottom: 15px;
}

.webup-woo-description ul,
.webup-woo-description ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

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

/* Additional info tab */
.webup-woo-additional-info table {
    width: 100%;
    border-collapse: collapse;
}

.webup-woo-additional-info th,
.webup-woo-additional-info td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--webup-woo-border, #e0e0e0);
    font-size: 14px;
}

.webup-woo-additional-info th {
    width: 30%;
    font-weight: 600;
    color: var(--webup-woo-text, #333333);
    background-color: var(--webup-woo-bg-alt, #f9f9f9);
}

.webup-woo-additional-info td {
    color: var(--webup-woo-light-text, #666666);
}

/* Reviews tab */
.webup-woo-reviews-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px;
    background-color: var(--webup-woo-bg-alt, #f9f9f9);
    border-radius: 8px;
    margin-bottom: 30px;
}

.webup-woo-reviews-average {
    text-align: center;
}

.webup-woo-reviews-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--webup-woo-text, #333333);
    line-height: 1;
}

.webup-woo-reviews-total {
    font-size: 14px;
    color: var(--webup-woo-light-text, #666666);
    margin-top: 5px;
}

.webup-woo-reviews-bars {
    flex: 1;
}

.webup-woo-review-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.webup-woo-review-bar:last-child {
    margin-bottom: 0;
}

.webup-woo-review-bar-label {
    width: 50px;
    font-size: 13px;
    color: var(--webup-woo-light-text, #666666);
}

.webup-woo-review-bar-track {
    flex: 1;
    height: 8px;
    background-color: var(--webup-woo-border, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

.webup-woo-review-bar-fill {
    height: 100%;
    background-color: #ffc107;
    border-radius: 4px;
}

.webup-woo-review-bar-count {
    width: 30px;
    font-size: 13px;
    color: var(--webup-woo-light-text, #666666);
    text-align: right;
}

/* Review list */
.webup-woo-review-list {
    margin-bottom: 30px;
}

.webup-woo-review-item {
    padding: 25px 0;
    border-bottom: 1px solid var(--webup-woo-border, #e0e0e0);
}

.webup-woo-review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.webup-woo-review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.webup-woo-review-meta {
    flex: 1;
}

.webup-woo-review-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--webup-woo-text, #333333);
    margin-bottom: 4px;
}

.webup-woo-review-date {
    font-size: 13px;
    color: var(--webup-woo-light-text, #666666);
}

.webup-woo-review-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--webup-woo-text, #333333);
}

/* Review form */
.webup-woo-review-form h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.webup-woo-review-form .form-row {
    margin-bottom: 20px;
}

.webup-woo-review-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--webup-woo-text, #333333);
    margin-bottom: 8px;
}

.webup-woo-review-form input[type="text"],
.webup-woo-review-form input[type="email"],
.webup-woo-review-form textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid var(--webup-woo-border, #e0e0e0);
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.webup-woo-review-form input:focus,
.webup-woo-review-form textarea:focus {
    outline: none;
    border-color: var(--webup-woo-primary, #333333);
}

.webup-woo-review-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Related products */
.webup-woo-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--webup-woo-border, #e0e0e0);
}

.webup-woo-related-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--webup-woo-text, #333333);
    margin-bottom: 30px;
}

.webup-woo-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Lightbox */
.webup-woo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webup-woo-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.webup-woo-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.webup-woo-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 30px;
}

.webup-woo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.webup-woo-lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.webup-woo-lightbox-nav.prev {
    left: -80px;
}

.webup-woo-lightbox-nav.next {
    right: -80px;
}

.webup-woo-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .webup-woo-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .webup-woo-product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .webup-woo-gallery {
        position: static;
    }

    .webup-woo-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .webup-woo-single {
        padding: 20px 0;
    }

    .webup-woo-product-title {
        font-size: 24px;
    }

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

    .webup-woo-tabs-nav {
        flex-wrap: wrap;
    }

    .webup-woo-tab-btn {
        padding: 12px 15px;
        font-size: 14px;
    }

    .webup-woo-reviews-summary {
        flex-direction: column;
        text-align: center;
    }

    .webup-woo-lightbox-nav.prev {
        left: 10px;
    }

    .webup-woo-lightbox-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .webup-woo-gallery-thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .webup-woo-add-to-cart-section {
        flex-direction: column;
    }

    .webup-woo-add-to-cart-section .webup-woo-wishlist-btn {
        width: 100%;
    }

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