/* Shipping Calculator Button */
.btn-calculate-shipping {
    background: linear-gradient(135deg, var(--bsc-green) 0%, var(--bsc-green-hover) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 115, 70, 0.4);
}

.btn-calculate-shipping:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 115, 70, 0.6);
}

.btn-calculate-shipping:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.is-hidden {
    display: none;
}

/* Shipping Cost Display */
#shipping-cost-display {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#shipping-cost-value {
    font-size: 24px;
    color: var(--bsc-green);
    font-weight: bold;
}

#shipping-details {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Shipping Error Display */
#shipping-error-display {
    padding: 10px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    margin-top: 10px;
}

/* Shipping Boxes Section */
.shipping-boxes-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.shipping-boxes-header {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    border-bottom: 3px solid var(--bsc-green);
    padding-bottom: 10px;
}

/* Shipping Summary Stats */
.shipping-boxes-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.shipping-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-item strong {
    display: block;
    color: var(--bsc-green);
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Shipping Boxes Table */
.shipping-boxes-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.shipping-boxes-table thead {
    background: linear-gradient(135deg, var(--bsc-green) 0%, var(--bsc-green-hover) 100%);
    color: white;
}

.shipping-boxes-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shipping-boxes-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.shipping-boxes-table tbody tr:hover {
    background-color: #f1f3f5;
}

.shipping-boxes-table tbody tr:last-child {
    border-bottom: none;
}

.shipping-boxes-table td {
    padding: 15px 10px;
    color: #495057;
    font-size: 14px;
}

.box-number {
    font-weight: bold;
    color: var(--bsc-green);
    font-size: 16px;
}

.box-type {
    font-weight: 600;
    color: #333;
}

.box-shipping-cost {
    color: var(--bsc-green);
    font-weight: bold;
    font-size: 15px;
}

.box-utilization {
    font-weight: 600;
}

/* Cart preview container styles */
#cart-preview-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Preview mode styling */
.preview-mode {
    opacity: 0.95;
}

.preview-mode .cart-table-container {
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.preview-mode table {
    margin-bottom: 0;
}

/* Hide quantity controls in preview mode */
.preview-mode .quantity-container {
    text-align: center;
}

.preview-mode .quantity-btn,
.preview-mode .remove-btn {
    display: none !important;
}

/* Style the quantity display in preview mode */
.preview-mode .quantity-container span {
    font-weight: bold;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    display: inline-block;
}

/* Smooth transitions */
#cart-table-wrapper {
    transition: all 0.3s ease;
}

/* Payment section spacing when cart is in preview */
#cart-preview-container + #shipping-calculation-section {
    margin-top: 30px;
}

/* Preview button active state */
.preview-toggle-btn[data-state="hidden"] {
    background-color: #4CAF50;
    color: white;
}



/* Cart content empty state when cart is moved */
#cartContent:empty {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
}

#cartContent:empty:after {
    content: "Cart moved to Payment Options preview";
}

/* Payment options expanded state */
#paymentOptions:not(.category-content-collapsed) {
    min-height: 400px;
    padding: 20px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
}

/* Cart Summary Box - Tab Style */
.cart-summary-box {
    background: white;
    border: 3px solid black;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    margin-top: 0;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    margin-left: auto;
    margin-right: 20px;
}

.cart-summary-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 3px;
    background: white;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.summary-table tbody tr:last-child {
    border-bottom: none;
}

.summary-table td {
    padding: 12px 8px;
    font-size: 16px;
}

.summary-table td:first-child {
    text-align: left;
    width: 50%;
}

.summary-table td:last-child {
    text-align: right;
    width: 50%;
    font-weight: 600;
}

/* Flash animation for total price */
@keyframes flashGreen {
    0% {
        color: inherit;
        transform: scale(1);
    }
    50% {
        color: var(--bsc-green);
        transform: scale(1.3);
        font-weight: 800;
    }
    100% {
        color: inherit;
        transform: scale(1);
    }
}

/* Flash animation for decrease (red) */
@keyframes flashRed {
    0% {
        color: inherit;
        transform: scale(1);
    }
    50% {
        color: #dc3545;
        transform: scale(1.3);
        font-weight: 800;
    }
    100% {
        color: inherit;
        transform: scale(1);
    }
}

.flash-total {
    animation: flashGreen 0.6s ease-in-out;
}

.flash-green {
    animation: flashGreen 0.6s ease-in-out;
}

