/**
 * Single Product Page Styles
 * Beautiful product detail page design
 *
 * @package Merchandise V2
 */

/* Page Background */
.site-main {
    background-color: var(--wp--preset--color--background-light);
    min-height: 100vh;
    padding: 2rem 0;
}

.container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Isolation to prevent WooCommerce style conflicts */
.single-product-wrapper {
    isolation: isolate;
}

/* ============================================
   Product Page Layout
   ============================================ */
.single-product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 3rem 0;
}

/* ============================================
   Product Gallery
   ============================================ */
.product-gallery-section {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.product-main-image {
    background: var(--wp--preset--color--neutral-000, #FFFFFF);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
}

.product-main-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    display: block !important;
    max-width: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Protection from WooCommerce styles */
.woocommerce .product-main-image img,
.woocommerce-page .product-main-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    display: block !important;
    max-width: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.product-thumbnail {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.product-category-badge {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: var(--wp--preset--color--primary-500);
    border-radius: 0;
    font-weight: 500;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    font-family: var(--wp--preset--font-family--sen);
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: clamp(24px, calc((28 / 1440) * 100vw), 28px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--wp--preset--color--dark-900);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--wp--preset--font-family--sen);
    text-transform: uppercase;
}

.wishlist-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--wp--preset--color--dark-900);
    transition: color 0.3s ease;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.wishlist-toggle:hover {
    color: var(--wp--preset--color--primary-500);
}

.wishlist-toggle svg {
    width: 20px;
    height: 20px;
}

.heart-icon {
    display: inline-block;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--wp--preset--font-family--sen);
}

.stars {
    color: var(--wp--preset--color--warning-orange);
    font-size: 18px;
}

.rating-count {
    color: var(--wp--preset--color--dark-900);
    font-size: 14px;
    opacity: 0.7;
}

.product-price-section {
    margin: 1.5rem 0 1rem 0;
}

.product-price-large {
    font-size: clamp(20px, calc((24 / 1440) * 100vw), 24px);
    font-weight: 700;
    color: var(--wp--preset--color--primary-500);
    font-family: var(--wp--preset--font-family--sen);
}

.product-price-large del {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-right: 1rem;
    opacity: 0.6;
}

.product-price-large ins {
    text-decoration: none;
    color: var(--wp--preset--color--sale-price);
}

/* ============================================
   Product Short Description
   ============================================ */
.product-short-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--wp--preset--color--dark-900);
    padding: 0;
    background: transparent;
    border: none;
    font-family: var(--wp--preset--font-family--sen);
}

/* ============================================
   Product Meta Info
   ============================================ */
.product-meta-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.meta-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.meta-content {
    flex: 1;
}

.meta-content strong {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.meta-content p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.meta-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.meta-content a:hover {
    text-decoration: underline;
}

/* ============================================
   Add to Cart Form
   ============================================ */
.product-add-to-cart {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 2rem;
}

.variations {
    margin-bottom: 1.5rem;
}

.variations tr {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.variations label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.variations select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.variations select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.quantity {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.quantity input {
    width: 80px;
    height: 50px;
    text-align: center;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--white);
}

.quantity button {
    width: 50px;
    height: 50px;
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity button:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.single_add_to_cart_button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--wp--preset--color--dark-900);
    color: var(--wp--preset--color--neutral-000, #FFFFFF);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--wp--preset--font-family--sen);
}

.single_add_to_cart_button:hover {
    background: var(--wp--preset--color--darken);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.single_add_to_cart_button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ============================================
   Trust Badges
   ============================================ */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.trust-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-item strong {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.trust-item p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.payment-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.payment-icons img {
    height: 20px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-icons img:hover {
    opacity: 1;
}

/* ============================================
   Bundle Content Section
   ============================================ */
.bundle-content-section {
    margin-top: 2rem;
}

.bundle-content-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wp--preset--color--dark-900);
    margin: 0 0 1.5rem 0;
    font-family: var(--wp--preset--font-family--sen);
}

.bundle-content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bundle-content-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--wp--preset--color--blue-lighter);
    border-radius: 12px;
    position: relative;
    min-height: 80px;
}

.bundle-item-wishlist {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--wp--preset--color--dark-900);
    transition: color 0.3s ease;
}

.bundle-item-wishlist:hover {
    color: var(--wp--preset--color--primary-500);
}

.bundle-item-wishlist svg {
    width: 20px;
    height: 20px;
}

.bundle-item-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    max-width: 120px;
    height: 60px;
    flex-shrink: 0;
}

.bundle-item-brand-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bundle-item-brand-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
    text-align: center;
}

.bundle-item-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
    padding: 0 1rem;
}

.bundle-item-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
    min-width: 100px;
    text-align: right;
    white-space: nowrap;
}

.bundle-item-add-to-cart {
    padding: 8px 16px;
    background: var(--wp--preset--color--primary-500);
    color: var(--wp--preset--color--dark-900);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--wp--preset--font-family--sen);
    text-transform: capitalize;
    flex-shrink: 0;
    white-space: nowrap;
}

.bundle-item-add-to-cart:hover {
    background: var(--wp--preset--color--primary-500);
    opacity: 0.9;
    transform: translateY(-2px);
}

.bundle-item-add-to-cart svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.bundle-item-add-to-cart.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Product Tabs
   ============================================ */
.product-gallery-section .product-tabs {
    margin-top: 0;
}

.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(27, 27, 52, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.tab-link {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--wp--preset--color--dark-900);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-family: var(--wp--preset--font-family--sen);
    opacity: 0.6;
}

.tab-link:hover {
    opacity: 1;
}

.tab-link.active {
    opacity: 1;
    color: var(--wp--preset--color--primary-500);
    border-bottom-color: var(--wp--preset--color--primary-500);
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.tab-panel.active {
    display: block;
}

.product-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
}

.product-about-info {
    font-size: 14px;
    line-height: 1.8;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
}

.gift-cards-info {
    font-size: 14px;
    line-height: 1.8;
    color: var(--wp--preset--color--dark-900);
    font-family: var(--wp--preset--font-family--sen);
}

/* ============================================
   Product Vendors Section
   ============================================ */
.product-vendors-section {
    margin-top: 4rem;
}

.product-vendors-section h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-align: center;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 120px;
    border: 1px solid var(--border-color);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.brand-card img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-name {
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .single-product-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery-section {
        position: static;
    }

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

@media (max-width: 768px) {
    .product-title {
        font-size: 1.75rem;
    }

    .product-price-large {
        font-size: 2rem;
    }

    .tabs-nav {
        flex-direction: column;
        gap: 0;
    }

    .tab-link {
        border-bottom: 1px solid var(--border-color);
        text-align: left;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
}

