/* ========================================
   MODERN PRODUCT DETAILS - GRID LAYOUT
   ======================================== */

/* Container */
.shop-single-section {
    background: #fff;
    padding: 60px 0 120px;
}

.shop-single-section .container {
    max-width: 1320px;
}

/* Override WooCommerce default product layout */
.woocommerce div.product,
.woocommerce #content div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 80px !important;
    margin-bottom: 100px !important;
}

.woocommerce div.product div.images,
.woocommerce #content div.product div.images {
    width: 100% !important;
    float: none !important;
    grid-column: 1 !important;
}

.woocommerce div.product div.summary,
.woocommerce #content div.product div.summary {
    width: 100% !important;
    float: none !important;
    grid-column: 2 !important;
}

/* ========================================
   MAIN PRODUCT GRID - 2 COLUMNS
   ======================================== */
.modern-product-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 80px !important;
    margin-bottom: 100px !important;
}

.product-images-section {
    grid-column: 1 !important;
}

.product-info-section {
    grid-column: 2 !important;
}

/* ========================================
   LEFT: PRODUCT IMAGES
   ======================================== */
.product-images-section {
    position: sticky;
    top: 120px;
    height: fit-content;
    grid-column: 1;
}

.product-single-wrap {
    background: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.product-single-wrap .woocommerce-product-gallery {
    background: #f8f8f8;
}

.product-single-wrap .woocommerce-product-gallery__wrapper {
    margin: 0;
    padding: 60px;
}

.product-single-wrap .woocommerce-product-gallery__wrapper img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* Sale Badge */
.onsale {
    position: absolute !important;
    top: 20px;
    left: 20px;
    background: #000 !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* ========================================
   RIGHT: PRODUCT INFO
   ======================================== */
.product-info-section {
    padding-top: 20px;
    grid-column: 2;
}

/* Hide old structure */
.modern-product-grid .row,
.modern-product-grid .col-md-6,
.modern-product-grid .product-details {
    display: none !important;
}

/* Rating */
.product-meta-top {
    margin-bottom: 16px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-rating {
    font-size: 14px;
}

.woocommerce-review-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.woocommerce-review-link:hover {
    color: #000;
}

/* Title */
.product_title {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #000 !important;
    line-height: 1.2 !important;
    margin: 0 0 20px 0 !important;
    letter-spacing: -0.5px !important;
}

/* Price */
.product-info-section .price {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 0 24px 0 !important;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.product-info-section .price del {
    font-size: 20px;
    color: #999;
    font-weight: 500;
}

.product-info-section .price ins {
    text-decoration: none;
}

/* Description */
.woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 32px;
}

/* Features */
.product-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
    padding: 24px 0;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    font-size: 16px;
    color: #000;
}

.feature-item span {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

/* ========================================
   ADD TO CART SECTION
   ======================================== */
.product-actions {
    margin-bottom: 32px;
}

.cart {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

/* Quantity Input with +/- Buttons */
.quantity {
    flex-shrink: 0;
    position: relative;
    display: flex !important;
    align-items: center;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    overflow: visible;
    background: #fff;
    height: 54px;
    width: auto !important;
}

.quantity input.qty {
    width: 60px !important;
    height: 52px !important;
    border: none !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #000 !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    order: 2;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

.quantity input.qty:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.quantity .qty-btn {
    width: 36px !important;
    height: 52px !important;
    border: none !important;
    background: transparent !important;
    color: #000 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.quantity .qty-btn:hover {
    background: #f5f5f5 !important;
}

.quantity .minus {
    border-right: 1px solid #d4d4d4 !important;
    order: 1;
}

.quantity .plus {
    border-left: 1px solid #d4d4d4 !important;
    order: 3;
}

/* Add to Cart Button */
.single_add_to_cart_button {
    flex: 1;
    height: 54px !important;
    background: #ff6b35 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer;
    transition: all 0.2s;
}

.single_add_to_cart_button:hover {
    background: #e55a2b !important;
}

/* Wishlist */
.yith-wcwl-add-to-wishlist {
    display: inline-block;
}

.yith-wcwl-add-to-wishlist a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    color: #000;
    font-size: 16px;
    transition: all 0.2s;
}

.yith-wcwl-add-to-wishlist a:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

.yith-wcwl-add-to-wishlist a i {
    margin: 0 !important;
}

/* ========================================
   PRODUCT META
   ======================================== */
.product-meta-bottom {
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.product_meta {
    padding: 0;
    background: transparent;
}

.product_meta > span {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.product_meta > span:last-child {
    margin-bottom: 0;
}

.product_meta a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.product_meta a:hover {
    text-decoration: underline;
}

/* ========================================
   PRODUCT TABS
   ======================================== */
.product-tabs-section {
    margin-bottom: 100px;
}

.woocommerce-tabs {
    background: transparent;
    padding: 0;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 40px;
}

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

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 16px 24px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: #666 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s;
}

.woocommerce-tabs ul.tabs li:hover a {
    color: #000 !important;
    border-bottom-color: #000 !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #000 !important;
    border-bottom-color: #000 !important;
}

/* Tab Content */
.woocommerce-Tabs-panel {
    padding: 0;
    background: transparent;
}

.woocommerce-Tabs-panel h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
}

.woocommerce-Tabs-panel p {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

/* ========================================
   RELATED PRODUCTS
   ======================================== */
.related-products-section {
    padding-top: 60px;
    border-top: 1px solid #e8e8e8;
}

.related.products {
    margin: 0;
    padding: 0;
    background: transparent;
}

.realted-porduct h3 {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 40px;
}

.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    grid-auto-rows: 1fr !important;
}

.related.products ul.products::before,
.related.products ul.products::after {
    display: none !important;
}

.related.products ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    transition: all 0.2s;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
}

.related.products ul.products li.product::before,
.related.products ul.products li.product::after {
    display: none !important;
}

.related.products ul.products li.first {
    clear: none !important;
}

.related.products ul.products li.product:hover {
    border-color: #000 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.related.products ul.products li.product img {
    width: 100%;
    border-radius: 0;
}

.related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 12px 12px 8px;
}

.related.products ul.products li.product .price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0 12px 12px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .modern-product-grid {
        gap: 60px;
    }
    
    .related.products ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .modern-product-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-images-section {
        position: relative;
        top: 0;
    }
    
    .product_title {
        font-size: 28px !important;
    }
    
    .product-info-section .price {
        font-size: 26px !important;
    }
    
    .product-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cart {
        flex-direction: column;
    }
    
    .quantity input.qty {
        width: 100%;
    }
    
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product_title {
        font-size: 24px !important;
    }
    
    .product-info-section .price {
        font-size: 22px !important;
    }
    
    .related.products ul.products {
        grid-template-columns: 1fr;
    }
}
