/**
 * Cart and Order System Styles
 * İcabed Baklavaları QR Menü Sistemi
 */

/* ============================================
   Floating Cart Icon (Sepet İkonu)
   ============================================ */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.6);
}

.floating-cart i {
    font-size: 24px;
    color: var(--color-primary);
}

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

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(201, 169, 97, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(201, 169, 97, 0.7);
    }
}

/* ============================================
   Floating Phone Icon (Telefon İkonu)
   ============================================ */
.floating-phone {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: phoneRing 2s infinite;
    text-decoration: none;
}

.floating-phone:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(39, 174, 96, 0.6);
}

.floating-phone i {
    font-size: 24px;
    color: white;
}

@keyframes phoneRing {

    0%,
    100% {
        transform: rotate(0deg);
        box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
    }

    10%,
    30% {
        transform: rotate(-15deg);
    }

    20%,
    40% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(0deg);
        box-shadow: 0 8px 32px rgba(39, 174, 96, 0.7);
    }
}

/* ============================================
   Add to Cart Button
   ============================================ */
.modal-add-to-cart {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.modal-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.modal-add-to-cart i {
    font-size: 1.3rem;
}

/* ============================================
   Quantity Selector
   ============================================ */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    background: var(--color-cream);
    padding: 1rem;
    border-radius: 12px;
}

.quantity-label {
    font-weight: 600;
    color: var(--color-primary);
    flex: 1;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    background: white;
    color: var(--color-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--color-gold);
    color: white;
    transform: scale(1.1);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    min-width: 40px;
    text-align: center;
}

/* ============================================
   Cart Page Styles
   ============================================ */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 120px;
    /* Space for sticky buttons */
}

.cart-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cart-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.cart-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.cart-items {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-cream);
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(201, 169, 97, 0.05);
    border-radius: 12px;
}

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

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item-details h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cart-item-portion {
    color: var(--color-gold);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cart-item-price {
    color: #666;
    font-size: 1rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.remove-item:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.cart-summary {
    background: linear-gradient(135deg, var(--color-cream) 0%, rgba(201, 169, 97, 0.1) 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
}

.summary-row.total {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primary);
    border-bottom: none;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-gold);
}

.cart-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 20px 20px 0 0;
    z-index: 100;
    max-width: 1200px;
    margin: 0 auto;
}

.btn-continue,
.btn-checkout {
    flex: 1;
    padding: 1.2rem 2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-continue {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-continue:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 61, 58, 0.3);
}

.btn-checkout {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-primary);
    animation: pulseCheckout 2s infinite;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.5);
    animation: none;
}

@keyframes pulseCheckout {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
    }

    50% {
        box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
    }
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-cart i {
    font-size: 5rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.empty-cart h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #666;
    margin-bottom: 2rem;
}

/* ============================================
   Checkout Page Styles
   ============================================ */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-cream);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.order-summary {
    background: var(--color-cream);
    padding: 2rem;
    border-radius: 16px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

.summary-item:last-child {
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-primary);
    padding-top: 1rem;
}

.btn-place-order {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5rem;
}

.btn-place-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.btn-place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.order-number strong {
    color: var(--color-gold);
    font-size: 1.5rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .floating-cart {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .floating-cart i {
        font-size: 20px;
    }

    .floating-phone {
        width: 50px;
        height: 50px;
        bottom: 75px;
        right: 15px;
    }

    .floating-phone i {
        font-size: 20px;
    }

    .cart-container {
        padding: 1rem;
        padding-bottom: 140px;
    }

    .cart-header {
        padding: 1.5rem;
    }

    .cart-header h1 {
        font-size: 1.5rem;
    }

    .cart-items {
        padding: 1rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .summary-row.total {
        font-size: 1.5rem;
    }

    .cart-actions {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }

    .btn-continue,
    .btn-checkout {
        padding: 1rem;
        font-size: 1rem;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}