/* Reset & Base - Mobil First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* HTML ve Body - Masaüstünde mobil görünüm */
html {
    background: #e0e0e0; /* Masaüstü arka plan */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    /* Masaüstünde mobil cihaz görünümü */
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
    min-height: 100vh;
    position: relative;
}

/* Container - Her zaman full width */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.header h1 {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.order-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 10px 20px rgba(67,56,202,0.3);
}

.order-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px;
    min-width: 50px;
}

.spacer {
    width: 50px;
}

.hidden {
    display: none !important;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 15px;
    color: #7f8c8d;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Varyantlar */
.variants-section {
    padding: 20px 0;
    background: white;
}

.variants-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
    padding: 0 15px;
}

.variants-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 100px;
}

.variant-card:active {
    transform: scale(0.98);
}

.variant-card.selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.variant-card.popular {
    border-color: #f5576c;
}

.variant-card.popular::before {
    content: "🔥 EN POPÜLER";
    position: absolute;
    top: -12px;
    right: 15px;
    background: #f5576c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.variant-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.variant-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.variant-price {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.variant-old-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #95a5a6;
}

.variant-discount {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
}

.variant-stock {
    font-size: 12px;
    color: #7f8c8d;
}

/* Sipariş Formu */
.order-form {
    padding: 20px 0;
}

.order-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.selected-variant {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.selected-variant h3 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.selected-variant p {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

/* Ödeme Yöntemi */
.payment-section {
    margin: 25px 0;
}

.payment-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-card {
    display: grid;
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
    gap: 5px 12px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s;
}

.payment-option input:checked + .payment-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.payment-icon {
    grid-row: 1 / 3;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.payment-desc {
    font-size: 12px;
    color: #7f8c8d;
}

/* Sipariş Özeti */
.order-summary {
    background: white;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

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

.summary-line.total {
    border-top: 2px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    touch-action: manipulation;
}

.submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-icon {
    width: 70px;
    height: 70px;
    background: #27ae60;
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 22px;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.modal-btn:active {
    transform: scale(0.98);
}

/* Tablet ve üzeri - Yine de mobil görünüm */
@media (min-width: 768px) {
    .header h1 {
        font-size: 18px;
    }

    .variants-section h2,
    .order-form h2 {
        font-size: 22px;
    }

    .variant-card {
        padding: 18px;
    }

    /* 2 sütun varyant gösterimi */
    .variants-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* Hover desteği olan cihazlar */
@media (hover: hover) {
    .variant-card:hover:not(.selected) {
        border-color: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    }

    .submit-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    .modal-btn:hover {
        background: #5568d3;
    }
}

/* iPhone notch desteği */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}

/* Form input zoom'u engelle (iOS) */
@media screen and (max-width: 767px) {
    input[type="text"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Kart formu yerleşimi */
#cardForm {
    margin-top: 16px;
}

#cardForm .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    #cardForm .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    #cardForm .form-row {
        grid-template-columns: 2fr 1fr 1fr; /* Numara | Son Kullanma | CVC */
    }
}

#cardForm .form-group {
    display: flex;
    flex-direction: column;
}

#cardForm input {
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    font-size: 15px;
}

#cardForm label {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 6px;
}

/* Küçük ekranlarda yan yana alanlar taşmasın */
#ccNumber { min-width: 0; }
#ccExp, #ccCvc { min-width: 0; }

/* ===============================
   VARYANT RESİM CAROUSEL
   =============================== */
.variant-carousel {
    position: relative;
    margin-bottom: 10px;
    user-select: none;
}

.carousel-images {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.carousel-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-indicators .indicator.active {
    background: #fff;
    transform: scale(1.2);
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Mobil için carousel butonları biraz daha büyük */
@media (max-width: 640px) {
    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }
}
