:root {
    --primary-book: var(--primary-color, #C92127);
    --accent-book: var(--accent-color, #FF8C00);
    --text-dark-book: var(--text-dark, #1F2937);
    --bg-light-book: var(--bg-light, #F9FBF9);
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --white: #ffffff;
}

/* Mini Cart Modern Design */
.shopping-cart {
    background: var(--white);
    width: 500px;
    height: 100vh;
    position: fixed;
    /* top: 0; */
    right: -500px;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    z-index: 10000;
}

.shopping-cart.active {
    right: 0;
}

.shopping-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.shopping-cart-header .cart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark-book);
    margin: 0;
}

.shopping-cart-header #close-minicart {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f1f5f9;
    color: var(--text-muted);
    transition: all 0.2s;
}

.shopping-cart-header #close-minicart:hover {
    background: #fee2e2;
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Mini Cart List */
.mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.mini-cart::-webkit-scrollbar {
    width: 4px;
}

.mini-cart::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.mini-cart li {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.itemside {
    display: flex;
    gap: 1rem;
    text-decoration: none;
}

.itemside .aside {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.itemside .aside img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.itemside .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.itemside .info .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark-book);
    line-height: 1.4;
    /* height: 2.8em; */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: none;
}

.itemside .info .title:hover {
    color: var(--primary-color);
}

.itemside .info .price-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.price-qty .price {
    font-weight: 700;
    color: var(--primary-color);
}

.price-qty .qty {
    color: var(--text-muted);
}

/* Mini Cart Summary */
.shopping-cart-footer {
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    margin-top: auto;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.summary-total .label {
    font-weight: 600;
    color: var(--text-muted);
}

.summary-total .value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.cart-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cart-buttons a {
    padding: 0.75rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.btn-view-cart {
    background: #f1f5f9;
    color: var(--text-dark-book);
    border: 1px solid var(--border-color);
}

.btn-view-cart:hover {
    background: #e2e8f0;
    border-color: var(--text-muted);
}

.btn-checkout-now {
    background: var(--primary-color);
    color: var(--white);
    border: none;
}

.btn-checkout-now:hover {
    background: var(--hover-color);
    color: var(--white); /* Ensure white text on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 33, 39, 0.2);
}

/* Scroll context */
.mini-cart-count-info {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Mini Qty Control */
.qty-mini-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-mini-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark-book);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.qty-mini-btn:hover {
    background: var(--primary-book);
    color: var(--white);
    border-color: var(--primary-book);
}

.qty-mini-val {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
    color: var(--primary-book);
}

/* Responsive */
@media (max-width: 576px) {
    .shopping-cart {
        width: 100%;
        right: -100%;
    }
}
