/*
 Theme Name: Tokay Press Divi Child
 Description: Reusable Divi child theme for Tokay Press customer portals
 Author: Tokay Press
 Template: Divi
 Version: 1.0.0
*/

/*****Add any custom CSS below this line*****/

/* ==================================================
   CUSTOMER ORDERING PORTAL — DIVI SHOP MODULE
   ================================================== */

/* Add more vertical space between product rows */
.et_pb_shop ul.products li.product {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 35px !important;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Subtle hover effect */
.et_pb_shop ul.products li.product:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* Keep product images neat */
.et_pb_shop ul.products li.product img {
    border-radius: 5px;
    margin-bottom: 15px !important;
}

/* Product title */
.et_pb_shop ul.products li.product .woocommerce-loop-product__title {
    font-size: 19px;
    line-height: 1.3;
    margin: 5px 0 8px;
}

/* Product price */
.et_pb_shop ul.products li.product .price {
    margin-bottom: 14px;
}

/* Add to Cart or Select Options button */
.et_pb_shop ul.products li.product .button {
    margin-top: 12px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Add breathing room around the complete product grid */
.et_pb_shop ul.products {
    padding-top: 10px;
    padding-bottom: 20px;
}

/* Improve spacing on phones and tablets */
@media only screen and (max-width: 980px) {
    .et_pb_shop ul.products li.product {
        margin-bottom: 28px !important;
        padding: 16px;
    }
}

/* ==================================================
   HIDE UNWANTED BUTTONS
   ================================================== */

/* Hide "Order Again" on the order details page */
.woocommerce-order-details .order-again {
    display: none !important;
}

/* Hide WebToffee "Print Invoice" button specifically */
.wt_pk_print_invoice,
a.button.wt_pk_print_invoice,
.woocommerce-order-details a.print-invoice {
    display: none !important;
}

/* ==================================================
   MY ACCOUNT: HORIZONTAL BUTTON NAV
   --------------------------------------------------
   NOTE: The heavy selectors and !important flags here
   are deliberate. Divi styles sidebar lists with the
   ID selector #left-area ul (IDs beat classes), and
   WooCommerce's layout CSS loads after this file and
   floats the nav to 30% width. These rules out-rank
   both. Don't slim them down or the bullets/sidebar
   layout will come back.
   ================================================== */

/* Stack nav on top of content instead of side-by-side */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* Turn the list horizontal, kill Divi's bullets/padding */
#left-area .woocommerce-MyAccount-navigation ul,
#main-content .woocommerce-MyAccount-navigation ul,
.woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 0 35px 0 !important;
    padding: 0 0 20px 0 !important;
    border-bottom: 1px solid #e5e5e5;
}

#left-area .woocommerce-MyAccount-navigation ul li,
#main-content .woocommerce-MyAccount-navigation ul li,
.woocommerce-MyAccount-navigation ul li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any ::before bullets/markers a theme might add */
.woocommerce-MyAccount-navigation ul li::before,
.woocommerce-MyAccount-navigation ul li::marker {
    content: none !important;
    display: none !important;
}

/* Button styling */
#left-area .woocommerce-MyAccount-navigation ul li a,
#main-content .woocommerce-MyAccount-navigation ul li a,
.woocommerce-MyAccount-navigation ul li a {
    display: inline-block;
    padding: 10px 24px !important;
    background: #f4f6f7;
    color: #3a5a6b !important;
    border: 1px solid #d9e2e6;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

#left-area .woocommerce-MyAccount-navigation ul li a:hover,
#main-content .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: #5aa7b5;
    border-color: #5aa7b5;
    color: #ffffff !important;
}

/* Highlight the active page */
#left-area .woocommerce-MyAccount-navigation ul li.is-active a,
#main-content .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #3f8fa0;
    border-color: #3f8fa0;
    color: #ffffff !important;
}

/* Nudge Log out to the far right and make it quieter */
.woocommerce-MyAccount-navigation ul li:last-child {
    margin-left: auto !important;
}
#left-area .woocommerce-MyAccount-navigation ul li:last-child a,
#main-content .woocommerce-MyAccount-navigation ul li:last-child a,
.woocommerce-MyAccount-navigation ul li:last-child a {
    background: transparent;
    border-color: transparent;
    color: #999999 !important;
}
#left-area .woocommerce-MyAccount-navigation ul li:last-child a:hover,
#main-content .woocommerce-MyAccount-navigation ul li:last-child a:hover,
.woocommerce-MyAccount-navigation ul li:last-child a:hover {
    color: #c0392b !important;
}

/* On phones, let Log out fall in line with the others */
@media (max-width: 600px) {
    .woocommerce-MyAccount-navigation ul li:last-child {
        margin-left: 0 !important;
    }
}

/* ==================================================
   MY ACCOUNT: ORDERS TABLE
   ================================================== */

.woocommerce-account table.woocommerce-orders-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

/* Header row */
.woocommerce-orders-table thead th {
    background: #f4f6f7;
    color: #3a5a6b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5e5;
}

/* Body cells */
.woocommerce-orders-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* Zebra striping + hover */
.woocommerce-orders-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.woocommerce-orders-table tbody tr:hover {
    background: #f0f7f8;
}
.woocommerce-orders-table tbody tr:last-child td {
    border-bottom: none;
}

/* Order number link */
.woocommerce-orders-table__cell-order-number a {
    font-weight: 700;
    color: #3f8fa0;
}