.flash-red {
    animation: flashRed 0.6s ease-in-out;
}

/* Shipping Info Row — now a standalone <div> outside the table */
.shipping-info-row {
    background-color: #e2efda;
    border-top: 2px solid #217346;
    border-bottom: 2px solid #217346;
    padding: 15px 12px;
    font-size: 15px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.shipping-info-row strong {
    color: #217346;
    font-size: 16px;
}

.shipping-row-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.shipping-row-main {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    max-width: 100%;
    overflow: hidden;
}

/* Updated Breakdown Header Row */
.breakdown-header-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;

    color:#333;
}

.breakdown-totals-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: stretch;
}

.breakdown-totals {
    display: flex;
    gap: 15px;
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 2px solid #217346;
    flex-wrap: wrap;
    justify-content: flex-start;
    flex: 1 1 200px;
    min-width: 0;
}

/* Shipping Method Box */
.shipping-method-box {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 2px solid #217346;
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.shipping-method-header {
    font-weight: bold;
    color: #217346;
    font-size: 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid #217346;
    padding-bottom: 4px;
}

.shipping-method-options {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
}

.shipping-method-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
    transition: color 0.2s;
}

.shipping-method-label:hover {
    color: #217346;
}

.shipping-method-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.shipping-method-label input[type="radio"]:checked + span {
    color: #217346;
    font-weight: 600;
}

.shipping-method-cost {
    color: #666;
    font-weight: normal;
    margin-left: 4px;
}

.shipping-method-label input[type="radio"]:checked + span .shipping-method-cost {
    color: #217346;
    font-weight: 600;
}

/* Progress Bar - Smaller and Green-themed */
.shipping-progress-bar {
    background: linear-gradient(135deg, #217346 0%, #145c2c 100%);
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(33, 115, 70, 0.3);
    max-width: 400px;
    margin: 0 auto;
}

/* Remove old shipping options styles */
.shipping-options {
    display: none;
}

/* Shipping Boxes List */
.shipping-boxes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    align-items: stretch;
}

.box-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #217346;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(33, 115, 70, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    height:fit-content;
}

.box-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 115, 70, 0.25);
}

.box-item-header {
    font-weight: bold;
    color: #217346;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #217346;
    padding-bottom: 5px;
}

.box-item-detail {
    color: #555;
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.box-item-detail strong {
    color: #217346;
    font-weight: 600;
}

.box-item-shipping {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #217346;
    background: #f0f8f4;
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: -15px;
    padding: 10px 15px;
    border-radius: 0 0 6px 6px;
}

.box-item-shipping-cost {
    font-weight: bold;
    color: #217346;
    font-size: 15px;
}

.box-item-shipping-details {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

/* Cart Summary Box in Breakdown Area */
.cart-summary-breakdown {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #217346;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(33, 115, 70, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 300px;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.cart-summary-breakdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 115, 70, 0.25);
}

.cart-summary-breakdown-header {
    font-weight: bold;
    color: #217346;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #217346;
    padding-bottom: 5px;
}

.cart-summary-breakdown table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cart-summary-breakdown td {
    padding: 8px 5px;
    border-bottom: 1px solid #e2efda;
    color: #555;
}

.cart-summary-breakdown tr:nth-last-child(2) td {
    border-bottom: 2px solid #217346;
    padding-bottom: 10px;
}

.cart-summary-breakdown tr:last-child td {
    border-bottom: none;
    font-weight: bold;
    color: #217346;
    font-size: 15px;
    padding-top: 10px;
}

.cart-summary-breakdown td:first-child {
    text-align: left;
}

.cart-summary-breakdown td:last-child {
    text-align: right;
    font-weight: 600;
}

/* PayPal Breakdown Section — compact card by default; expands to full
   width when the debit/credit card form is active so the hosted iframes
   sit comfortably alongside the other cards. */
.paypal-breakdown-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #217346;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(33, 115, 70, 0.15);
    transition: flex 0.3s ease, max-width 0.3s ease, min-width 0.3s ease,
                transform 0.2s, box-shadow 0.2s;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 300px;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

/* Expanded state — toggled by JS when PayPal's card form is open.
   Grows just enough to fit the form, not full-width. */
.paypal-breakdown-section.paypal-expanded {
    flex: 1 1 400px;
    max-width: fit-content;
}

.paypal-breakdown-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 115, 70, 0.25);
}

