/*
Theme stability patch layer
Version: 1.1.81
Purpose:
- Normalize WooCommerce product grids
- Prevent homepage/shop container shrink issues
- Improve responsive consistency
*/

.woocommerce ul.products,
.woocommerce-page ul.products,
.products {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    box-sizing: border-box;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.products .product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box;
}


.site-content,
.content-area,
.container,
.wrapper,
main {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.home .products,
.blog .products,
.archive .products,
.post-type-archive-product .products {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .products {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}


/* WooCommerce My Account Address Layout Fix */
.woocommerce-account .woocommerce-Addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
    flex: 1 1 320px;
    min-width: 320px;
    width: calc(50% - 12px);
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-Addresses .woocommerce-Address {
        width: 100%;
        min-width: 100%;
    }
}

/* Footer bar — credit on the right */
.footer-bar .s-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-credit {
  margin-left: auto;
}


/* ================================================================
   Order Received page — match Confirm Payment plugin width (700px)
   ================================================================ */

body.woocommerce-order-received .woocommerce-order {
    max-width: 700px !important;
    margin-inline: auto !important;
    width: 100% !important;
}

/* ── Order overview: table-style rows ─────────────────────────── */
body.woocommerce-order-received .woocommerce-order-overview {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0.75rem;
    padding: 0;
    list-style: none;
    display: block;
    width: 100%;
    margin: 0 0 1.5rem;
    overflow: hidden;
    font-size: 0.9rem;
}

body.woocommerce-order-received .woocommerce-order-overview li {
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 !important;
    margin: 0;
}

body.woocommerce-order-received .woocommerce-order-overview li:last-child {
    border-bottom: none;
}

body.woocommerce-order-received .woocommerce-order-overview li .da-overview-label {
    display: block !important;
    flex: 0 0 160px !important;
    min-width: 160px !important;
    padding: 0.65rem 1rem !important;
    color: #888 !important;
    font-weight: 400 !important;
    float: none !important;
    margin: 0 !important;
    text-align: left !important;
}

body.woocommerce-order-received .woocommerce-order-overview li strong {
    display: block !important;
    padding: 0.65rem 1rem !important;
    color: #1a1a2e !important;
    font-weight: 600 !important;
    float: none !important;
    margin: 0 !important;
    text-align: left !important;
}

/* ── QR code: fix SVG stretching ──────────────────────────────── */
.edc-promptpay-qr,
.seed-promptpay-qr {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 20px 24px !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
}

.edc-qr-code,
.seed-promptpay-qr-qrcode {
    flex-shrink: 0 !important;
    width: 150px !important;
    height: 150px !important;
    overflow: hidden !important;
}

img[src^="data:image/svg+xml"] {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* ── Bank details: restore flex layout ────────────────────────── */
.edc-bank-table {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.edc-bank-table tr {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    border: none !important;
}

.edc-bank-table th {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #888 !important;
    white-space: nowrap !important;
    width: 110px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}

.edc-bank-table td {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 0 !important;
    border: none !important;
}

.edc-bank-logo img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    display: block !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
}

/* ── Order overview label JS inject (shared with Expensive Design) */

/* ── Bank table: stronger specificity to beat woo.min.css th rules ──────── */
.edc-bank-card .edc-bank-table,
.edc-bank-label .edc-bank-table {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 1 !important;
    min-width: 0 !important;
    border-collapse: unset !important;
}

.edc-bank-card .edc-bank-table tr,
.edc-bank-label .edc-bank-table tr {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    border: none !important;
}

.edc-bank-card .edc-bank-table th,
.edc-bank-label .edc-bank-table th {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #888 !important;
    white-space: nowrap !important;
    width: 110px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    background: none !important;
}

.edc-bank-card .edc-bank-table td,
.edc-bank-label .edc-bank-table td {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}

.edc-bank-card .edc-bank-logo img,
.edc-bank-label .edc-bank-logo img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    display: block !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
}

/* ── edc-bank-label: force flex (beats WooCommerce label{display:block}) ── */
label.edc-bank-label,
.edc-bank-label {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    flex-direction: row !important;
}

.edc-bank-card {
    padding-left: 40px !important;
}

/* =============================================================================
   FOOTER WIDGET COLUMNS — arrange the 4 footer widget areas left to right
   (previously had no layout rule at all, so they stacked top to bottom
   as default block-level divs)
   ============================================================================= */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 32px;
}

.footer-column .widget-title,
.footer-column h2 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li {
    margin-bottom: 8px;
}

@media (max-width: 991px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (max-width: 600px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* =============================================================================
   CTA BLOCK — reduce gap on mobile for both layouts
   Split stacks vertically on mobile so the 4rem desktop gap becomes too large
   ============================================================================= */
@media (max-width: 639px) {
    /* Center layout */
    .ed-cta--center .ed-cta__card {
        gap: 16px !important;
    }
    .ed-cta--center .ed-cta__btn {
        width: 100%;
        justify-content: center;
    }
    /* Split layout — stacks on mobile, reduce gap when stacked */
    .ed-cta--split .ed-cta__card {
        gap: 20px !important;
    }
}
