/* Aiwox Fast Cart Styles */
.afc-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.afc-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.afc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}
.afc-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}
.afc-close-btn {
    background: none; border: none;
    font-size: 28px; cursor: pointer;
    color: #888; transition: 0.2s;
    line-height: 1;
}
.afc-close-btn:hover { color: #000; }

.afc-cart-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}
.afc-cart-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Items */
.afc-cart-items {
    list-style: none; margin: 0; padding: 0;
}
.afc-item {
    display: flex;
    position: relative;
    padding-bottom: 20px; margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.afc-item-img {
    flex: 0 0 70px;
    margin-right: 15px;
}
.afc-item-img img {
    width: 100%; height: auto; border-radius: 4px;
}
.afc-item-details {
    flex-grow: 1;
    padding-right: 25px;
}
.afc-item-details a {
    color: #333; text-decoration: none; font-weight: 500;
    display: block; margin-bottom: 5px;
}
.afc-item-price-qty {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px;
}
.afc-remove {
    position: absolute; top: 0; right: 0;
    color: #999; font-size: 20px; text-decoration: none;
}
.afc-remove:hover { color: red; }

/* Qty Buttons */
.afc-qty-wrapper {
    display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px;
}
.afc-qty-btn {
    background: #f9f9f9; border: none; padding: 5px 10px; cursor: pointer; color: #555; font-size: 16px; width: 30px;
}
.afc-qty-input {
    width: 45px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd;
    -moz-appearance: textfield; padding: 0 !important; margin: 0 !important; color: #000 !important; font-weight: bold; font-size: 16px; background: #fff !important; line-height: normal !important; box-sizing: border-box !important;
}
.afc-qty-input::-webkit-outer-spin-button, .afc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}

/* Totals & Actions */
.afc-cart-totals {
    margin-top: 20px; font-size: 18px; font-weight: bold;
    display: flex; justify-content: space-between;
    padding-top: 15px; border-top: 2px solid #eee;
}
.afc-actions {
    margin-top: 20px; display: flex; flex-direction: column; gap: 10px;
}
.afc-btn-checkout {
    background: #00bcd4; color: #fff; text-align: center; padding: 12px; border-radius: 4px;
    text-decoration: none; font-weight: bold;
}
.afc-btn-checkout:hover { background: #0097a7; color: #fff; }
.afc-btn-cart {
    background: #333; color: #fff; text-align: center; padding: 12px; border-radius: 4px;
    text-decoration: none;
}
.afc-btn-cart:hover { background: #000; color: #fff; }

.afc-empty-msg { text-align: center; margin-bottom: 20px; color: #777; }
.afc-return-shop { display: block; text-align: center; background: #00bcd4; color:#fff; padding: 10px; border-radius: 4px; text-decoration: none; }

/* Options Modal */
.afc-options-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 999998;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.afc-options-overlay.active { opacity: 1; visibility: visible; }

.afc-options-modal {
    position: fixed;
    top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
    width: 90%; max-width: 500px;
    background: #fff; border-radius: 12px;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    display: flex; flex-direction: column;
    max-height: 90vh;
}
.afc-options-modal.active {
    opacity: 1; visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.afc-options-close-btn {
    position: absolute; top: 15px; right: 15px;
    background: #f0f0f0; border: none; border-radius: 50%;
    width: 30px; height: 30px; font-size: 20px; line-height: 1;
    cursor: pointer; color: #555; transition: 0.2s; z-index: 10;
    display: flex; align-items: center; justify-content: center;
}
.afc-options-close-btn:hover { background: #e0e0e0; color: #000; }

.afc-options-modal-body {
    padding: 30px 25px; overflow-y: auto;
}
.afc-options-modal-body .aiwox-nma-options-form { display: flex; flex-direction: column; gap: 15px; }
.afc-options-modal-body select { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #ddd; margin-bottom: 10px; font-size:15px; }
.afc-options-modal-body .aiwox-nma-options-add { background: #00bcd4; color: #fff; border: none; padding: 15px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s; width: 100%; font-size:16px; margin-top: 10px; }
.afc-options-modal-body .aiwox-nma-options-add:hover { background: #0097a7; }
.afc-options-modal-body .aiwox-nma-options-add:disabled { background: #ccc; cursor: not-allowed; }
.afc-options-modal-body .aiwox-nma-options-info { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.afc-options-modal-body .aiwox-nma-options-info img { width: 80px; height: auto; border-radius: 8px; }
.afc-options-modal-body .aiwox-nma-options-info .title { font-weight: bold; font-size: 16px; display: block; margin-bottom:5px; }
.afc-options-modal-body .aiwox-nma-options-info .price { color: #00bcd4; font-weight: bold; }
