/* ==========================================================================
   Product Details Page (PDP) Custom Styles based on Figma Design
   ========================================================================== */

/* Main Layout */
.custom-pdp-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.custom-pdp-layout .pdp-top-section {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 40px;
}

.custom-pdp-layout .pdp-gallery-column {
    flex: 1 1 45%;
    max-width: 50%;
}

.custom-pdp-layout .pdp-summary-column {
    flex: 1 1 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .custom-pdp-layout .pdp-gallery-column,
    .custom-pdp-layout .pdp-summary-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Override WooCommerce defaults */
.woocommerce .custom-pdp-layout div.images,
.woocommerce-page .custom-pdp-layout div.images,
.woocommerce .custom-pdp-layout div.summary,
.woocommerce-page .custom-pdp-layout div.summary,
.custom-pdp-layout .pdp-gallery-column .woocommerce-product-gallery.images,
.custom-pdp-layout .pdp-summary-column.summary.entry-summary {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
}

.custom-pdp-layout .pdp-summary-column {
    text-align: left !important;
}

/* Product Gallery Styles */
.custom-pdp-layout .woocommerce-product-gallery {
    border: 2px solid #ff7a00;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.custom-pdp-layout .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    gap: 10px !important;
    margin-top: 15px !important;
    justify-content: center !important;
    padding: 0 !important;
}
.custom-pdp-layout .woocommerce-product-gallery .flex-control-thumbs li {
    width: 20% !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    list-style: none !important;
    float: none !important;
}
.custom-pdp-layout .woocommerce-product-gallery .flex-control-thumbs li img {
    border-radius: 8px !important;
}

/* Product Summary Typography */
.custom-pdp-layout .product_title {
    font-size: 32px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: #111 !important;
    margin-bottom: 5px !important;
    text-align: left !important;
    clear: none !important;
}

.custom-pdp-layout .price {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #ff7a00 !important;
    margin-bottom: 15px !important;
    text-align: left !important;
}

.custom-pdp-layout .woocommerce-product-details__short-description {
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 25px !important;
    text-transform: uppercase !important;
    text-align: left !important;
}

/* Add to Cart Form / Variations */
.custom-pdp-layout form.cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

.custom-pdp-layout table.variations {
    width: 100% !important;
    border: none !important;
    margin-bottom: 0 !important;
}
.custom-pdp-layout table.variations td, 
.custom-pdp-layout table.variations th {
    border: none !important;
    padding: 0 0 10px 0 !important;
    vertical-align: middle !important;
    display: block !important;
}
.custom-pdp-layout table.variations label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
}
.custom-pdp-layout table.variations select {
    width: 100% !important;
    border: 2px solid #ff7a00 !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    background: #fff !important;
    outline: none !important;
    height: 48px !important;
}

/* Quantity and Buttons row */
.custom-pdp-layout .woocommerce-variation-add-to-cart,
.custom-pdp-layout form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    flex-direction: row !important;
}

.custom-pdp-layout div.quantity {
    display: flex !important;
    border: 2px solid #ff7a00 !important;
    border-radius: 50px !important;
    overflow: hidden !important;
    height: 48px !important;
    background: #fff !important;
    margin: 0 !important;
    float: none !important;
}

.custom-pdp-layout div.quantity input.qty {
    width: 80px !important;
    text-align: center !important;
    border: none !important;
    font-weight: 600 !important;
    color: #333 !important;
    padding: 0 !important;
    height: 100% !important;
}

.custom-pdp-layout .single_add_to_cart_button {
    background: #fff !important;
    border: 2px solid #ff7a00 !important;
    color: #ff7a00 !important;
    border-radius: 50px !important;
    padding: 0 30px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    flex: 1 !important;
    text-transform: capitalize !important;
    height: 48px !important;
    margin: 0 !important;
}
.custom-pdp-layout .single_add_to_cart_button:hover {
    background: #ff7a00 !important;
    color: #fff !important;
}

/* Quick Pay Buttons */
.pdp-quick-pay-buttons {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
    margin-top: 15px !important;
    flex-wrap: wrap !important;
}
.pdp-quick-pay-buttons button {
    flex: 1 !important;
    border: none !important;
    border-radius: 50px !important;
    height: 48px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}
.pdp-quick-pay-buttons .btn-buy-now {
    background: #ff7a00 !important;
    color: #fff !important;
}
.pdp-quick-pay-buttons .btn-gpay {
    background: #fff !important;
    border: 1px solid #ddd !important;
}
.pdp-quick-pay-buttons .btn-apay {
    background: #000 !important;
}

/* Meta */
.custom-pdp-layout .product_meta {
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.custom-pdp-layout .product_meta a {
    color: #ff7a00;
    font-weight: 600;
}

/* Tabs */
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs {
    display: flex !important;
    gap: 15px !important;
    border: none !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    background: transparent !important;
    justify-content: flex-start !important;
}
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li {
    background: #fff !important;
    border: 2px solid #ff7a00 !important;
    border-radius: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li a {
    padding: 12px 25px !important;
    color: #ff7a00 !important;
    font-weight: 600 !important;
    border: none !important;
    background: transparent !important;
}
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li.active {
    background: #ff7a00 !important;
}
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li.active a {
    color: #fff !important;
}
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li::after,
.woocommerce div.product.custom-pdp-layout .woocommerce-tabs ul.tabs li::before {
    display: none !important;
}

/* Specifications Table (Alternating Rows) */
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes {
    width: 100%;
    border: none;
}
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes tr:nth-child(even) {
    background-color: #f7f7f7;
}
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes tr:nth-child(odd) {
    background-color: #fff;
}
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes th,
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes td {
    padding: 15px;
    border: none;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
}
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes th {
    width: 30%;
    font-weight: 600;
    color: #333;
    text-align: left;
}
.custom-pdp-layout .woocommerce-Tabs-panel table.shop_attributes td {
    color: #666;
}

/* Related Products */
.custom-pdp-layout section.related.products {
    width: 100%;
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}
.custom-pdp-layout section.related.products h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .custom-pdp-layout .woocommerce-tabs ul.tabs {
        flex-direction: column;
        align-items: stretch;
    }
    .custom-pdp-layout .woocommerce-tabs ul.tabs li {
        width: 100%;
        text-align: center;
    }
}
