/* Root wrapper to isolate styles */
.wpfc-cart {
    margin: 30px 0 50px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    color: #111827;
}

/* Table shell */
.wpfc-cart .wpfc-cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

/* Header */
.wpfc-cart .wpfc-cart-head th {
    background: #f5f6f8;
    padding: 16px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* Column widths & alignment */
.wpfc-cart .wpfc-cart-head .col-product { width: 56%; text-align: left; }
.wpfc-cart .wpfc-cart-head .col-qty,
.wpfc-cart .wpfc-cart-head .col-unit,
.wpfc-cart .wpfc-cart-head .col-subtotal,
.wpfc-cart .wpfc-cart-head .col-actions {
    width: 11%;
    text-align: center;
}

/* Body cells */
.wpfc-cart .wpfc-cart-row td {
    padding: 16px 18px;
    border-top: 1px solid #edf0f3;
    vertical-align: middle;
    font-size: 15px;
}

/* Product: left aligned */
.wpfc-cart .cell-product {
    text-align: left;
}

/* Other columns: centered */
.wpfc-cart .cell-qty,
.wpfc-cart .cell-unit,
.wpfc-cart .cell-subtotal,
.wpfc-cart .cell-actions {
    text-align: center;
}

/* Empty row */
.wpfc-cart .wpfc-cart-row-empty td {
    padding: 22px 18px;
    text-align: left;
    color: #6b7280;
}

/* Product cell layout */
.wpfc-cart .wpfc-cart-product {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.wpfc-cart .wpfc-cart-thumb img {
    width: 76px;
    height: 76px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    object-fit: cover;
    background: #fafafa;
}

.wpfc-cart .wpfc-cart-title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 16px;
    color: #111827;
    text-decoration: none;
}

.wpfc-cart .wpfc-cart-title:hover {
    color: #2563eb;
}

.wpfc-cart .wpfc-cart-sku {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 4px;
}

/* Options text under product */
.wpfc-cart .wpfc-cart-options-list {
    margin-top: 2px;
}

.wpfc-cart .wpfc-opt-line {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

/* View Uploads button */
.wpfc-cart .wpfc-artwork-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #2563eb;
    cursor: pointer;
}

.wpfc-cart .wpfc-artwork-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Qty input + spinner */
.wpfc-cart .wpfc-qty-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wpfc-cart .wpfc-qty {
    width: 70px;
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    text-align: center;
    background-color: #fff;
}

.wpfc-cart .wpfc-qty:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.wpfc-cart .wpfc-row-spinner {
    position: absolute;
    right: -22px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #9ca3af;
    border-top-color: transparent;
    animation: wpfc-spin 0.7s linear infinite;
    opacity: 0;
    pointer-events: none;
}

.wpfc-cart .wpfc-cart-row.is-loading .wpfc-row-spinner {
    opacity: 1;
}

@keyframes wpfc-spin { to { transform: rotate(360deg); } }

/* Money cells */
.wpfc-cart .wpfc-unit,
.wpfc-cart .wpfc-subtotal {
    font-size: 15px;
    white-space: nowrap;
}

/* Remove button */
.wpfc-cart .wpfc-remove {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    font-size: 25px;
    color: #ef4444;
    text-decoration: none;
}

.wpfc-cart .wpfc-remove:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Totals row */
.wpfc-cart .wpfc-cart-totals-row td {
    border-top: 1px solid #e5e7eb;
    padding: 16px 18px;
    font-size: 15px;
}

.wpfc-cart .cell-total-label {
    text-align: left;
    color: #6b7280;
}

.wpfc-cart .cell-total-amount {
    text-align: right;
}

.wpfc-cart .wpfc-total {
    font-size: 19px;
    font-weight: 600;
}

/* Modal */
.wpfc-cart .wpfc-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.wpfc-cart .wpfc-modal.is-open {
    display: flex;
}

.wpfc-cart .wpfc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.35);
}

.wpfc-cart .wpfc-modal-dialog {
    position: relative;
    max-width: 640px;
    width: 92%;
    max-height: 80vh;
    background: #fff;
    border-radius: 6px;
    padding: 16px 18px 14px;
    overflow-y: auto;
    box-shadow: 0 12px 32px rgba(15,23,42,0.25);
    z-index: 1;
}

.wpfc-cart .wpfc-modal-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.wpfc-cart .wpfc-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
}

.wpfc-cart .wpfc-modal-close:hover {
    color: #ef4444;
}

.wpfc-cart #wpfc-artwork-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpfc-cart #wpfc-artwork-container img {
    max-width: 140px;
    max-height: 140px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    object-fit: contain;
    background: #f9fafb;
}




