@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ======================================================
   GENEL KONTEYNER
====================================================== */
#pts-container {
    max-width: 420px;
    margin: 50px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    text-align: center;
    color: #1f2937;
}

#pts-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
}

#pts-container p {
    font-size: 15px;
    margin-bottom: 25px;
    color: #6b7280;
}

/* ======================================================
   QR INPUT
====================================================== */
#pts-qr-code {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s;
}

#pts-qr-code:focus {
    outline: none;
    background: #fff;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ======================================================
   FORM INPUTLARI
====================================================== */
#pts-guest-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s;
}

#pts-guest-form input:focus {
    outline: none;
    border-color: #1e40af;
}

/* ======================================================
   BUTONLAR
====================================================== */
.pts-btn-primary,
.pts-btn-catalog {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #1e3a8a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pts-btn-primary:hover,
.pts-btn-catalog:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.pts-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.pts-btn-catalog {
    background: #2563eb;
}

.pts-btn-secondary {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pts-btn-secondary:hover {
    background: #e5e7eb;
}

/* ======================================================
   GİRİŞ YAPMIŞ KULLANICI KARTI
====================================================== */
.pts-user-card {
    max-width: 300px;
    margin: 20px auto;
    padding: 20px;
    background: #4a90e2;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#welcome-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

#welcome-phone {
    font-size: 14px;
    color: #ffffff;
}

#pts-logout-btn {
    margin-top: 8px;
    font-size: 13px;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

#pts-logout-btn:hover {
    color: #b91c1c;
}

/* ======================================================
   MODAL
====================================================== */
.pts-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.pts-modal-content {
    width: 92%;
    max-width: 1100px;
    max-height: 88vh;
    margin: 4% auto;
    background: #f9fafb;
    border-radius: 16px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.pts-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    background: #ffffff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pts-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ======================================================
   KATALOG LİSTE
====================================================== */
.pts-gift-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.pts-gift-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.gift-img {
    width: 600px !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.gift-info {
    flex: 1 !important;
    text-align: left !important;
}

.gift-info h4 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 0 8px 0 !important;
}

.gift-info p {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.gift-points {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1e40af !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    min-width: 80px !important;
}

.gift-points span {
    display: block !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
}

.pts-req-btn {
    font-size: 13px !important;
    padding: 10px 18px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.pts-req-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
}

@media (max-width: 540px) {
    .pts-gift-card {
        flex-direction: column !important;
    }
    .gift-img {
        width: 100% !important;
        height: 180px !important;
    }
}

/* ======================================================
   HEDİYE KARTI
====================================================== */
.pts-gift-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    box-sizing: border-box;
    min-width: 0;
}

.pts-gift-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.15);
    border-color: #cbd5e1;
}

.pts-gift-card .img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
}

.pts-gift-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pts-gift-card .content {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pts-gift-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #111827;
    line-height: 1.4;
}

.pts-gift-card p {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px 0;
    line-height: 1.5;
    flex-grow: 1;
}

.pts-gift-card .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.pts-gift-card .cost {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    white-space: nowrap;
}

.pts-req-btn {
    font-size: 12px;
    padding: 6px 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: background 0.2s;
    flex-shrink: 0;
}

.pts-req-btn:hover {
    background: #1e40af;
}

.pts-req-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ======================================================
   AYDINLATMA METNİ / SWITCH
====================================================== */
.terms-container {
    display: flex;
    gap: 12px;
    padding: 10px 15px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    margin-bottom: 20px;
    cursor: pointer;
    align-items: flex-start;
}

.terms-container input {
    display: none;
}

.switch-visual {
    width: 40px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
    flex-shrink: 0;
}

.switch-visual::after {
    content: "";
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

#pts-terms:checked + .switch-visual {
    background: #34c759;
}

#pts-terms:checked + .switch-visual::after {
    transform: translateX(18px);
}

.terms-label {
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
    flex: 1;
}

/* ======================================================
   LOADING & FOOTER
====================================================== */
.pts-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pts-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.pts-footer small {
    font-size: 12px;
    color: #9ca3af;
}