/* Action buttons (Download Invoice) */
.woocommerce-orders-table__cell-order-actions .button {
    padding: 8px 18px;
    border-radius: 20px;
    background: #3f8fa0;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s ease;
}
.woocommerce-orders-table__cell-order-actions .button:hover {
    background: #33788a;
}

/* Status column as colored pills */
.woocommerce-orders-table__cell-order-status {
    font-weight: 600;
    font-size: 13px;
}
.woocommerce-orders-table__cell-order-status::before {
    content: "\25CF";
    margin-right: 6px;
}

tr.order-status-processing .woocommerce-orders-table__cell-order-status { color: #b07d1a; }
tr.order-status-completed  .woocommerce-orders-table__cell-order-status { color: #2e7d4f; }
tr.order-status-on-hold    .woocommerce-orders-table__cell-order-status { color: #888; }
tr.order-status-cancelled  .woocommerce-orders-table__cell-order-status { color: #c0392b; }
tr.order-status-picked-up  .woocommerce-orders-table__cell-order-status { color: #155724; }

/* Mobile: let action buttons breathe */
@media (max-width: 768px) {
    .woocommerce-orders-table__cell-order-actions .button {
        display: block;
        text-align: center;
        margin-top: 6px;
    }
}
/* Make PEWC field titles smaller on product pages */
.pewc-item h3,
.pewc-theme-single h3,
.pewc-item-field-title {
    font-size: 14px !important; /* Adjust size (e.g., 12px, 14px, 16px) */
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
}
/* Modern WooCommerce Shop Grid Polish */
.woocommerce ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

/* Subtle Hover Effect */
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #00838f !important; /* Hospital brand color */
}

/* Force Uniform Image Aspect Ratio */
.woocommerce ul.products li.product a img {
    height: 180px !important;
    object-fit: contain !important;
    margin-bottom: 15px !important;
}

/* Style Product Titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 8px !important;
}

/* ==========================================================================
   Custom WooCommerce Catalog Grid Styling
   ========================================================================== */

/* 1. Force 4 products in 1 row on desktop */
@media (min-width: 981px) {
    .woocommerce ul.products {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 20px !important;
    }

    .woocommerce ul.products li.product {
        width: 25% !important;
        max-width: 25% !important;
        margin: 0 !important;
        float: none !important;
    }
}

/* 2. Modern Product Card Styling */
.woocommerce ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

/* Hover Lift Effect */
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #00838f !important;
}

/* Uniform Image Heights */
.woocommerce ul.products li.product a img {
    height: 160px !important;
    object-fit: contain !important;
    margin-bottom: 15px !important;
}

/* 3. Softened Product Titles (Normal weight instead of heavy bold) */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3 {
    font-size: 15px !important;
    font-weight: 500 !important; /* Lighter, cleaner font weight */
    color: #2d3748 !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

/* Style Prices */
.woocommerce ul.products li.product .price {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #00838f !important;
}

/* 4. Hide $0.00 Price Tags Completely */
.woocommerce ul.products li.product .price .amount:empty,
.woocommerce ul.products li.product.post-4218 .price, /* Direct post selector fallback */
.woocommerce ul.products li.product .price:has(span:empty) {
    display: none !important;
}


/* Force 4 products in 1 row on desktop */
@media (min-width: 981px) {
    .woocommerce ul.products {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 20px !important;
    }

    .woocommerce ul.products li.product {
        width: 25% !important;
        max-width: 25% !important;
        margin: 0 !important; /* Clear default WooCommerce margins */
        float: none !important;
    }
}
/* Hide Product Total and Options Total breakdown lines in PEWC */
.pewc-product-total-field,
.pewc-options-total-field {
    display: none !important;
}

/* Keep Grand Total looking clean and prominent */
.pewc-grand-total-field {
    font-weight: bold !important;
    font-size: 16px !important;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}
/* Hide empty PEWC ribbon banner shape */
.pewc-group-wrap .pewc-group-title,
.pewc-group-wrap mark,
.pewc-theme-single mark {
    display: none !important;
}
/* Force main content area to fill screen height so footer stays at bottom */
#main-content {
    min-height: calc(100vh - 220px) !important; /* Adjust 220px based on header + footer height */
}

/* Fallback for Divi My Account / WooCommerce pages */
.page-template-default #main-content,
.woocommerce-account #main-content,
.woocommerce-cart #main-content,
.woocommerce-checkout #main-content {
    min-height: 70vh !important;
}
/* Force body and page container to strictly fit full viewport height */
html, 
body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#page-container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Push middle content to stretch and fill all available space */
#main-content {
    flex: 1 0 auto !important;
}

/* Guarantee footer sticks to the bottom edge */
#main-footer,
footer.et-l,
.et_builder_inner_content > .et_pb_section:last-child {
    margin-top: auto !important;
}
/* High-specificity styling to widen Flycart discount table columns */
div[class*="wdr"] table td:first-child,
div[class*="wdr"] table th:first-child,
table.wdr_bulk_discount_table td:first-child,
table.wdr_bulk_discount_table th:first-child {
    white-space: nowrap !important;
    padding-right: 30px !important;
    width: 60% !important;
    min-width: 150px !important;
}

div[class*="wdr"] table,
table.wdr_bulk_discount_table {
    width: 100% !important;
    table-layout: auto !important;
}
/* Widen the WooCommerce product page quantity input box */
.single-product div.product form.cart .quantity input.qty,
.single-product form.cart input[type="number"].qty {
    width: 100px !important;
    max-width: 100px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    text-align: center !important;
}