/* ==========================================================================
   55printing - Cart Page Stylesheet
   Loaded only when body has class "ff-cart-page" (see wp-theme inc/theme-shell.php).

   Structure:
     1. Design tokens (mapped to theme brand variables)
     2. Page shell (main wrapper, card container, title, status bar)
     3. Two-column cart layout (items + order summary)
     4. Cart table (product rows, artwork, config, quantity, subtotal, remove)
     5. Buttons (all cart CTAs - single canonical definition)
     6. Cart actions bar + customer notes
     7. Order summary sidebar + checkout buttons
     8. Address modal
     9. Artwork preview modal
    10. Flash message popup
    11. Authorize.Net payment notifications
    12. Empty cart state
    13. Responsive overrides
    14. Overflow guards
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens - map legacy "pcs-*" tokens to 55printing theme variables
   -------------------------------------------------------------------------- */
:root {
    --pcs-primary-color: var(--brand, #558BCA);
    --pcs-secondary-color: var(--brand-light, #e8f0fa);
    --pcs-success-bg-color: #ecfdf5;
    --pcs-success-text-color: #065f46;
    --pcs-success-border-color: #a7f3d0;
    --pcs-accent-color: var(--brand-dark, #3a6da8);
    --pcs-text-color: var(--text, #475569);
    --pcs-light-text-color: var(--text-light, #64748b);
    --pcs-border-color: var(--border, #e6ebf2);
    --pcs-background-color: var(--white, #ffffff);
    --pcs-light-gray-bg: var(--bg, #f4f7fb);
    --pcs-success-color: #16a34a;
    --pcs-danger-color: var(--accent, #e11d48);
    --pcs-border-radius: var(--r-sm, 8px);
    --pcs-box-shadow: var(--shadow, 0 1px 3px rgba(30, 41, 59, 0.06));
    --pcs-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --pcs-summary-green-start: #f7fef9;
    --pcs-summary-green-mid: #ecfdf5;
    --pcs-summary-green-end: #d1fae5;
    --pcs-summary-green-border: rgba(110, 231, 183, 0.42);
    --pcs-summary-green-heading: #065f46;
    --pcs-summary-green-total: #047857;
}

/* --------------------------------------------------------------------------
   2. Page shell
   -------------------------------------------------------------------------- */
.ff-cart-main {
    padding: 16px 0 48px;
}

.ff-cart-breadcrumb {
    margin-bottom: 12px;
}

body.ff-cart-page {
    background: var(--bg, #f4f7fb);
    color: var(--text, #475569);
    overflow-x: clip;
    max-width: 100%;
}

body.ff-cart-page .ff-cart-main .container {
    max-width: 1280px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Main card that wraps the whole cart (items + summary) */
.pcs-container {
    font-family: var(--pcs-font-family);
    color: var(--pcs-text-color);
    width: 100%;
    max-width: 100%;
    margin: 12px 0 48px;
    padding: 24px;
    background-color: var(--pcs-background-color);
    border: 1px solid var(--pcs-border-color);
    border-radius: var(--pcs-border-radius);
    box-shadow: var(--pcs-box-shadow);
    box-sizing: border-box;
}

.pcs-cart-title {
    text-align: center;
    font-size: 2em;
    color: var(--brand-dark, #3a6da8);
    margin-bottom: 30px;
    font-weight: 600;
    padding: 20px;
    background: linear-gradient(145deg, var(--brand-light, #e8f0fa), #f8fbff);
    border-radius: var(--pcs-border-radius);
    box-shadow: var(--shadow-md, 0 6px 20px rgba(30, 41, 59, 0.08));
}

/* Cart heading row - title left, actions right on one line */
body.ff-cart-page .pcs-cart-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(145deg, var(--brand-light, #e8f0fa), #f8fbff);
    border: 1px solid rgba(85, 139, 202, 0.12);
    border-radius: var(--pcs-border-radius);
    box-shadow: var(--shadow-md, 0 6px 20px rgba(30, 41, 59, 0.08));
}

body.ff-cart-page .pcs-cart-header-row .pcs-cart-title {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    text-align: left;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.2;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.ff-cart-page .pcs-cart-header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    justify-self: end;
}

body.ff-cart-page .pcs-cart-header-btn {
    padding: 7px 10px !important;
    font-size: 0.72rem !important;
    min-height: 32px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Login status bar (legacy, still used on some flows) */
.pcs-login-status-bar {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    border-radius: var(--pcs-border-radius);
    background-color: var(--pcs-light-gray-bg);
    border: 1px solid var(--pcs-border-color);
    color: var(--pcs-text-color);
    font-size: 0.95em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.pcs-login-status-bar p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}
.pcs-login-status-bar strong {
    color: var(--pcs-primary-color);
    font-weight: 600;
}
body.ff-cart-page .pcs-login-status-bar a {
    color: var(--brand, #558BCA);
}

/* --------------------------------------------------------------------------
   3. Two-column cart layout (items left, summary + checkout right)
   -------------------------------------------------------------------------- */
body.ff-cart-page .pcs-cart-layout-flex-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
    max-width: 100%;
}

body.ff-cart-page .pcs-cart-items-column {
    flex: 3.75 1 0;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}
body.ff-cart-page .pcs-cart-items-column .pcs-cart-table {
    margin-bottom: 0;
}
body.ff-cart-page .pcs-cart-items-column .pcs-cart-actions {
    margin-top: auto;
    padding-top: 25px;
}

body.ff-cart-page .pcs-cart-items-column .pcs-cart-actions--notes-only {
    margin-top: 10px;
    padding-top: 0;
}

body.ff-cart-page .pcs-cart-summary-column {
    flex: 1.55 1 460px;
    min-width: 460px;
    max-width: 640px;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 140px;
    align-self: flex-start;
}

/* Order summary + checkout side-by-side inside the right column */
body.ff-cart-page .pcs-summary-checkout-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

body.ff-cart-page .pcs-summary-totals-panel {
    flex: 0.78 1 210px;
    min-width: 210px;
    max-width: 270px;
    box-sizing: border-box;
}

body.ff-cart-page .pcs-summary-payment-panel {
    flex: 1.22 1 240px;
    min-width: 240px;
    box-sizing: border-box;
}

/* Tighter totals panel - light green gradient card */
body.ff-cart-page .pcs-summary-totals-panel.order-summary-container {
    position: relative;
    overflow: hidden;
    padding: 16px 14px;
    background: linear-gradient(
        145deg,
        var(--pcs-summary-green-start) 0%,
        var(--pcs-summary-green-mid) 48%,
        var(--pcs-summary-green-end) 100%
    );
    border: 1px solid var(--pcs-summary-green-border);
    border-radius: 14px;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.ff-cart-page .pcs-summary-totals-panel.order-summary-container::before {
    content: '';
    position: absolute;
    top: -35%;
    right: -18%;
    width: 58%;
    height: 85%;
    background: radial-gradient(circle, rgba(167, 243, 208, 0.42) 0%, transparent 72%);
    pointer-events: none;
}

body.ff-cart-page .pcs-summary-totals-panel.order-summary-container > * {
    position: relative;
    z-index: 1;
}

body.ff-cart-page .pcs-summary-totals-panel h2 {
    margin-bottom: 14px;
    padding-bottom: 12px;
    font-size: 16px;
    color: var(--pcs-summary-green-heading);
    border-bottom: 1px solid rgba(52, 211, 153, 0.32);
}

body.ff-cart-page .pcs-summary-totals-panel .order-details {
    margin-bottom: 14px !important;
}

body.ff-cart-page .pcs-summary-totals-panel .order-details > div {
    margin-bottom: 8px !important;
    font-size: 13px !important;
}

body.ff-cart-page .pcs-summary-totals-panel .order-details > div span:first-child {
    color: #047857 !important;
    opacity: 0.82;
}

body.ff-cart-page .pcs-summary-totals-panel .order-details > div span:last-child {
    color: #064e3b !important;
    font-weight: 600 !important;
}

body.ff-cart-page .pcs-summary-totals-panel .order-details > div:last-child {
    margin-bottom: 0 !important;
    margin-top: 4px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-top: none !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(110, 231, 183, 0.38);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

body.ff-cart-page .pcs-summary-totals-panel .order-details > div:last-child span:first-child {
    color: var(--pcs-summary-green-heading) !important;
    opacity: 1;
    font-weight: 700;
}

body.ff-cart-page .pcs-summary-totals-panel #pcs-order-summary-total {
    color: var(--pcs-summary-green-total) !important;
    font-size: 1.12em !important;
    font-weight: 700 !important;
}

body.ff-cart-page .pcs-summary-totals-panel #pcs-tax-rate-percentage-display {
    color: #059669 !important;
}

body.ff-cart-page .pcs-summary-totals-panel .pcs-coupon-block {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.58) 100%);
    border-color: rgba(110, 231, 183, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.ff-cart-page .pcs-summary-totals-panel .pcs-coupon-divider-label {
    color: #047857;
    background: linear-gradient(135deg, rgba(167, 243, 208, 0.35), rgba(255, 255, 255, 0.92));
    border-color: rgba(52, 211, 153, 0.28);
}

body.ff-cart-page .pcs-summary-totals-panel .pcs-coupon-divider-line {
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(52, 211, 153, 0.28) 20%,
        rgba(16, 185, 129, 0.42) 50%,
        rgba(52, 211, 153, 0.28) 80%,
        transparent 100%
    );
}

body.ff-cart-page .pcs-summary-totals-panel .pcs-coupon-message {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(110, 231, 183, 0.35);
}

/* Coupon block - divider, input, apply button */
body.ff-cart-page .pcs-coupon-block {
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 12px 10px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(232, 240, 250, 0.55) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(85, 139, 202, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.ff-cart-page .pcs-coupon-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

body.ff-cart-page .pcs-coupon-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(85, 139, 202, 0.35) 20%,
        rgba(58, 109, 168, 0.55) 50%,
        rgba(85, 139, 202, 0.35) 80%,
        transparent 100%
    );
}

body.ff-cart-page .pcs-coupon-divider-label {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark, #3a6da8);
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(85, 139, 202, 0.12), rgba(232, 240, 250, 0.9));
    border: 1px solid rgba(85, 139, 202, 0.2);
}

body.ff-cart-page .pcs-coupon-label {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pcs-light-text-color, #64748b);
    line-height: 1.3;
}

body.ff-cart-page .pcs-coupon-field {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

body.ff-cart-page .pcs-coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    font-size: 13px;
    font-family: var(--pcs-font-family);
    color: var(--pcs-text-color, #475569);
    background: #fff;
    border: 1px solid var(--pcs-border-color, #e6ebf2);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.ff-cart-page .pcs-coupon-input::placeholder {
    color: #94a3b8;
}

body.ff-cart-page .pcs-coupon-input:hover {
    border-color: rgba(85, 139, 202, 0.45);
}

body.ff-cart-page .pcs-coupon-input:focus {
    outline: none;
    border-color: var(--brand, #558BCA);
    box-shadow: 0 0 0 3px rgba(85, 139, 202, 0.18);
}

body.ff-cart-page .pcs-coupon-apply-btn {
    flex-shrink: 0;
    margin: 0;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-family: var(--pcs-font-family);
    color: #fff;
    background: linear-gradient(135deg, var(--brand, #558BCA), var(--brand-dark, #3a6da8));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(85, 139, 202, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.ff-cart-page .pcs-coupon-apply-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 16px rgba(85, 139, 202, 0.34);
}

body.ff-cart-page .pcs-coupon-apply-btn:active {
    transform: translateY(1px);
}

body.ff-cart-page .pcs-coupon-message {
    min-height: 18px;
    margin: 6px 0 14px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    color: #059669;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

body.ff-cart-page .pcs-coupon-message:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

body.ff-cart-page .order-summary-payment-container {
    font-family: var(--pcs-font-family);
    width: 100%;
    max-width: 100%;
    background: var(--pcs-background-color);
    border: 1px solid var(--pcs-border-color);
    border-radius: var(--pcs-border-radius);
    padding: 18px 16px;
    margin: 0;
    box-sizing: border-box;
    box-shadow: var(--pcs-box-shadow);
}

body.ff-cart-page .order-summary-payment-container h2 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #374151);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pcs-border-color);
}

body.ff-cart-page .pcs-summary-payment-panel #shipping-carousel-wrapper {
    margin-bottom: 14px;
}

body.ff-cart-page .pcs-summary-payment-panel #shipping-carousel-wrapper.carousel-active {
    margin-bottom: 16px;
}

@media screen and (max-width: 1200px) {
    body.ff-cart-page .pcs-summary-checkout-row {
        flex-direction: column;
        flex-wrap: wrap;
    }
    body.ff-cart-page .pcs-summary-totals-panel,
    body.ff-cart-page .pcs-summary-payment-panel {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media screen and (max-width: 992px) {
    body.ff-cart-page .pcs-cart-layout-flex-container {
        flex-direction: column;
        flex-wrap: wrap;
    }
    body.ff-cart-page .pcs-cart-items-column,
    body.ff-cart-page .pcs-cart-summary-column {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        width: 100%;
        position: static;
    }
    body.ff-cart-page .pcs-cart-summary-column {
        margin-top: 30px;
    }
    body.ff-cart-page .pcs-cart-items-column .pcs-cart-actions--notes-only {
        margin-top: 10px;
    }
}

/* --------------------------------------------------------------------------
   4. Cart table
   -------------------------------------------------------------------------- */
.pcs-cart-form {
    width: 100%;
}

.pcs-cart-table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    margin-bottom: 30px;
    table-layout: auto;
}

.pcs-cart-table thead th {
    text-align: left;
    padding: 12px 15px;
    color: var(--pcs-light-text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    border-bottom: 2px solid var(--pcs-border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcs-cart-table .pcs-product-remove { width: 40px; }
.pcs-cart-table .pcs-product-artwork {
    width: 120px;
    min-width: 100px;
    max-width: 130px;
}
.pcs-cart-table .pcs-product-name {
    width: auto;
    text-align: left;
}
.pcs-cart-table .pcs-product-subtotal {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}
/* Quantity/unit-price columns are hidden on this page (quantity is edited inline) */
.pcs-product-quantity,
.pcs-product-price {
    display: none;
}

.pcs-cart-table tbody tr.pcs-cart-item {
    background-color: var(--pcs-background-color);
    border-radius: var(--pcs-border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
}
.pcs-cart-table tbody tr.pcs-cart-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
.pcs-cart-table tbody tr.pcs-cart-item td:first-child {
    border-top-left-radius: var(--pcs-border-radius);
    border-bottom-left-radius: var(--pcs-border-radius);
}
.pcs-cart-table tbody tr.pcs-cart-item td:last-child {
    border-top-right-radius: var(--pcs-border-radius);
    border-bottom-right-radius: var(--pcs-border-radius);
}
.pcs-cart-table td {
    padding: 12px 10px;
    vertical-align: top;
    border-bottom: none;
}

/* Product name + config details */
.pcs-product-name {
    font-weight: 600;
    color: var(--pcs-primary-color);
    word-break: break-word;
    line-height: 1.25;
}
.pcs-product-name a {
    color: #1f2937;
    text-decoration: none;
    font-weight: bold;
    line-height: 1.25;
    display: inline-block;
    margin-bottom: 2px;
}
.pcs-product-name a:hover {
    text-decoration: underline;
    color: var(--pcs-accent-color);
}

.pcs-item-config-wrapper { margin-top: 3px; }
.pcs-item-config {
    margin: 0;
    padding: 0;
    line-height: 1.25;
    font-size: 0.78em;
    color: var(--pcs-light-text-color);
    font-weight: 300;
    word-break: break-word;
}
.pcs-config-item { margin-bottom: 1px; }
.pcs-config-item dt,
.pcs-item-config dt {
    display: inline;
    font-weight: 500;
}
.pcs-config-item dd,
.pcs-item-config dd {
    display: inline;
    margin-left: 4px;
}
.pcs-config-item dt::after,
.pcs-item-config dt::after {
    content: ":";
}
.pcs-item-config dd:not(:last-child)::after {
    content: "; ";
}
.pcs-item-config-preview {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
}
.pcs-item-config-preview.has-fade::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.8em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--pcs-background-color, #ffffff) 90%);
    pointer-events: none;
}
.pcs-item-config-full { display: none; }
.pcs-toggle-config-button {
    background: none;
    border: none;
    color: var(--pcs-primary-color);
    cursor: pointer;
    font-size: 0.75em;
    padding: 3px 0;
    margin-top: 4px;
    text-decoration: underline;
}
.pcs-toggle-config-button:hover {
    color: var(--pcs-accent-color);
}

/* Quantity stepper (if shown by a given product type) */
.pcs-quantity-wrapper {
    display: flex;
    align-items: center;
}
.pcs-quantity-input {
    width: 65px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--pcs-border-color);
    border-radius: var(--pcs-border-radius);
    font-size: 0.95em;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.pcs-quantity-wrapper .pcs-quantity-input {
    border-radius: 0;
    width: 50px;
    height: 38px;
}
.pcs-quantity-input:focus {
    border-color: var(--pcs-primary-color);
    box-shadow: 0 0 0 2px var(--pcs-secondary-color);
    outline: none;
}
.pcs-quantity-input::-webkit-outer-spin-button,
.pcs-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pcs-quantity-input[type="number"] {
    -moz-appearance: textfield;
}
.pcs-quantity-button {
    background-color: var(--pcs-light-gray-bg);
    border: 1px solid var(--pcs-border-color);
    color: var(--pcs-primary-color);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 38px;
    line-height: 36px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}
.pcs-quantity-button:hover {
    background-color: #e9ecef;
    color: var(--pcs-accent-color);
}
.pcs-quantity-button.pcs-quantity-minus {
    border-top-left-radius: var(--pcs-border-radius);
    border-bottom-left-radius: var(--pcs-border-radius);
    border-right: none;
}
.pcs-quantity-button.pcs-quantity-plus {
    border-top-right-radius: var(--pcs-border-radius);
    border-bottom-right-radius: var(--pcs-border-radius);
    border-left: none;
}

.pcs-product-price,
.pcs-product-subtotal {
    font-weight: 500;
    font-size: 1.05em;
}

.pcs-remove-item {
    color: var(--pcs-danger-color);
    text-decoration: none;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    border: none;
    background: none;
    cursor: pointer;
}
.pcs-remove-item:hover {
    background-color: #F8D7DA;
    color: #721C24;
}
.pcs-remove-item svg {
    width: 16px;
    height: 16px;
}

/* Artwork preview cell */
.pcs-product-artwork {
    text-align: center;
}
.pcs-artwork-main-preview {
    margin-bottom: 8px;
    text-align: center;
}
.pcs-artwork-main-preview img.pcs-main-artwork-img,
.pcs-artwork-main-preview img.pcs-main-artwork-pdf-icon {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 70px;
    object-fit: contain;
    border: 1px solid var(--pcs-border-color);
    border-radius: 4px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: #fff;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out, transform 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.pcs-artwork-main-preview a:hover img.pcs-main-artwork-img,
.pcs-artwork-main-preview a:hover img.pcs-main-artwork-pdf-icon {
    transform: scale(1.05) translateY(-3px);
}
.pcs-artwork-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 -10px;
}
.pcs-artwork-thumbnail-strip-container {
    flex-grow: 1;
    overflow: hidden;
    padding: 0 5px;
    position: relative;
}
.pcs-artwork-thumbnail-strip-container::before,
.pcs-artwork-thumbnail-strip-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 25px;
    z-index: 5;
    pointer-events: none;
}
.pcs-artwork-thumbnail-strip-container::before {
    left: 0;
    background: linear-gradient(to right, var(--pcs-background-color, #ffffff) 0%, rgba(255, 255, 255, 0) 100%);
}
.pcs-artwork-thumbnail-strip-container::after {
    right: 0;
    background: linear-gradient(to left, var(--pcs-background-color, #ffffff) 0%, rgba(255, 255, 255, 0) 100%);
}
.pcs-artwork-thumbnail-strip {
    display: flex;
    padding: 5px 0;
    gap: 6px;
}
.pcs-artwork-thumbnail {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    background-color: #fff;
}
.pcs-artwork-thumbnail:hover,
.pcs-artwork-thumbnail.active {
    border-color: var(--pcs-primary-color);
}
.pcs-carousel-arrow {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--pcs-border-color);
    color: var(--pcs-primary-color);
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    border-radius: 50%;
    z-index: 10;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pcs-carousel-arrow:hover {
    background-color: var(--pcs-primary-color);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
.pcs-carousel-arrow.pcs-carousel-arrow-left { margin-right: 5px; }
.pcs-carousel-arrow.pcs-carousel-arrow-right { margin-left: 5px; }
.pcs-carousel-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}
.pcs-no-artwork {
    font-size: 0.85em;
    color: var(--pcs-light-text-color);
    text-align: center;
    padding: 10px 0;
}

/* --------------------------------------------------------------------------
   5. Buttons - single canonical definition for every cart CTA.
      Specificity boosted with body.ff-cart-page so Bootstrap's reboot
      (.btn/.container/.form-control, etc.) can never win here.
   -------------------------------------------------------------------------- */
body.ff-cart-page .pcs-button,
body.ff-cart-page a.pcs-button,
body.ff-cart-page button.pcs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 22px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: var(--pcs-border-radius);
    cursor: pointer;
    font-family: var(--pcs-font-family);
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
body.ff-cart-page .pcs-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
body.ff-cart-page .pcs-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.ff-cart-page .pcs-update-cart-button,
body.ff-cart-page .pcs-button-primary,
body.ff-cart-page .pcs-proceed-to-checkout button,
body.ff-cart-page .pcs-proceed-to-checkout .pcs-button-primary {
    background-color: var(--pcs-primary-color);
    background-image: linear-gradient(135deg, var(--brand, #558BCA), var(--brand-lighter, #7ab0e0));
    color: #fff !important;
    border-color: var(--pcs-primary-color);
    box-shadow: var(--shadow-brand, 0 10px 28px rgba(85, 139, 202, 0.28));
}
body.ff-cart-page .pcs-update-cart-button:hover,
body.ff-cart-page .pcs-button-primary:hover,
body.ff-cart-page .pcs-proceed-to-checkout button:hover {
    background-color: var(--pcs-accent-color);
    background-image: linear-gradient(135deg, var(--brand-dark, #3a6da8), var(--brand, #558BCA));
    border-color: var(--pcs-accent-color);
    color: #fff !important;
}

body.ff-cart-page .pcs-continue-shopping-button,
body.ff-cart-page .pcs-button-secondary {
    background-color: var(--pcs-light-gray-bg);
    color: var(--pcs-primary-color) !important;
    border-color: var(--pcs-border-color);
}
body.ff-cart-page .pcs-continue-shopping-button:hover,
body.ff-cart-page .pcs-button-secondary:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: var(--pcs-accent-color) !important;
}

body.ff-cart-page .pcs-clear-cart-button {
    background-color: #fff;
    color: var(--pcs-danger-color) !important;
    border-color: var(--pcs-danger-color);
}
body.ff-cart-page .pcs-clear-cart-button:hover {
    background-color: var(--pcs-danger-color);
    color: #fff !important;
    border-color: var(--pcs-danger-color);
}

body.ff-cart-page .loader,
body.ff-cart-page #loading-overlay .loader {
    border-top-color: var(--brand, #558BCA);
}

/* --------------------------------------------------------------------------
   6. Cart actions bar + customer notes
   -------------------------------------------------------------------------- */
.pcs-cart-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 25px 0;
    margin-bottom: 30px;
    border-top: 1px solid var(--pcs-border-color);
    border-bottom: 1px solid var(--pcs-border-color);
}

body.ff-cart-page .pcs-cart-actions--notes-only {
    padding: 0;
    margin-top: 10px;
    margin-bottom: 8px;
    border: none;
}

body.ff-cart-page .pcs-customer-notes-container {
    width: 100%;
    margin-top: 0;
}

body.ff-cart-page .pcs-customer-notes-box {
    max-width: 100%;
    margin: 0;
    padding: 16px 14px 14px;
}

.pcs-cart-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.pcs-customer-notes-container {
    width: 100%;
    margin-top: 20px;
}
.pcs-customer-notes-box {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border: 2px solid var(--pcs-border-color);
    border-radius: 16px;
    padding: 20px;
    background-color: var(--pcs-background-color);
    box-shadow: var(--pcs-box-shadow);
    box-sizing: border-box;
}
.pcs-customer-notes-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pcs-background-color);
    padding: 0 10px;
    font-family: var(--pcs-font-family);
    font-size: 0.9em;
    color: var(--pcs-light-text-color);
}
.pcs-customer-notes-textarea {
    width: 100%;
    text-align: center;
    padding: 0;
    resize: vertical;
    overflow: auto;
    height: 100px;
    border: none;
    font-family: var(--pcs-font-family);
    font-size: 1em;
    color: var(--pcs-text-color);
    outline: none;
    box-sizing: border-box;
}
.pcs-customer-notes-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--pcs-light-text-color, #6b7280);
    text-align: center;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   7. Order summary sidebar + checkout buttons
   -------------------------------------------------------------------------- */
body.ff-cart-page .order-summary-container {
    font-family: var(--pcs-font-family);
    width: 100%;
    max-width: 100%;
    background: var(--pcs-background-color);
    border: 1px solid var(--pcs-border-color);
    border-radius: var(--pcs-border-radius);
    padding: 24px;
    margin: 0;
    box-sizing: border-box;
    box-shadow: var(--pcs-box-shadow);
}

body.ff-cart-page .pcs-summary-totals-panel.order-summary-container {
    background: linear-gradient(
        145deg,
        var(--pcs-summary-green-start) 0%,
        var(--pcs-summary-green-mid) 48%,
        var(--pcs-summary-green-end) 100%
    );
    border-color: var(--pcs-summary-green-border);
    border-radius: 14px;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.ff-cart-page .order-summary-container h2 {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text, #374151);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--pcs-border-color);
}

body.ff-cart-page .pcs-summary-totals-panel.order-summary-container h2 {
    margin-bottom: 14px;
    padding-bottom: 12px;
    font-size: 16px;
    color: var(--pcs-summary-green-heading);
    border-bottom-color: rgba(52, 211, 153, 0.32);
}

body.ff-cart-page #checkout-section,
body.ff-cart-page #guest-checkout-buttons-container,
body.ff-cart-page #logged-in-checkout-buttons-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Guest checkout component (.ecc-*) - force it to fit the sidebar column */
body.ff-cart-page .ecc-container {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* "Login / Register to Checkout" button */
body.ff-cart-page .pcs-login-to-continue-container {
    text-align: center;
    margin: 12px 0;
}
body.ff-cart-page .pcs-checkout-button-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 14px 20px;
    margin: 0;
    border: none;
    border-radius: var(--pcs-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--brand, #558BCA), var(--brand-dark, #3a6da8));
    color: #fff !important;
    box-shadow: var(--shadow-brand, 0 10px 28px rgba(85, 139, 202, 0.28));
    font-family: var(--pcs-font-family);
}
body.ff-cart-page .pcs-checkout-button-login:hover {
    background: linear-gradient(135deg, var(--brand-dark, #3a6da8), var(--brand, #558BCA));
    color: #fff !important;
    transform: translateY(-1px);
}

/* "Proceed to Checkout" wrapper used by the JS tracking snippet */
.pcs-proceed-to-checkout {
    text-align: center;
    margin-top: 20px;
}

/* --------------------------------------------------------------------------
   8. Address modal ("Add / Edit Address")
   -------------------------------------------------------------------------- */
body.ff-cart-page #addressForm .form-control:focus {
    border-color: var(--brand, #558BCA);
    box-shadow: 0 0 0 4px rgba(85, 139, 202, 0.18);
}
body.ff-cart-page #addressForm .btn-submit {
    background: linear-gradient(135deg, var(--brand-lighter, #7ab0e0), var(--brand, #558BCA));
    box-shadow: var(--shadow-brand, 0 10px 28px rgba(85, 139, 202, 0.28));
}
body.ff-cart-page #addressForm .btn-submit:hover {
    background: linear-gradient(135deg, var(--brand, #558BCA), var(--brand-dark, #3a6da8));
}
body.ff-cart-page .address-modal-content {
    border-color: rgba(85, 139, 202, 0.22);
}

/* --------------------------------------------------------------------------
   9. Artwork preview modal
   -------------------------------------------------------------------------- */
.pcs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.pcs-modal-overlay.pcs-modal-active {
    opacity: 1;
    visibility: visible;
}
.pcs-modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: var(--pcs-border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    width: 90vw;
    max-width: 90vw;
    height: 90vh;
    overflow: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}
.pcs-modal-overlay.pcs-modal-active .pcs-modal-content {
    transform: scale(1);
}
.pcs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--pcs-border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.pcs-modal-title-text {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--pcs-primary-color);
    margin: 0;
}
.pcs-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    font-weight: 300;
    color: var(--pcs-light-text-color);
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
}
.pcs-modal-close-btn:hover {
    color: var(--pcs-danger-color);
    opacity: 1;
}
.pcs-modal-body-content {
    padding-top: 10px;
    text-align: center;
}
.pcs-modal-body-content img {
    max-width: 100%;
    max-height: calc(90vh - 150px);
    display: block;
    margin: 0 auto;
}
.pcs-modal-body-content iframe {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border: none;
}

/* --------------------------------------------------------------------------
   10. Flash message popup (add-to-cart / update confirmations)
   -------------------------------------------------------------------------- */
@keyframes pcs-flash-jump-in {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) translateY(30px); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) translateY(-10px); }
    80% { transform: translate(-50%, -50%) scale(0.95) translateY(5px); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
}
@keyframes pcs-flash-jump-out {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
    20% { transform: translate(-50%, -50%) scale(1.05) translateY(-10px); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) translateY(30px); }
}
.pcs-flash-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--pcs-success-bg-color);
    color: var(--pcs-success-text-color);
    border: 1px solid var(--pcs-success-border-color);
    border-left-width: 5px;
    border-left-color: var(--pcs-success-color);
    padding: 20px 30px;
    border-radius: var(--pcs-border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    display: none;
    opacity: 0;
    max-width: 400px;
    font-size: 1em;
    text-align: center;
}
.pcs-flash-popup.visible { display: block; }
.pcs-flash-popup.animate-in {
    display: block;
    animation: pcs-flash-jump-in 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}
.pcs-flash-popup.animate-out {
    animation: pcs-flash-jump-out 0.5s ease-out forwards;
}
.pcs-flash-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2em;
    color: var(--pcs-success-text-color);
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.pcs-flash-popup-close:hover { opacity: 1; }
.pcs-flash-popup-icon {
    margin-right: 10px;
    vertical-align: middle;
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
}
.pcs-flash-popup-icon .pcs-animated-checkmark-svg {
    width: 100%;
    height: 100%;
    stroke: var(--pcs-success-color);
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}
.pcs-flash-popup.animate-in .pcs-flash-popup-icon .pcs-animated-checkmark-svg {
    animation: pcs-checkmark-animation 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    animation-delay: 0.6s;
}
@keyframes pcs-checkmark-animation {
    0% { opacity: 0; transform: scale(0.5) rotate(-45deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.pcs-flash-popup #pcs-flash-message-text {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
}
.pcs-flash-product-name { display: block; font-weight: 600; }
.pcs-flash-message-suffix { display: block; }

/* --------------------------------------------------------------------------
   11. Authorize.Net payment notifications (floating toast stack)
   -------------------------------------------------------------------------- */
.authorize-net-notifications-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 10px;
}
.payment-notification-container {
    position: relative;
    width: 350px;
    background-color: var(--pcs-background-color);
    border: 1px solid var(--pcs-border-color);
    border-radius: var(--pcs-border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, margin-top 0.4s ease-out;
    box-sizing: border-box;
}
.payment-notification-container.active { opacity: 1; transform: translateY(0); }
.payment-notification-container.closing { opacity: 0; transform: translateY(20px); }
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--pcs-border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.notification-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--pcs-primary-color);
    margin: 0;
}
.close-button {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--pcs-light-text-color);
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
}
.close-button:hover { color: var(--pcs-danger-color); opacity: 1; }
.notification-body { flex-grow: 1; }
.notification-steps { list-style: none; padding: 0; margin: 0; }
.notification-steps .step {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95em;
    color: var(--pcs-text-color);
}
.notification-steps .step:last-child { margin-bottom: 0; }
.step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}
.step.pending .step-icon {
    border: 2px solid var(--pcs-border-color);
    background-color: transparent;
    color: var(--pcs-light-text-color);
    font-size: 0.8em;
}
.step.completed .step-icon {
    background-color: var(--pcs-success-color);
    border: 2px solid var(--pcs-success-color);
}
.step.failed .step-icon {
    background-color: var(--pcs-danger-color);
    border: 2px solid var(--pcs-danger-color);
}
.transaction-id-display,
.error-message-display {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--pcs-border-radius);
    font-size: 0.9em;
    word-break: break-word;
}
.transaction-id-display {
    background-color: var(--pcs-success-bg-color);
    color: var(--pcs-success-text-color);
    border: 1px solid var(--pcs-success-border-color);
}
.error-message-display {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}
.notification-footer {
    text-align: right;
    padding: 15px 0 0 0;
    border-top: 1px solid var(--pcs-border-color);
    margin-top: 15px;
}
.spinner {
    border: 3px solid var(--pcs-secondary-color);
    border-top: 3px solid var(--pcs-primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   12. Empty cart state
   -------------------------------------------------------------------------- */
.pcs-cart-empty {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--pcs-light-gray-bg);
    border-radius: var(--pcs-border-radius);
    border: 1px solid var(--pcs-border-color);
    margin-top: 30px;
}
.pcs-empty-cart-icon svg {
    width: 80px;
    height: 80px;
    color: var(--pcs-primary-color);
    margin-bottom: 20px;
    opacity: 0.6;
}
.pcs-empty-cart-title {
    font-size: 1.8em;
    color: var(--pcs-primary-color);
    margin-bottom: 10px;
}
.pcs-empty-cart-message {
    font-size: 1em;
    color: var(--pcs-light-text-color);
    margin-bottom: 25px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. Responsive overrides
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    .pcs-container {
        margin: 8px 0 32px;
        padding: 15px;
    }

    body.ff-cart-page .pcs-cart-header-row {
        grid-template-columns: 1fr;
        padding: 10px 12px;
    }

    body.ff-cart-page .pcs-cart-header-row .pcs-cart-title {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    body.ff-cart-page .pcs-cart-header-actions {
        justify-self: stretch;
        justify-content: flex-end;
    }

    /* Keep the table layout (not the stacked-card layout) on mobile too,
       just hide the less critical columns. */
    .pcs-cart-table { table-layout: auto !important; }
    .pcs-cart-table thead { display: table-header-group !important; }
    .pcs-cart-table tbody tr.pcs-cart-item { display: table-row !important; }
    .pcs-cart-table td.pcs-product-remove,
    .pcs-cart-table td.pcs-product-artwork,
    .pcs-cart-table td.pcs-product-name,
    .pcs-cart-table td.pcs-product-subtotal {
        display: table-cell !important;
    }
    .pcs-cart-table td::before { content: none !important; }
    .pcs-cart-table td.pcs-product-name { text-align: left !important; }

    .pcs-cart-table .pcs-product-remove { width: 25px; }
    .pcs-cart-table .pcs-product-artwork {
        min-width: 0 !important;
        max-width: none !important;
        width: 80px;
    }
    .pcs-cart-table .pcs-product-name {
        min-width: 0 !important;
        max-width: none !important;
    }
    .pcs-cart-table .pcs-product-subtotal {
        min-width: 0 !important;
        max-width: none !important;
    }
    .pcs-product-name a,
    .pcs-item-config {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pcs-cart-buttons-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    body.ff-cart-page .pcs-button {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   14. Overflow guards - prevent any child from widening the page
   -------------------------------------------------------------------------- */
body.ff-cart-page .pcs-cart-layout-flex-container,
body.ff-cart-page .pcs-cart-items-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.ff-cart-page .pcs-cart-summary-column,
body.ff-cart-page .order-summary-payment-container,
body.ff-cart-page .pcs-summary-checkout-row {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.ff-cart-page .pcs-cart-table {
    max-width: 100%;
}

/* Keep third-party chat widgets from widening the page */
body > jdiv,
#jivo-iframe-container,
[id^="jivo"] {
    max-width: 100vw;
}