.paypal-breakdown-header {
    font-weight: bold;
    color: #217346;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #217346;
    padding-bottom: 5px;
}

.paypal-breakdown-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#paypal-button-container-breakdown {
    min-height: 150px;
}

/* Hide original PayPal section when in breakdown */
.preview-mode ~ #payment-section {
    display: none;
}

/* Hide original cart summary in preview mode */
.preview-mode .cart-summary-box {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shipping-stats {
        flex-direction: column;
    }
    
    .shipping-boxes-table {
        font-size: 12px;
    }
    
    .shipping-boxes-table th,
    .shipping-boxes-table td {
        padding: 10px 5px;
    }
    
    .box-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .breakdown-header-row {
        flex-direction: column;
    }
    
    .breakdown-totals {
        width: 100%;
        flex: 1 1 100%;
    }
    
    .shipping-method-box {
        width: 100%;
        flex: 1 1 100%;
    }
    
    .shipping-method-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Cart summary box — full width on tablet */
    .cart-summary-box {
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
    }

    /* Cart summary breakdown cards — full width */
    .cart-summary-breakdown,
    .paypal-breakdown-section {
        max-width: 100%;
        flex: 1 1 100%;
    }
    .paypal-breakdown-section.paypal-expanded {
        max-width: 100%;
    }

    .shipping-row-main {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    /* Shipping section padding */
    .shipping-boxes-section {
        padding: 14px;
    }
    .shipping-boxes-header {
        font-size: 18px;
    }
    .stat-item span {
        font-size: 18px;
    }
    /* Shipping boxes table — horizontal scroll */
    .shipping-boxes-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Buttons full-width on mobile */
    .btn-calculate-shipping {
        width: 100%;
        padding: 14px 20px;
    }
    /* Cart preview */
    #cart-preview-container {
        padding: 12px;
    }
    /* Breakdown totals row */
    .breakdown-totals-row {
        flex-direction: column;
    }
    .breakdown-totals {
        flex: 1 1 100%;
    }
    /* Shipping progress bar */
    .shipping-progress-bar {
        max-width: 100%;
    }
    /* Shipping info row */
    .shipping-info-row {
        padding: 12px 8px;
        font-size: 13px;
    }
    .shipping-boxes-list {
        flex-direction: column;
    }
    .box-item {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .box-item {
        flex: 0 1 calc(50% - 10px);
    }
}

/* ============================================
   Delivery Timeline Styles
   ============================================ */
.delivery-timeline {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8faf8, #eef5ee);
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.delivery-timeline .timeline-header {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a5d6a7;
}

.delivery-timeline .timeline-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 0 10px;
}

.delivery-timeline .timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    min-width: 0;
    padding: 0 5px;
    opacity: 0.45;
    transition: opacity 0.4s ease;
}

.delivery-timeline .timeline-step.active {
    opacity: 1;
}

.delivery-timeline .timeline-connector {
    position: absolute;
    top: 18px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: #a5d6a7;
    z-index: 0;
}

.delivery-timeline .timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1;
    position: relative;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.delivery-timeline .timeline-step.active .timeline-icon {
    background: #e8f5e9;
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.35);
}

.delivery-timeline .timeline-label {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    max-width: 140px;
    word-wrap: break-word;
}

.delivery-timeline .timeline-date {
    margin-top: 4px;
    font-size: 11px;
    color: #666;
    font-weight: 500;
    line-height: 1.3;
}

.delivery-timeline .timeline-breakdown-summary {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.delivery-timeline .timeline-breakdown-summary p {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.delivery-timeline .timeline-breakdown-summary strong {
    color: #2e7d32;
}

/* Responsive timeline for small screens */
@media (max-width: 600px) {
    .delivery-timeline .timeline-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 0;
    }

    .delivery-timeline .timeline-step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 12px;
        width: 100%;
    }

    .delivery-timeline .timeline-connector {
        display: none;
    }

    .delivery-timeline .timeline-label {
        margin-top: 0;
        max-width: none;
    }

    .delivery-timeline .timeline-date {
        margin-top: 0;
        margin-left: auto;
        white-space: nowrap;
    }
}

/* Shipping row cost highlight */
#shipping-row-cost {
    font-weight: 600;
    font-size: 18px;
    color: #217346;
}

