/* 
    Norica Shopping Cart Styles - Organic Shop Astra Theme
    Primary Color: #8bc34a
    Secondary/Hover: #6a9739
*/

.os-cart-page {
    font-family: 'Open Sans', sans-serif;
    color: #333333;
    padding: 60px 0;
    background-color: #ffffff;
}

.os-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.os-cart-heading {
    font-family: 'Merriweather', serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #111111;
}

/* Layout */
.os-cart-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.os-cart-main {
    flex: 1;
    min-width: 0;
    /* allows flex min-width wrapping properly */
}

.os-cart-sidebar {
    width: 380px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .os-cart-sidebar {
        width: 100%;
    }
}

/* Cart Table */
.os-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.os-cart-table th {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #111111;
    text-align: left;
    padding: 15px 10px;
    border-bottom: 1px solid #eaeaea;
}

.os-cart-table td {
    padding: 20px 10px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
}

/* Columns sizes */
.os-th-remove {
    width: 40px;
}

.os-th-thumb {
    width: 100px;
}

.os-th-price,
.os-th-qty,
.os-th-subtotal {
    width: 15%;
}

/* Remove Button */
.os-btn-remove {
    background: transparent;
    border: 2px solid #ccc;
    color: #ccc;
    font-size: 20px;
    line-height: 20px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.os-btn-remove:hover {
    border-color: #ff5a44;
    color: #ff5a44;
}

/* Product Thumbnail */
.os-td-thumb img {
    width: 80px;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Product Name */
.os-product-link {
    color: #8bc34a;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s;
}

.os-product-link:hover {
    color: #6a9739;
}

.os-variation-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.os-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
}

.os-badge--danger {
    background: #ffebe8;
    color: #ff5a44;
}

/* Price */
.os-price,
.os-row-total {
    font-weight: 600;
    color: #333;
}

.os-old-price {
    font-size: 14px;
    color: #999;
    margin-left: 5px;
}

/* Qty Stepper */
.os-qty-stepper {
    display: inline-flex;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    height: 32px;
}

.os-qty-btn {
    background: #f8f6f3;
    border: none;
    width: 20px;
    padding: 0 15px;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    transition: background 0.2s;
}

.os-qty-btn:hover {
    background: #eaeaea;
}

.os-qty-input {
    width: 42px;
    min-width: 42px;
    text-align: center;
    border: none;
    border-left: 1px solid #eaeaea;
    border-right: 1px solid #eaeaea;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ── Max stock reached feedback ── */
.os-qty-at-max {
    background-color: #ffebe8 !important;
    color: #ff5a44 !important;
    border-color: #ff5a44 !important;
    cursor: not-allowed;
}

/* Totals Box */
.os-cart-totals,
.os-coupon-box {
    border: 1px solid #eaeaea;
    padding: 30px;
    border-radius: 6px;
    background-color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.os-totals-title,
.os-coupon-title {
    font-family: 'Merriweather', serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #111111;
    border-bottom: 2px solid #f8f6f3;
    padding-bottom: 15px;
}

.os-totals-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border: none !important;
}

.os-totals-table tr,
.os-totals-table th,
.os-totals-table td {
    padding: 15px 10px;
    border: none !important;
}

.os-totals-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
}

.os-totals-table td {
    text-align: right;
    color: #111;
}

.os-totals-discount th,
.os-totals-discount td {
    color: #ff5a44;
}

.os-coupon-pill {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
    color: #555;
    font-family: 'Open Sans', sans-serif;
    font-weight: normal;
}

.os-totals-total th,
.os-totals-total td {
    border-top: 2px solid #f8f6f3 !important;
    padding-top: 20px;
}

.os-totals-total th {
    font-size: 18px;
}

.os-totals-total td strong {
    font-size: 22px;
    color: #8bc34a;
}

/* Proceed to checkout button */
.os-btn-checkout {
    display: block;
    width: 100%;
    background-color: #8bc34a;
    color: #ffffff;
    padding: 18px 20px;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.os-btn-checkout:hover {
    background-color: #6a9739;
}

.os-btn-checkout.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Coupon Box */
.os-coupon-row {
    display: flex;
    gap: 10px;
}

.os-coupon-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    font-size: 14px;
    background: #f8f6f3;
}

.os-coupon-input:focus {
    outline: none;
    border-color: #8bc34a;
    background: #fff;
}

.os-coupon-btn {
    background-color: #8bc34a;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.os-coupon-btn:hover {
    background-color: #6a9739;
}

.os-coupon-error {
    color: #ff5a44;
    font-size: 14px;
    margin-bottom: 15px;
}

.os-coupon-success {
    color: #8bc34a;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Empty Cart */
.os-empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: #fcfcfc;
    border: 2px dashed #eaeaea;
    border-radius: 8px;
}

.os-empty-icon {
    color: #ccc;
    margin-bottom: 20px;
}

.os-empty-text {
    font-size: 20px;
    font-family: 'Merriweather', serif;
    color: #666;
    margin-bottom: 30px;
}

.os-btn-return {
    display: inline-block;
    background-color: #8bc34a;
    color: #fff;
    padding: 15px 30px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.os-btn-return:hover {
    background-color: #6a9739;
    color: #fff;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
    .os-cart-table thead {
        display: none;
    }

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

    .os-cart-table tr {
        margin-bottom: 20px;
        border: 1px solid #eaeaea;
        padding: 15px;
        position: relative;
    }

    .os-cart-table td {
        border-bottom: none;
        padding: 10px 0;
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .os-cart-table td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #111;
        margin-right: 10px;
    }

    .os-td-remove {
        position: absolute;
        top: 15px;
        right: 15px;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
    }

    .os-td-remove::before {
        display: none;
    }

    .os-td-thumb {
        display: flex;
        justify-content: center !important;
        padding-top: 20px !important;
    }

    .os-td-thumb::before {
        display: none;
    }

    .os-td-thumb img {
        width: 100px;
    }

    .os-td-name {
        text-align: left !important;
        justify-content: flex-start !important;
        flex-direction: column;
        align-items: flex-start !important;
    }

    .os-td-name::before {
        display: none;
    }

    .os-cart-sidebar {
        width: 100%;
    }
}