/* Cart Drawer - Slide-in Panel */

/* Header Cart Icon */
.fc-header-cart {
    display: flex;
    align-items: center;
    margin-left: 15px;
    cursor: pointer;
    position: relative;
}

.fc-header-cart svg {
    width: 22px;
    height: 22px;
    fill: #53242c;
    transition: fill 0.2s ease;
}

.fc-header-cart:hover svg {
    fill: #e97a9c;
}

.fc-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e97a9c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}

.fc-cart-badge:empty,
.fc-cart-badge[data-count="0"] {
    display: none;
}

/* Overlay */
.fc-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(83, 36, 44, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Drawer */
.fc-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100%;
    background: #faf8f5;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(83, 36, 44, 0.15);
}

.fc-cart-drawer.active {
    transform: translateX(0);
}

/* Drawer Header */
.fc-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(83, 36, 44, 0.1);
    background: #fff;
}

.fc-cart-drawer-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #53242c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-cart-drawer-count {
    background: #e97a9c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.fc-cart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #53242c;
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-cart-drawer-close:hover {
    color: #e97a9c;
}

/* Drawer Body */
.fc-cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

/* Cart Item */
.fc-cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(83, 36, 44, 0.08);
    position: relative;
}

.fc-cart-item:last-child {
    border-bottom: none;
}

.fc-cart-item-img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.fc-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fc-cart-item-info {
    flex: 1;
    min-width: 0;
}

.fc-cart-item-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #53242c;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fc-cart-item-name a {
    color: inherit;
    text-decoration: none;
}

.fc-cart-item-name a:hover {
    color: #e97a9c;
}

.fc-cart-item-price {
    font-family: 'Spartan', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #e97a9c;
    margin-bottom: 8px;
}

.fc-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
}

.fc-cart-item-qty button {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(83, 36, 44, 0.2);
    background: #fff;
    color: #53242c;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.fc-cart-item-qty button:first-child {
    border-radius: 4px 0 0 4px;
}

.fc-cart-item-qty button:last-child {
    border-radius: 0 4px 4px 0;
}

.fc-cart-item-qty button:hover {
    background: #e97a9c;
    color: #fff;
    border-color: #e97a9c;
}

.fc-cart-item-qty span {
    width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(83, 36, 44, 0.2);
    border-bottom: 1px solid rgba(83, 36, 44, 0.2);
    font-family: 'Spartan', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #53242c;
    background: #fff;
}

.fc-cart-item-remove {
    position: absolute;
    top: 16px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(83, 36, 44, 0.4);
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s ease;
    line-height: 1;
}

.fc-cart-item-remove:hover {
    color: #e97a9c;
}

/* Empty Cart */
.fc-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.fc-cart-empty svg {
    width: 64px;
    height: 64px;
    fill: rgba(83, 36, 44, 0.2);
    margin-bottom: 20px;
}

.fc-cart-empty p {
    font-family: 'Spartan', sans-serif;
    font-size: 15px;
    color: rgba(83, 36, 44, 0.5);
    margin: 0;
}

/* Drawer Footer */
.fc-cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(83, 36, 44, 0.1);
    background: #fff;
}

/* Coupon */
.fc-cart-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.fc-cart-coupon input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(83, 36, 44, 0.2);
    border-radius: 6px;
    font-family: 'Spartan', sans-serif;
    font-size: 13px;
    color: #53242c;
    background: #faf8f5;
    outline: none;
    transition: border-color 0.2s ease;
}

.fc-cart-coupon input:focus {
    border-color: #e97a9c;
}

.fc-cart-coupon input::placeholder {
    color: rgba(83, 36, 44, 0.4);
}

.fc-cart-coupon button {
    padding: 10px 18px;
    background: #53242c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.fc-cart-coupon button:hover {
    background: #6b3038;
}

.fc-cart-coupon-msg {
    font-size: 12px;
    margin: -8px 0 12px;
    font-family: 'Spartan', sans-serif;
}

.fc-cart-coupon-msg.success {
    color: #28a745;
}

.fc-cart-coupon-msg.error {
    color: #dc3545;
}

/* Totals */
.fc-cart-totals {
    margin-bottom: 16px;
}

.fc-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-family: 'Spartan', sans-serif;
    font-size: 14px;
    color: #53242c;
}

.fc-cart-total-row.grand-total {
    font-size: 17px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 2px solid rgba(83, 36, 44, 0.1);
    margin-top: 4px;
}

.fc-cart-total-row .amount {
    font-weight: 700;
    color: #e97a9c;
}

.fc-cart-total-row.grand-total .amount {
    color: #53242c;
}

.fc-cart-discount {
    color: #28a745;
}

.fc-cart-discount .amount {
    color: #28a745 !important;
}

.fc-cart-remove-coupon {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
    text-decoration: underline;
}

/* Checkout Button */
.fc-cart-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #e97a9c, #d4627e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(233, 122, 156, 0.3);
}

.fc-cart-checkout-btn:hover {
    background: linear-gradient(135deg, #d4627e, #c5516e);
    box-shadow: 0 6px 16px rgba(233, 122, 156, 0.4);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Loading state */
.fc-cart-drawer.loading .fc-cart-drawer-body {
    opacity: 0.5;
    pointer-events: none;
}

.fc-cart-item.updating {
    opacity: 0.5;
    pointer-events: none;
}

/* Scrollbar */
.fc-cart-drawer-body::-webkit-scrollbar {
    width: 4px;
}

.fc-cart-drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.fc-cart-drawer-body::-webkit-scrollbar-thumb {
    background: rgba(83, 36, 44, 0.2);
    border-radius: 4px;
}

/* Mobile */
@media (max-width: 480px) {
    .fc-cart-drawer {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .fc-cart-drawer-body {
        padding: 12px 16px;
    }

    .fc-cart-drawer-header,
    .fc-cart-drawer-footer {
        padding: 16px;
    }
}