/* Shipping boxes breakdown — constrain to table width */
.shipping-boxes-breakdown {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.breakdown-totals-row {
    max-width: 100%;
}

/* ── Cart table containment — prevent overflow at any zoom level ─────────── */
#cart-table {
    width: 100%;
    table-layout: auto;
}
#cart-table th,
#cart-table td {
    white-space: nowrap;
}
#cart-table td.item-weight,
#cart-table td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
}
#cart-table .product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* ── Tablet — shrink table text, tighten padding ─────────────────────────── */
@media (max-width: 900px) {
    #cart-table {
        font-size: 0.88rem;
    }
    #cart-table th,
    #cart-table td {
        padding: 6px 6px;
    }
    #cart-table .product-image img {
        width: 48px;
        height: 48px;
    }
}

/* ── Mobile — convert cart table rows to stacked cards ───────────────────── */
@media (max-width: 600px) {
    #cart-table,
    #cart-table thead,
    #cart-table tbody,
    #cart-table tr,
    #cart-table th,
    #cart-table td {
        display: block;
        width: 100%;
    }
    #cart-table thead tr {
        display: none;  /* hide column headers */
    }
    #cart-table tbody tr {
        background: var(--bsc-surface);
        border: 2px solid var(--bsc-border);
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
        display: grid;
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto;
        gap: 4px 12px;
        align-items: center;
    }
    /* Image — top-left */
    #cart-table tbody tr td.product-image {
        grid-row: 1 / 3;
        grid-column: 1;
        border: none;
        padding: 0;
    }
    /* Product name — top-right */
    #cart-table tbody tr td:nth-child(2) {
        grid-row: 1;
        grid-column: 2;
        border: none;
        padding: 0;
        font-weight: 600;
        font-size: 0.95rem;
    }
    /* Price — below name */
    #cart-table tbody tr td.item-price {
        grid-row: 2;
        grid-column: 2;
        border: none;
        padding: 0;
        color: #555;
    }
    /* Total, Weight, Quantity, Action — full-width rows at bottom */
    #cart-table tbody tr td.item-total,
    #cart-table tbody tr td.item-weight,
    #cart-table tbody tr td.quantity-container,
    #cart-table tbody tr td:last-child {
        grid-column: 1 / -1;
        border: none;
        border-top: 1px solid #eee;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    #cart-table tbody tr td.item-total::before { content: "Total: "; font-weight: 600; color: #555; }
    #cart-table tbody tr td.item-weight::before { content: "Weight: "; font-weight: 600; color: #555; }
    #cart-table tbody tr td.quantity-container::before { content: "Qty: "; font-weight: 600; color: #555; }
    #cart-table tbody tr td:last-child::before { content: ""; }

    .cart-summary-box {
        max-width: 100%;
        margin-right: 0;
        padding: 14px;
    }
    .box-item {
        min-width: 0;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .cart-summary-breakdown,
    .paypal-breakdown-section {
        min-width: 0;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .paypal-breakdown-section.paypal-expanded {
        min-width: 0;
    }
    .shipping-boxes-section {
        padding: 14px;
    }
    .summary-table td {
        font-size: 14px;
        padding: 8px 4px;
    }
    .shipping-stats {
        gap: 10px;
    }
    .stat-item span {
        font-size: 18px;
    }
    .btn-calculate-shipping {
        width: 100%;
        padding: 12px 16px;
    }
}

/* ── Max Purchase Quantity ── */

/* Disabled "+" button when item is at max quantity */
.quantity-btn.qty-btn-disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
    font-size: 14px;
}

/* Small tag showing the max limit message */
.max-quantity-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    white-space: nowrap;
    vertical-align: middle;
    animation: fadeInTag 0.3s ease;
}

@keyframes fadeInTag {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Out of Stock / Low Stock Tags ── */

/* Shared base for stock tags (appears next to product name) */
.out-of-stock-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    vertical-align: middle;
    animation: fadeInTag 0.3s ease;
}

/* Completely out of stock — red */
.out-of-stock-tag.no-stock-tag {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Low stock / quantity meets stock — orange */
.out-of-stock-tag.low-stock-tag {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
}

/* Dim the entire row when fully out of stock */
.out-of-stock-row {
    opacity: 0.55;
}

.out-of-stock-row td {
    text-decoration: line-through;
    text-decoration-color: rgba(0, 0, 0, 0.3);
}

/* Don't strike through the action/remove button or stock tag */
.out-of-stock-row .remove-btn,
.out-of-stock-row .out-of-stock-tag,
.out-of-stock-row .quantity-container {
    text-decoration: none;
}
