/* Floating Cart Button */
.cart-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #FF0000;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.cart-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

.cart-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-fab svg {
    color: white;
    width: 28px;
    height: 28px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: white;
    color: #FF0000;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- Sidebar Styles --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

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

/* Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #EEE;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    color: #FFF;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-close {
    background: none;
    border: none;
    color: #FFF;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.cart-close:hover {
    color: #FF0000;
}

/* Body */
.cart-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}



.empty-msg {
    color: #888;
    font-size: 1rem;
    text-align: center;
    margin-top: 50px;
}

/* Cart Items in Sidebar */
.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #888;
}

.cart-item-remove {
    color: #FF0000;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin-top: 5px;
    text-decoration: underline;
}

/* Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #EEE;
    background: #F9F9F9;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #FF0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* --- Product Card Styles (New) --- */
.product-card {
    background: #111;
    /* Dark card bg */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img-link {
    display: block;
    width: 100%;
    aspect-ratio: 4/5;
    /* Keep vertical ratio */
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    background: #111;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #FFF;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #FF0000;
}

.product-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFF;
}

.add-btn {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.add-btn:hover {
    background-color: #CC0000;
}

.add-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 300px;
    }
}