@media (max-width: 768px) {
    /* Hide main header */
    .wpfc-cart .wpfc-cart-head {
        display: none;
    }

    /* Allow custom layout */
    .wpfc-cart .wpfc-cart-table,
    .wpfc-cart .wpfc-cart-table tbody {
        display: block;
        width: 100%;
        border: 0;
    }

    /* Each cart row becomes a flex "card" */
    .wpfc-cart .wpfc-cart-row {
        display: flex;
        flex-wrap: wrap;
        margin: 0 0 14px;
        padding: 10px 10px 12px;
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(15,23,42,0.12);
    }

    .wpfc-cart .wpfc-cart-row td {
        border: 0;
        padding: 4px 0;
        font-size: 14px;
        box-sizing: border-box;
    }

    /* Product block: full width at top */
    .wpfc-cart .cell-product {
        flex: 0 0 100%;
        margin-bottom: 6px;
        text-align: left;
    }

    .wpfc-cart .wpfc-cart-product {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .wpfc-cart .wpfc-cart-thumb img {
        width: 56px;
        height: 56px;
        border-radius: 6px;
    }

    .wpfc-cart .wpfc-cart-title {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .wpfc-cart .wpfc-cart-sku,
    .wpfc-cart .wpfc-opt-line {
        font-size: 13px;
    }

    .wpfc-cart .wpfc-cart-options-list {
        margin-top: 2px;
    }

    .wpfc-cart .wpfc-artwork-btn {
        margin-top: 6px;
        font-size: 12px;
        padding: 4px 10px;
    }

    /* ===== Mini row: QTY | UNIT | SUBTOTAL | ACTIONS ===== */
    .wpfc-cart .cell-qty,
    .wpfc-cart .cell-unit,
    .wpfc-cart .cell-subtotal,
    .wpfc-cart .cell-actions {
        flex: 0 0 25%;
        text-align: center;
        padding-top: 8px;
        padding-bottom: 4px;
        position: relative;
    }

    /* Labels above values */
    .wpfc-cart .cell-qty::before,
    .wpfc-cart .cell-unit::before,
    .wpfc-cart .cell-subtotal::before,
    .wpfc-cart .cell-actions::before {
        display: block;
        margin-bottom: 4px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #9ca3af;
        content: "";
    }

    .wpfc-cart .cell-qty::before      { content: "Qty"; }
    .wpfc-cart .cell-unit::before     { content: "Unit"; }
    .wpfc-cart .cell-subtotal::before { content: "Subtotal"; }
    .wpfc-cart .cell-actions::before  { content: "Actions"; }

    /* Qty input */
    .wpfc-cart .wpfc-qty-wrap {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .wpfc-cart .wpfc-qty {
        width: 60px;
        font-size: 14px;
        text-align: center;
    }

    /* Money values */
    .wpfc-cart .wpfc-unit,
    .wpfc-cart .wpfc-subtotal {
        font-size: 14px;
        white-space: nowrap;
    }

    /* Remove icon */
    .wpfc-cart .wpfc-remove {
        margin: 0 auto;
        display: inline-block;
    }

    .wpfc-cart .wpfc-row-spinner {
        right: -14px;
    }

    /* Totals bar */
    .wpfc-cart tfoot .wpfc-cart-totals-row {
        display: block;
        margin-top: 8px;
        padding: 10px 10px;
        background: #ffffff;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(15,23,42,0.12);
    }

    .wpfc-cart tfoot .wpfc-cart-totals-row td {
        display: inline-block;
        width: auto;
        padding: 0 4px 0 0;
        border: 0;
        font-size: 15px;
    }

    .wpfc-cart .cell-total-label {
        color: #6b7280;
    }

    .wpfc-cart .cell-total-amount {
        float: right;
    }
}


.wpfc-coupon-summary {text-align:right;font-size: 13px;}

.wpfc-coupon-message {
    margin-top: 6px;
    font-size: 13px;
}

.wpfc-coupon-success{
    color: #16a34a; /* green */
}

.wpfc-coupon-error {
    color: #dc2626; /* red */
}


/* Coupon Row Layout */
.wpfc-cart-coupon-row .cell-coupon-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
}

/* Input */
.wpfc-coupon-code {
  flex: 1;
  padding: 10px 14px;
  margin-left: 15px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.wpfc-coupon-code:focus {
  border-color: #0073aa; /* WP blue, can swap to your brand */
  box-shadow: 0 0 0 2px rgba(0,115,170,.15);
  outline: none;
}

/* Button */
.wpfc-apply-coupon-btn {
  padding: 10px 16px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, transform .1s ease;
}

.wpfc-apply-coupon-btn:hover {
  background: #005e8a;
}

.wpfc-apply-coupon-btn:active {
  transform: scale(0.97);
}

.wpfc-cart-footer-actions {
    margin-top: 20px;
    text-align: right;
}

.wpfc-cart-checkout-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.wpfc-cart-checkout-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.wpfc-cart-checkout-btn:active {
    transform: translateY(0);
}



.wpfc-minimum-warnings {
    margin: 0 0 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 77, 79, 0.35);
    background: rgba(255, 77, 79, 0.08);
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.4;
    text-align:center;
    text-transform: capitalize;
}
.wpfc-minimum-warning-item + .wpfc-minimum-warning-item {
    margin-top: 6px;
}


/* Disabled checkout button */
.wpfc-cart-checkout-btn.is-disabled,
.wpfc-cart-checkout-btn[aria-disabled="true"] {
    background: #cfd4d8;          /* muted gray */
    color: #6b7280;               /* subdued text */
    cursor: not-allowed;
    pointer-events: none;         /* hard block clicks */
    box-shadow: none;
    transform: none;
    opacity: 0.85;
}

/* Optional: subtle lock-in feel */
.wpfc-cart-checkout-btn.is-disabled:hover,
.wpfc-cart-checkout-btn[aria-disabled="true"]:hover {
    background: #cfd4d8;
}

/* Optional: tiny visual hint it's intentionally disabled */
.wpfc-cart-checkout-btn.is-disabled::after,
.wpfc-cart-checkout-btn[aria-disabled="true"]::after {
    content: " ";
}

/* SweetAlert Styling - Make modals larger and more readable */
.swal2-popup {
    font-size: 16px;
}
