/* Styles for Woo Floating Cart */

/* Floating Cart Trigger (Shortcode Style) */
.wfc-trigger-shortcode {
    display: inline-block;
    cursor: pointer;
    /* Removed fixed positioning so it sits where the shortcode is placed */
}

.icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: black;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Modal Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none; /* Hidden by default */
    justify-content: flex-end; /* Aligns modal to the right */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.open {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.cart-modal {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-overlay.open .cart-modal {
    transform: translateX(0);
}

/* Header */
.cart-header {
    background-color: #444; /* Dark gray */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Body (Scrollable List) */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Cart Item */
.cart-item {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid #eaeaea;
}

.item-image img {
    width: 70px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
    padding-right: 20px; /* Space for delete button */
}

.item-title a {
    text-decoration: none;
    color: inherit;
}

.item-meta {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #777;
}

.item-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.item-qty {
    font-size: 13px;
    color: #333;
}

.qty-box {
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-left: 5px;
    color: #666;
}

.item-price {
    font-weight: 700;
    color: #444;
    font-size: 15px;
}

.remove-item-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    text-decoration: none; /* In case it's an anchor */
}

/* Footer */
.cart-footer {
    background-color: #f8f9fa; /* Matches body bg */
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.totals-container {
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 14px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 500;
}

.price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-value {
    color: #00a651; /* Green color */
    font-weight: 700;
    font-size: 16px;
}

.installment-info {
    font-size: 11px;
    color: #888;
}

.checkout-button {
    width: 100%;
    background-color: #444;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    transition: background-color 0.2s;
    text-decoration: none;
}

.checkout-button:hover {
    background-color: #333;
    color: white;
}

.empty-cart-message {
    text-align: center;
    color: #666;
    margin-top: 50px;
}
