/* Custom Single Product Layout - Tabs and Specs 60-40 */

/* Rating and Favorite Button - Same Row */
/* Position favorite button to the right, rating to the left */
.single-product .entry-summary-items > .woocommerce-product-rating,
.single-product .entry-summary-items > .ct-product-additional-actions {
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

/* Position favorite button to the right */
.single-product .entry-summary-items > .ct-product-additional-actions {
    float: right !important;
}

/* Ensure rating stays on the left */
.single-product .entry-summary-items > .woocommerce-product-rating {
    float: left !important;
}

/* Clear float after the row */
.single-product .entry-summary-items::after {
    content: '';
    display: table;
    clear: both;
}

/* Alternative: If they're direct children of entry-summary */
.single-product .entry-summary > .woocommerce-product-rating,
.single-product .summary > .woocommerce-product-rating {
    margin-bottom: 0 !important;
    vertical-align: middle !important;
    float: left !important;
}

.single-product .entry-summary > .ct-product-additional-actions,
.single-product .summary > .ct-product-additional-actions {
    margin-bottom: 0 !important;
    float: right !important;
    clear: none !important;
}

/* Clear float for entry-summary */
.single-product .entry-summary::after,
.single-product .summary::after {
    content: '';
    display: table;
    clear: both;
}

/* Container wrapper */
.blocksy-product-bottom-section {
    display: grid !important;
    grid-template-columns: 67% 30% !important;
    gap: 40px !important;
    width: 100% !important;
    margin-top: 40px !important;
    align-items: start !important;
}

/* Tabs styling */
.blocksy-product-tabs-wrapper .woocommerce-tabs {
    border: none !important;
}

.blocksy-product-tabs-wrapper .wc-tabs {
    border-bottom: 2px solid #e5e7eb !important;
    margin-bottom: 20px !important;
}

.blocksy-product-tabs-wrapper .wc-tabs li {
    margin-right: 30px !important;
}



/* Tab content styling */
.blocksy-product-tabs-wrapper .woocommerce-Tabs-panel {
    padding: 0 !important;
    border: none !important;
}

.blocksy-product-tabs-wrapper .woocommerce-Tabs-panel h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.blocksy-product-tabs-wrapper .woocommerce-Tabs-panel p {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 15px;
}

/* Description with expand/collapse */
.blocksy-product-description-content {
    position: relative;
}

.blocksy-product-description-content.collapsed {
    max-height: 300px;
    overflow: hidden;
}

.blocksy-product-description-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

.blocksy-product-description-content.expanded {
    max-height: none;
}

.blocksy-view-more-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background-color: rgb(251 176 66 / 6%);
    color: #FBB042;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blocksy-view-more-btn:hover {
    transform: translateY(-2px);
}

.blocksy-view-more-btn.hidden {
    display: none;
}

/* Ensure container follows Blocksy's width constraints */
.ct-container .blocksy-product-bottom-section {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure container inherits Blocksy's container styles */
.woocommerce .ct-container {
    margin-inline: auto;
    width: var(--theme-container-width, 100%);
    max-width: var(--theme-normal-container-max-width, 1290px);
}

/* Tabs Wrapper - 60% */
.blocksy-product-tabs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Ensure tabs are contained */
.blocksy-product-tabs-wrapper .woocommerce-tabs {
    width: 100% !important;
    max-width: 100% !important;
}

.blocksy-product-tabs-wrapper .wc-tabs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* Override Blocksy width constraints for tabs */
.blocksy-product-tabs-wrapper .is-width-constrained {
    max-width: 100% !important;
    width: 100% !important;
}

.blocksy-product-tabs-wrapper article {
    max-width: 100% !important;
    width: 100% !important;
}

/* Specs Wrapper - 40% */
.blocksy-product-specs-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    position: sticky !important;
    top: 20px !important;
    align-self: start !important;
}

/* Product Specs Styles */
.blocksy-product-specs {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.blocksy-specs-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 10px;
}

.blocksy-specs-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.blocksy-specs-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    border: none !important;
    background-color: transparent !important;
    border-spacing: 0 !important;
}

.blocksy-specs-table tbody {
    display: table-row-group !important;
}

.blocksy-specs-table tbody tr {
    border-bottom: 1px solid #e5e7eb !important;
    display: table-row !important;
}

.blocksy-specs-table tbody tr:last-child {
    border-bottom: none !important;
}

.blocksy-spec-label {
    padding: 12px 16px !important;
    font-weight: 400 !important;
    color: #1a1a1a !important;
    width: 50% !important;
    vertical-align: top !important;
    background-color: #f9fafb !important;
    border: none !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.blocksy-spec-value {
    padding: 12px 16px !important;
    color: #4b5563 !important;
    width: 50% !important;
    vertical-align: top !important;
    border: none !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background-color: transparent !important;
}

/* Override any theme table styles that might interfere */
.blocksy-product-specs table,
.blocksy-product-specs table td,
.blocksy-product-specs table th,
.blocksy-product-specs table tr {
    border: none !important;
    border-collapse: collapse !important;
}

.blocksy-product-specs table {
    border-spacing: 0 !important;
}

.blocksy-product-specs table td,
.blocksy-product-specs table th {
    padding: 12px 16px !important;
}

/* Reset any Blocksy table styles */
.blocksy-product-specs .blocksy-specs-table * {
    box-sizing: border-box !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .blocksy-product-bottom-section {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .blocksy-product-specs-wrapper {
        position: relative !important;
        top: 0 !important;
    }
}

h1.product_title.entry-title {
    display: inline-block;
    margin-top: 25px;
}

