/* ==================== MAKSİMUM PREMIUM DEYİŞƏNLƏR ==================== */
:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --whatsapp: #25d366;
    --whatsapp-hover: #1ebe5d;
    --border: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: auto;
    padding: 20px;
}

h1 {
    text-align: center;
    font-weight: 800;
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 30px;
    color: var(--text);
}

/* ==================== STRUCTURAL GRID ==================== */
.grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 25px;
    align-items: start;
}

.box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 12px;
}
.price{
    width: 100px;
}
/* ==================== PREMIUM INPUTS (FLOAT LABELS) ==================== */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 16px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    box-sizing: border-box;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Label Animasiya Sistemi Düzəldildi */
.form-group label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
    transition: var(--transition);
    background: white;
    padding: 0 6px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

/* Xəritə Tetikleyici Sahə Dizaynı */
.address-group {
    display: flex;
    flex-direction: column;
}

.map-trigger-btn {
    margin-top: 8px;
    padding: 12px;
    background: rgba(37, 99, 235, 0.07);
    color: var(--primary);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.map-trigger-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ==================== MODERN RADIO BUTTONS ==================== */
.delivery-options {
    margin-top: 25px;
    margin-bottom: 25px;
}

.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.radio-container:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-checkmark {
    height: 18px;
    width: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
}

.radio-container input:checked ~ .radio-checkmark {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.radio-container input:checked ~ .radio-checkmark:after {
    display: block;
}

.radio-label {
    font-size: 14px;
    font-weight: 500;
}

/* ==================== SƏBƏT VƏ QİYMƏTLƏR ==================== */
.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--muted);
}

.price-row .value {
    color: var(--text);
    font-weight: 600;
}

.total-row {
    margin-top: 15px;
    border-top: 2px dashed var(--border);
    padding-top: 15px;
}

.total-row h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.total-row h2 span {
    color: var(--primary);
    font-weight: 800;
}

/* ==================== SUBMIT DÜYMƏSİ ==================== */
.whatsapp-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--whatsapp);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    transition: var(--transition);
}

.whatsapp-submit-btn:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-submit-btn:active {
    transform: translateY(0);
}

/* ==================== LEAFLET MAP MODAL PREMIUM ==================== */
.map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.map-box {
    width: 90%;
    max-width: 550px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.close-icon {
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-icon:hover {
    color: var(--text);
}

#map {
    height: 350px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confirm-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.confirm-btn:hover {
    background: var(--primary-hover);
}

.close-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.close-btn:hover {
    background: #e2e8f0;
    color: var(--text);
}

/* ==================== MEDIA RESPONSIVE ==================== */
@media(max-width: 868px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    h1 {
        margin-top: 20px;
        font-size: 1.7rem;
    }
}
/* ==================== SƏBƏT DAXİLİNDƏKİ MƏHSULLARIN SIRALANMASI (DÜZƏLDİLDİ) ==================== */
#items {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Məhsullar arasında təmiz məsafə */
}

/* Səbətdəki hər bir sətir */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 10px;
}

/* Məhsulun adı */
.item-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

/* Düymələr bloku - Arxa-arxaya təmiz düzülmə və hər məhsulda eyni mövqe */
.qty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px;
    min-width: 100px;
}

.qty-box button {
    width: 26px;
    height: 26px;
    border: none;
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-box button:hover {
    background: #cbd5e1;
    transform: none; /* Böyümə effektini burda ləğv edirik ki sıralama pozulmasın */
    box-shadow: none;
}

.qty-box span {
    width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Qiymət sahəsi - Tamamilə sağ küncə sabitləndi */
.price {
    font-weight: 700;
    color: #0f172a;
    min-width: 70px;
    text-align: right;
    font-size: 14px;
}

/* ==================== INPUT VƏ XƏRİTƏ DÜYMƏSİNİN İNTEQRASİYASI ==================== */
.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-button input {
    width: 100%;
    padding: 16px 110px 16px 14px; /* Sağ tərəfdən düymə üçün boşluq buraxırıq */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}

/* Xəritə düyməsini inputun daxilinə sağ tərəfə səliqəli yerləşdiririk */
.map-trigger-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    transition: background 0.2s;
}

.map-trigger-btn:hover {
    background: #1d4ed8;
    transform: translateY(-50%) scale(1.02); /* Düymənin yerini itirmədən kiçik hover */
}

/* ==================== ÇATDIRILMA BÖLMƏSİ (TOQQUŞMA HƏLL OLUNDU) ==================== */
.delivery-options-section {
    margin-top: 30px; /* Üstdəki inputla arasında böyük məsafə */
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    clear: both; /* Hər ehtimala qarşı floatları təmizləyir */
}

.delivery-options-section h3 {
    margin-bottom: 10px !important;
}

.radio-container {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    margin: 0; /* Köhnə margin sıfırlandı */
    transition: all 0.2s;
}

.radio-container:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}