/* 
 * Aha Theme - Single Product Styles
 * Styles specific to WooCommerce single product pages
 * Loaded only on product pages for optimization
 */

/* ==========================================================================
   WooCommerce Single Product Styles (Codester-inspired)
   ========================================================================== */

/* Product Single Layout */
.woocommerce .woocommerce-breadcrumb {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: left;
}
.aha-product-single-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.aha-product-main-content {
    width: 100%;
}

/* Product Layout - 66% Gallery / 33% Sidebar using Flexbox */
.aha-product-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .aha-product-layout {
        flex-direction: row;
    }
}

/* Product Gallery */
.aha-product-gallery {
    width: 100%;
}

@media (min-width: 1024px) {
    .aha-product-gallery {
        flex: 0 0 66.66666667%;
        max-width: 66.66666667%;
    }
}

.aha-product-gallery-wrapper {
    position: sticky;
    top: 100px;
}

.aha-product-gallery-main {
    border-radius: 0.5rem;
    overflow: hidden;
}

.aha-product-gallery-main .swiper-slide {
    background: #f9fafb;
    border-radius: 0.5rem;
}

.aha-product-gallery-main .swiper-button-next,
.aha-product-gallery-main .swiper-button-prev {
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aha-product-gallery-main .swiper-button-next:after,
.aha-product-gallery-main .swiper-button-prev:after {
    font-size: 16px;
}

.aha-product-gallery-thumbs .swiper-slide {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.aha-product-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.aha-product-gallery-thumbs .swiper-slide img {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.aha-product-gallery-thumbs .swiper-slide-thumb-active img {
    border-color: #2563eb;
}

.aha-gallery-image-link {
    display: block;
    cursor: zoom-in;
}

.aha-product-gallery-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* Product Sidebar */
.aha-product-sidebar {
    width: 100%;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

@media (min-width: 1024px) {
    .aha-product-sidebar {
        flex: 0 0 33.33333333%;
        max-width: 33.33333333%;
    }
}

/* Single price and add-to-cart block – avoid duplicates */
.aha-product-summary-custom .aha-product-summary-price .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary, #2563eb);
    line-height: 1.3;
}

.aha-product-summary-custom .aha-product-summary-price .price del {
    font-size: 2rem;
    color: var(--color-gray-400, #94a3b8);
    margin-right: 0.5rem;
}

.aha-product-summary-custom .aha-product-summary-price .price ins {
    text-decoration: none;
    color: var(--color-primary, #2563eb);
}

.aha-product-summary-custom .woocommerce-product-rating {
    margin-bottom: 0;
}

.aha-product-summary-custom .woocommerce-product-rating .star-rating {
    margin-bottom: 0.25rem;
}

.aha-product-summary-custom .woocommerce-product-rating .woocommerce-review-link {
    color: var(--color-gray-500, #64748b);
    font-size: 0.875rem;
}

/* Add to cart: one block only, site primary color */
.aha-product-summary-custom .aha-product-summary-add-to-cart .cart {
    margin: 0;
}

.aha-product-summary-custom .single_add_to_cart_button {
    width: 100% !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: var(--color-primary, #2563eb);
    background-color: var(--color-primary, #2563eb) !important;
    color: var(--color-white, #fff);
    border: none !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.aha-product-summary-custom .single_add_to_cart_button:hover {
    background: var(--color-primary-hover, #1e40af) !important;
    background-color: var(--color-primary-hover, #1e40af) !important;
    color: var(--color-white, #fff) !important;
}

/* Benefits: larger, clearer text */
.aha-purchase-benefits {
    margin-top: 0;
}

.aha-purchase-benefits-title {
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.aha-purchase-benefits-list {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--color-gray-600, #475569);
}

.aha-purchase-benefits-list li span {
    font-size: inherit;
}

/* Product Info Sidebar */
.aha-product-info-sidebar {
    margin-top: 2rem;
}

.aha-info-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Live Demo button – secondary style (slate outline) to differentiate from Add to cart */
.aha-demo-button {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #E0F7FA;
    color: var(--color-slate-700, #334155);
    border: 2px solid var(--color-slate-300, #cbd5e1);
}

.aha-demo-button:hover {
    background: #a2f4ff;
    color: var(--color-slate-800, #1e293b);
    border-color: var(--color-slate-400, #94a3b8);
}

/* Free version button – green, with spaced icons */
.aha-free-version-button {
    text-decoration: none;
    background: var(--color-success, #10b981);
    color: var(--color-white, #fff);
    border: none;
    gap: 0.75rem;
}

.aha-free-version-button:hover {
    background: #0d9668;
    color: var(--color-white, #fff);
}

.aha-free-version-button-icon {
    flex-shrink: 0;
}

.aha-free-version-button-icon--left {
    margin-right: 0.25rem;
}

.aha-free-version-button-icon--right {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.9;
}

.aha-free-version-button-note {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Product Tabs */
.woocommerce-tabs {
    margin-top: 3rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.woocommerce-tabs .panel {
    padding: 2rem 0;
}

/* Typography inside tab content (Overview, Changelog, Features, Installation) */
.aha-tab-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-gray-700, #374151);
}

.aha-tab-content p {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.aha-tab-content p:last-child {
    margin-bottom: 0;
}

.aha-tab-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-slate-800, #1e293b);
    margin: 2rem 0 0.75rem;
}

.aha-tab-content h2:first-child {
    margin-top: 0;
}

.aha-tab-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-slate-800, #1e293b);
    margin: 1.5rem 0 0.5rem;
}

.aha-tab-content h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-slate-700, #334155);
    margin: 1.25rem 0 0.5rem;
}

.aha-tab-content ul,
.aha-tab-content ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    font-size: 1rem;
}

.aha-tab-content ul {
    list-style: disc;
}

.aha-tab-content ol {
    list-style: decimal;
}

.aha-tab-content li {
    margin-bottom: 0.375rem;
}

.aha-tab-content li:last-child {
    margin-bottom: 0;
}

.aha-tab-content strong {
    font-weight: 600;
    color: var(--color-slate-800, #1e293b);
}

.aha-tab-content a {
    color: var(--color-primary, #2563eb);
    text-decoration: none;
}

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

/* Features list (custom bullet + icon) */
.aha-tab-content .aha-features-list {
    list-style: none;
    padding-left: 0;
}

.aha-features-list li {
    gap: 8px;
}

.aha-features-list li span {
    margin-left: 4px;
}

/* Related Products */
.woocommerce .related.products {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.woocommerce .related.products h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1f2937;
}

.aha-product-tabs-wrapper {
    padding: 20px 20px 40px 20px;
}

/* Responsive */
@media (max-width: 1023px) {
    .aha-product-gallery-wrapper,
    .aha-product-sidebar {
        position: static;
    }
    
    /* Ensure proper stacking on mobile */
    .aha-product-gallery {
        order: 1;
    }
    
    .aha-product-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .woocommerce-tabs ul.tabs li a {
        border-bottom: 1px solid #e5e7eb;
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }
    
    .woocommerce-tabs ul.tabs li.active a {
        border-left-color: #2563eb;
        border-bottom-color: #e5e7eb;
    }
    
    .aha-product-gallery-thumbs .swiper-slide {
        width: 60px !important;
    }
}

