.atomizer-out-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f5e3df, #ecd0c8);
    color: #6e2e1f;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    padding: 4px 10px;
    margin-left: 8px;
    margin-bottom: 2px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(166, 74, 58, 0.15);
    border: 1.5px solid #c9988e;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    animation: pulse-subtle 2s ease-in-out infinite;
}

.atomizer-out-pill::before {
    content: '✕';
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    color: #a64a3a;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(220, 53, 69, 0.15);
    }
    50% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
    }
}
/* Out of Stock Badge and Reason Styling */
.stock-status {
    margin-top: 10px;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5e3df;
    color: #6e2e1f;
    font-weight: 700;
    font-size: 13px;
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid #c9988e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.stock-badge-title {
    white-space: nowrap;
}

.stock-badge i {
    font-size: 1.1em;
    vertical-align: middle;
}
.stock-badge-reason {
    margin-top: 6px;
    font-weight: 600;
    font-size: 12px;
    color: #6e2e1f;
    opacity: 0.9;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.overlay-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
    z-index: 50;
}

.no-scroll {
    overflow: hidden;
}

body { background: #fff; }

.shopping-cart {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
}

.cart-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    font-family: 'Playfair Display', serif;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cart-table th,
.cart-table td {
    text-align: center;
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
}

.cart-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.cart-table td:nth-child(2) {
    text-align: left;
    padding-left: 10px;
}

.product-image {
    width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-image:hover {
    transform: scale(1.05);
    opacity: 0.8;
    cursor: pointer;
}

.product-details {
    text-align: left;
    vertical-align: top;
    padding: 10px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.product-name-cell a:hover .product-name {
    color: #666;
    cursor: pointer;
}

.product-brand,
.product-size {
    font-size: 14px;
    color: #666;
    font-family: 'Montserrat', sans-serif;
}

.product-atomizer {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.35;
}

.atomizer-name {
    font-size: 16px;
    font-weight: 500;
    color: #2f3742;
}

.atomizer-price {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.product-price,
.item-total {
    font-size: 18px;
    margin-bottom: 12px;
    font-family: 'Montserrat', sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.product-price {
    color: #2d343b;
    font-weight: 600;
}

.item-total {
    font-weight: 700;
    color: #1f252b;
}

.product-price del,
.atomizer-price del {
    color: #8a8a8a;
    font-size: 0.85em;
    font-weight: 500;
}

.sale-price {
    color: #1f252b;
    font-weight: 700;
}

.quantity-control {
    align-items: center;
    vertical-align: middle;
}

.quantity-btn,
.quantity-input {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    background-color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    line-height: 35px;
    transition: background-color 0.3s ease;
}


.quantity-input {
    width: 50px;
    height: 35px;
    text-align: center;
    font-size: 16px;
    padding: 0;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Fix quantity controls layout: flexbox, gap, center */
.quantity-control {
     display: flex;
     flex-direction: row;
     align-items: center;
     justify-content: center;
     gap: 8px;
}

.quantity-btn {
     min-width: 30px;
     height: 30px;
     font-size: 18px;
     font-weight: bold;
     padding: 0;
     margin: 0;
     border: 1px solid #d4c4b8;
     border-radius: 4px;
     background-color: transparent;
     cursor: pointer;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     line-height: 1;
     color: #555;
     transition: background-color 0.2s ease, color 0.2s ease;
}

.quantity-btn:hover {
     background-color: #3d2f1a;
     border-color: #3d2f1a;
     color: #fff;
}

.quantity-input {
     width: 40px;
     height: 30px;
     font-size: 16px;
     margin: 0;
     padding: 0;
     text-align: center;
     border: none;
     background-color: transparent;
     -webkit-appearance: none;
     -moz-appearance: textfield;
     appearance: none;
     pointer-events: none;
}

.btn-remove {
    background-color: transparent;
    color: #8a7060;
    border: 1px solid #d4c4b8;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-remove:hover {
    background-color: #a64a3a;
    border-color: #a64a3a;
    color: #fff;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 20px 30px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.cart-footer h4 {
    font-size: 22px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cart-footer span#cart-total {
    font-weight: 700;
    color: #111;
    font-family: 'Montserrat', sans-serif;
    font-variant-numeric: tabular-nums;
}

.btn-checkout {
    background-color: #3d2f1a;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-checkout:hover {
    background-color: #c9a02c;
    border-color: #c9a02c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
} 

.btn-checkout:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-checkout:disabled:hover {
    background-color: #ccc;
    color: #888;
}

.concentration-badge {
    display: inline;
    font-size: 0.75em;
    font-weight: 400;
    margin-left: 6px;
    color: #888;
    font-family: 'Montserrat', sans-serif;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .shopping-cart {
        margin: 5px;
        padding: 10px;
        box-shadow: none;
        border-radius: 0;
    }

    .cart-title {
        font-size: 22px;
        margin-bottom: 15px;
        text-align: center;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody {
        display: block;
        width: 100%;
    }

    /* Card layout */
    .cart-table tr {
        display: grid;
        grid-template-columns: 110px 1fr;
        column-gap: 8px;
        border: 1px solid #ebebeb;
        margin-bottom: 14px;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .cart-table td {
        display: block;
        border: none;
        padding: 0;
        font-size: 14px;
    }

    /* Image: tall left strip */
    .cart-table td:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / 9;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

    .cart-table td:nth-child(1) a {
        display: flex !important;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center;
    }

    .product-image {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    /* Right side: everything stacked */
    .cart-table td:nth-child(2),
    .cart-table td:nth-child(3),
    .cart-table td:nth-child(4),
    .cart-table td:nth-child(5),
    .cart-table td:nth-child(6),
    .cart-table td:nth-child(7),
    .cart-table td:nth-child(8) {
        display: none; /* hidden by default, shown via wrapper below */
    }

    /* Use a pseudo-wrapper approach — show cells as stacked inside a right column */
    .cart-table td:nth-child(2) {
        display: block;
    }

    .cart-table td:nth-child(3),
    .cart-table td:nth-child(4),
    .cart-table td:nth-child(5),
    .cart-table td:nth-child(6),
    .cart-table td:nth-child(7),
    .cart-table td:nth-child(8) {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
    }



    .cart-table td:nth-child(2) {
        grid-column: 2;
        padding: 12px 12px 4px 4px;
    }

    .cart-table td:nth-child(3),
    .cart-table td:nth-child(4),
    .cart-table td:nth-child(5),
    .cart-table td:nth-child(6),
    .cart-table td:nth-child(7) {
        grid-column: 2;
        padding: 3px 12px;
        border-top: none;
    }

    .cart-table td:nth-child(8) {
        grid-column: 2;
        padding: 8px 12px 12px;
    }

    .cart-table td:nth-child(1):before,
    .cart-table td:nth-child(2):before,
    .cart-table td:nth-child(8):before { display: none; }

    .cart-table td:nth-child(3):before { content: "Size"; }
    .cart-table td:nth-child(4):before { content: "Atomizer"; }
    .cart-table td:nth-child(5):before { content: "Price"; }
    .cart-table td:nth-child(6):before { content: "Qty"; }
    .cart-table td:nth-child(7):before { content: "Total"; }

    .cart-table td:nth-child(3):before,
    .cart-table td:nth-child(4):before,
    .cart-table td:nth-child(5):before,
    .cart-table td:nth-child(6):before,
    .cart-table td:nth-child(7):before {
        position: static;
        width: 58px;
        flex-shrink: 0;
        font-size: 11px;
        font-weight: 400;
        color: #aaa;
    }

    .cart-table td:nth-child(7) {
        font-size: 15px;
        font-weight: 700;
        color: #111;
        padding-top: 6px;
        margin-top: 2px;
        border-top: 1px solid #f0f0f0 !important;
    }

    .cart-table td:nth-child(7):before {
        font-size: 11px;
        font-weight: 400;
        color: #aaa;
        align-self: center;
    }

    .product-name {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 2px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
    }

    .product-brand {
        font-size: 12px;
        color: #888;
    }

    .atomizer-name {
        font-size: 14px;
    }

    .atomizer-price,
    .product-price,
    .item-total {
        font-size: 15px;
    }

    .quantity-control {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
        border-radius: 4px;
        border: 1px solid #ddd;
        background: #f5f5f5;
        color: #333;
    }

    .quantity-input {
        width: 36px;
        height: 28px;
        font-size: 14px;
        text-align: center;
        border-radius: 4px;
        border: 1px solid #ddd;
    }

    .btn-remove {
        width: 100%;
        padding: 9px;
        font-size: 13px;
        margin-top: 0;
        border-radius: 0 0 8px 8px;
    }

    .cart-footer {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        gap: 12px;
    }

    .cart-footer h4 {
        font-size: 20px;
        margin-bottom: 0;
    }

    .btn-checkout {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
}

/* Portrait phones and very small devices */
@media (max-width: 414px) {
    .shopping-cart {
        margin: 2px;
        padding: 8px;
    }

    .cart-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .cart-table tr {
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 6px;
    }

    .cart-table td {
        padding: 4px 0;
        padding-left: 28%;
        font-size: 13px;
        line-height: 1.4;
    }

    .cart-table td:before {
        width: 26%;
        font-size: 11px;
        line-height: 1.4;
    }

    /* Product image for very small screens */
    .cart-table td:nth-child(1) {
        padding: 0;
    }

    /* Product details for very small screens */
    .cart-table td:nth-child(2) {
        padding: 5px 0;
    }

    .product-name {
        font-size: 13px;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .product-brand {
        font-size: 11px;
    }

    .concentration-badge {
        font-size: 0.7em;
    }

    /* Compact quantity controls */
    .quantity-control {
        gap: 6px;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .quantity-input {
        width: 40px;
        height: 28px;
        font-size: 12px;
    }

    /* Compact remove button */
    .btn-remove {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 4px;
    }

    /* Compact cart footer */
    .cart-footer {
        padding: 15px 0;
    }

    .cart-footer h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .btn-checkout {
        padding: 10px;
        font-size: 13px;
        border-radius: 6px;
    }
}
