/* Product Details Page - Clean Design */

/* ============================================
   Layout Wrapper
   ============================================ */
.product-details-wrapper {
    padding: 0;
    width: 100%;
    overflow: hidden;
}

.product-details-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.details-page-wrapper {
    padding-top: 10rem !important;
}

.sidebar{
    padding-top: 13rem !important;
}

/* ============================================
   Main Content Area
   ============================================ */
.product-details-main {
    float: left;
    width: var(--theme-var-content, 65%);
    padding: 3rem 0rem 3rem 0;
    box-sizing: border-box;
    background: transparent;
    max-width: 100%;
}

.product-details-article {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.product-details-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(170, 255, 0, 0.4) 50%,
            transparent);
    opacity: 0.6;
    z-index: 1;
}

/* ============================================
   Back Button Section
   ============================================ */
.product-details-back-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

/* External Links Container - Aligned to the right */
.product-external-links-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.product-details-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(170, 255, 0, 0.15);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 8px;
    color: rgba(170, 255, 0, 0.95);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.product-details-back-btn:hover {
    background: rgba(170, 255, 0, 0.2);
    border-color: rgba(170, 255, 0, 0.5);
    box-shadow: 0 4px 16px rgba(170, 255, 0, 0.2);
    transform: translateX(-4px);
}

.back-arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-details-back-btn:hover .back-arrow-icon {
    transform: translateX(-4px);
}

/* External Link Buttons - Original design but same height as back button */
.product-external-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.5;
    font-size: 0.875rem;
    /* Match back button height: padding (0.75rem top + 0.75rem bottom) + line-height */
    min-height: calc(0.75rem * 2 + 0.875rem * 1.5);
}

.product-external-link-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: block;
}

.product-external-link-btn:hover {
    background: rgba(170, 255, 0, 0.15);
    border-color: rgba(170, 255, 0, 0.4);
    color: rgba(170, 255, 0, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(170, 255, 0, 0.2);
}

/* ============================================
   Product Header
   ============================================ */
.product-details-header {
    margin-bottom: 2rem;
}

.product-category {
    margin-bottom: 1rem;
}

.product-category-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(170, 255, 0, 0.15);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 6px;
    color: rgba(170, 255, 0, 0.95);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-category-link:hover {
    background: rgba(170, 255, 0, 0.2);
    border-color: rgba(170, 255, 0, 0.5);
    box-shadow: 0 4px 12px rgba(170, 255, 0, 0.2);
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 1.25rem 0;
}

.product-summary {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.5rem 0;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.product-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-meta-icon {
    width: 16px;
    height: 16px;
    color: rgba(170, 255, 0, 0.8);
    flex-shrink: 0;
}

.product-meta-text {
    font-weight: 500;
}

.product-meta-separator {
    color: rgba(255, 255, 255, 0.3);
    opacity: 0.5;
}


/* ============================================
   Product Featured Image
   ============================================ */
.product-featured-image {
    width: 100%;
    margin: 0 0 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.product-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-overlay {
    display: none;
}

/* ============================================
   Product Description
   ============================================ */
.product-description {
    margin: 0 0 2rem 0;
}

.product-description-content {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.product-description-content p {
    margin: 0 0 1.5rem 0;
}

.product-description-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Product Tags
   ============================================ */
.product-tags {
    margin: 0 0 2rem 0;
}

.product-tags-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 8px;
    color: rgba(170, 255, 0, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.product-tag:hover {
    background: rgba(170, 255, 0, 0.15);
    border-color: rgba(170, 255, 0, 0.5);
    box-shadow: 0 4px 12px rgba(170, 255, 0, 0.2);
}

/* ============================================
   Related Products
   ============================================ */
.related-products {
    margin: 0 0 2rem 0;
}

.related-products-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-product-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(170, 255, 0, 0.15);
    border-color: rgba(170, 255, 0, 0.3);
}

.related-product-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.related-product-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-overlay {
    display: none;
}

.related-product-content {
    padding: 1.25rem;
}

.related-product-category {
    margin-bottom: 0.75rem;
}

.related-product-category a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 6px;
    color: rgba(170, 255, 0, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.related-product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.related-product-title a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-title a:hover {
    color: rgba(170, 255, 0, 0.9);
}

.related-product-summary {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
}

.related-product-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.meta-separator {
    opacity: 0.5;
}

/* ============================================
   Navigation
   ============================================ */
.product-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 2rem 0 0 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.product-navigation .product-external-links-container {
    margin-left: auto;
}

/* ============================================
   Sidebar
   ============================================ */
.product-details-sidebar {
    float: right;
    width: var(--theme-var-sidebar, 30%);
    padding: 3rem 0 3rem 2rem;
    box-sizing: border-box;
    max-width: 100%;
}

.product-details-sidebar .sidebar_inner {
    position: sticky;
    top: calc(2rem + var(--header-height, 100px));
    z-index: 100; /* Lower than header's z-index: 1000 */
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent child elements from causing overflow */
.product-details-sidebar .sidebar_inner > *,
.product-details-sidebar .elementor,
.product-details-sidebar .e-con {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

/* Clearfix */
.product-details-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .product-details-main {
        float: none;
        width: 100%;
        padding: 2rem 1rem;
    }

    .product-details-sidebar {
        float: none;
        width: 100%;
        padding: 2rem 1rem;
    }

    .product-details-sidebar .sidebar_inner {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-details-main {
        padding: 1.5rem 1rem;
    }

    .product-details-sidebar {
        padding: 1.5rem 1rem;
    }

    .product-details-article {
        padding: 1.5rem;
    }

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

    .product-summary {
        font-size: 1rem;
    }

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

@media (max-width: 480px) {
    .product-details-main {
        padding: 1.25rem 0.75rem;
    }

    .product-details-sidebar {
        padding: 1.25rem 0.75rem;
    }

    .product-details-article {
        padding: 1.25rem;
    }

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

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .product-meta-separator {
        display: none;
    }
}
