/* Side Cart styles */
.side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-cart-drawer.active {
    right: 0;
}

.side-cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.side-cart-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.side-cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    color: #666;
}

.side-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.side-cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-cart-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.side-cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.side-cart-item-img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    background: #f9f9f9;
}

.side-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.side-cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.side-cart-item-title {
    font-weight: 500;
    margin-bottom: 0;
    display: block;
    text-decoration: none;
    color: #000;
    font-size: 0.85rem;
    line-height: 1.3;
    padding-right: 10px;
}

.side-cart-item-remove-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.side-cart-item-remove-btn:hover {
    color: #dc3545;
}

.side-cart-item-details-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
}

.side-cart-detail-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.side-cart-label {
    font-size: 0.65rem;
    color: #888;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-cart-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.side-cart-line-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
}

.side-cart-qty-control {
    display: flex;
    align-items: center;
    background: transparent;
    height: 24px;
}

.side-cart-qty-control button {
    width: 20px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #666;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.side-cart-qty-control button:hover {
    color: #000;
}

.side-cart-qty-control span.qty-val {
    min-width: 20px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fdfdfd;
}

/* Coupon Area */
.side-cart-coupon-area {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #eee;
}

.side-cart-coupon-form {
    display: flex;
    gap: 8px;
}

.side-cart-coupon-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    outline: none;
}

.side-cart-coupon-input:focus {
    border-color: #000;
}

.side-cart-coupon-btn {
    padding: 8px 16px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.side-cart-coupon-btn:hover {
    background: #000;
}

.side-cart-coupon-msg {
    font-size: 0.75rem;
    margin-top: 5px;
    min-height: 1rem;
}

/* Summary Group */
.side-cart-summary-group {
    margin-bottom: 20px;
}

.side-cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #444;
}

.side-cart-summary-line.discount-line {
    border-top: 1px solid #f9f9f9;
    padding-top: 8px;
}

.side-cart-summary-line.total-line {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #000;
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
}

.discount-info small {
    font-size: 0.75rem;
    display: block;
    line-height: 1.2;
    font-weight: normal;
}

.text-danger { color: #dc3545; }
.text-success { color: #198754; }
.text-info { color: #0dcaf0; }
.text-muted { color: #888; }


.side-cart-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-side-cart {
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-view-cart {
    background: #f0f0f0;
    color: #333;
}

.btn-view-cart:hover {
    background: #e0e0e0;
}

.btn-checkout {
    background: #000;
    color: #fff;
}

.btn-checkout:hover {
    background: #333;
}

/* Loading state */
.side-cart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    color: #888;
}

.empty-side-cart {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-side-cart i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

@media (max-width: 480px) {
    .side-cart-drawer {
        width: 100%;
        right: -100%;
    }
}

.d-none {
    display: none !important;
}

.btn-link {
    color: #000;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--accent);
}
