/* ============ Cart Styles ============ */

.cart-container {
    padding: 16px;
    padding-bottom: 200px;
}

.cart-item {
    display: flex;
    gap: 12px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: #F9F9F9;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-image .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    opacity: 0.3;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

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

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    background: var(--background);
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-value {
    font-size: 15px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.cart-item-subtotal {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-green);
}

.cart-item-delete {
    color: var(--badge-sale);
    font-size: 18px;
    padding: 8px;
}

/* ============ Promo Section ============ */
.promo-section {
    padding: 0 16px 16px;
}

.promo-input-group {
    display: flex;
    gap: 8px;
}

.promo-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-transform: uppercase;
}

.promo-btn {
    height: 44px;
    padding: 0 20px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.promo-result {
    margin-top: 8px;
    font-size: 13px;
}

.promo-result.success {
    color: var(--primary-green);
}

.promo-result.error {
    color: var(--badge-sale);
}

/* ============ Cart Summary ============ */
.cart-summary {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    z-index: 50;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.discount-amount {
    color: var(--primary-green);
}

.checkout-btn {
    width: 100%;
    height: 48px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    margin-top: 12px;
}

/* ============ Checkout Styles ============ */
.checkout-container {
    padding: 16px;
    padding-bottom: 100px;
}

.checkout-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.checkout-section .section-title {
    font-size: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-group textarea {
    height: auto;
    padding: 12px;
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-green);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    color: var(--text-dark);
    cursor: pointer;
}

.form-group.checkbox input {
    width: 18px;
    height: 18px;
}

/* ============ Delivery Options ============ */
.delivery-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option,
.payment-option {
    cursor: pointer;
}

.delivery-option input,
.payment-option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.delivery-option input:checked + .option-content,
.payment-option input:checked + .option-content {
    border-color: var(--primary-green);
    background: rgba(76, 175, 80, 0.05);
}

.option-icon {
    font-size: 24px;
}

.option-text {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 500;
}

.option-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* ============ Order Summary ============ */
.order-items {
    margin-bottom: 16px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.order-item-name {
    flex: 1;
}

.order-item-qty {
    color: var(--text-light);
    margin: 0 12px;
}

.order-item-price {
    font-weight: 500;
}

.order-summary .summary-row {
    font-size: 14px;
}

.order-summary .summary-row.total {
    font-size: 18px;
}

/* ============ Checkout Footer ============ */
.checkout-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    z-index: 50;
}

.submit-order-btn {
    width: 100%;
    height: 52px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
}

.submit-order-btn:disabled {
    background: var(--text-muted);
}

/* ============ Success Modal ============ */
.success-modal {
    text-align: center;
    padding: 32px 24px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-modal h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.success-modal p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.success-modal .btn-primary {
    margin-top: 24px;
    width: 100%;
}

.success-modal .btn-secondary {
    width: 100%;
}
