/* =========================================================================
 *  sanim.css — Şanım (Hat Sanatı) sayfası. style.css'in üstüne biner.
 *  Tema: ASM Create (koyu, #5ea8d3) + hat için sıcak altın çerçeve aksanı.
 * ========================================================================= */

:root {
    --frame-gold: #c8a96a;
    --sanim-panel: #161616;
}

/* Bu sayfa normal kayan sayfa (scroll-snap yok) */
body.sanim-page {
    overflow-y: auto;
    height: auto;
}

/* ============ SENİN 4 HAT FONTUN ============
 * fonts/ klasörüne dosyalarını koy: divani / sulus / faris / naksi (.woff2 veya .ttf).
 * Dosya yokken otomatik en yakın ücretsiz Arapça hat fontuna düşer (yedek). */
@font-face { font-family: 'HatDivani'; src: url('fonts/divani.woff2') format('woff2'), url('fonts/divani.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'HatSulus';  src: url('fonts/sulus.woff2')  format('woff2'), url('fonts/sulus.ttf')  format('truetype'); font-display: swap; }
@font-face { font-family: 'HatFaris';  src: url('fonts/faris.woff2')  format('woff2'), url('fonts/faris.ttf')  format('truetype'); font-display: swap; }
@font-face { font-family: 'HatNaksi';  src: url('fonts/naksi.woff2')  format('woff2'), url('fonts/naksi.ttf')  format('truetype'); font-display: swap; }

.font-divani { font-family: 'HatDivani', 'Aref Ruqaa', serif; }
.font-sulus  { font-family: 'HatSulus', 'Amiri', serif; }
.font-faris  { font-family: 'HatFaris', 'Noto Nastaliq Urdu', serif; }
.font-naksi  { font-family: 'HatNaksi', 'Scheherazade New', serif; }

/* ============ HEADER ============ */
.sanim-header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 6vw;
    background: rgba(17,17,17,0.85);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
}
.sanim-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-color); }
.sanim-logo img { height: 38px; width: auto; }
.sanim-logo span { font-weight: 600; letter-spacing: 1px; }
.sanim-nav { display: flex; gap: 26px; align-items: center; }
.sanim-nav a { color: var(--text-light); text-decoration: none; font-size: 14px; transition: color 0.25s; }
.sanim-nav a:hover { color: var(--primary-color); }

/* ============ HERO ============ */
.sanim-hero {
    display: flex; gap: 56px; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 70px 6vw 90px;
}
.hero-left { flex: 1 1 0; min-width: 0; }
.sanim-kicker {
    display: inline-block; font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
    color: var(--primary-color); border: 1px solid var(--primary-color);
    border-radius: 999px; padding: 5px 16px; margin-bottom: 22px;
}
.sanim-title { font-size: 64px; font-weight: 700; line-height: 1.05; margin-bottom: 18px; }
.sanim-title img { display: block; width: 100%; max-width: clamp(220px, 34vw, 360px); height: auto; transform: scale(0.9); } /* ŞANIM logosu */
.sanim-info { font-size: 16px; line-height: 1.9; color: var(--text-light); margin-bottom: 32px; max-width: 520px; }
/* Hero görsel galerisi (modern crossfade dönüş) */
.hero-right { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.sanim-gallery {
    position: relative; width: 100%; max-width: 460px; aspect-ratio: 4 / 5;
    margin: 0 auto;
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
    background: var(--sanim-panel);
    transition: aspect-ratio 0.7s ease; /* görselin oranına yumuşak uyum */
}
.sanim-gallery .g-slide {
    position: absolute; inset: 0; opacity: 0; transform: scale(1.06);
    transition: opacity 1.1s ease, transform 6s ease;
}
.sanim-gallery .g-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sanim-gallery .g-slide.active { opacity: 1; transform: scale(1); z-index: 2; }
.sanim-gallery::after {
    content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), inset 0 -80px 120px rgba(0,0,0,0.5);
}
.g-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 4; display: flex; gap: 8px; justify-content: center; }
.g-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: background 0.3s, width 0.3s; }
.g-dots span.on { background: var(--primary-color); width: 20px; border-radius: 4px; }

/* ============ SİPARİŞ OLUŞTUR ============ */
.sanim-order { max-width: 1200px; margin: 0 auto; padding: 40px 6vw 90px; }
.sanim-order .section-title { text-align: center; }
.order-sub { text-align: center; color: var(--text-light); margin: 0 auto 44px; max-width: 560px; line-height: 1.7; }
.order-grid { display: flex; gap: 8vw; align-items: flex-start; justify-content: space-between; }
.order-form { flex: 1 1 500px; max-width: 500px; }
.order-step { margin-bottom: 30px; }
.order-step h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.order-step h3 span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color);
    color: #111; font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* seçim çipleri */
.frame-options, .size-options, .script-options { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px; width: 100%; }
.opt-chip {
    flex: 1; min-width: 0; white-space: nowrap;
    background: var(--sanim-panel); border: 1px solid var(--border-color); color: var(--text-light);
    border-radius: 10px; padding: 12px 2px; cursor: pointer; font-family: inherit; font-size: 13px;
    transition: border-color 0.25s, color 0.25s, background 0.25s; text-align: center;
}
.opt-chip:hover { border-color: var(--primary-color); color: var(--text-color); }
.opt-chip.is-selected { border-color: var(--primary-color); background: rgba(94,168,211,0.12); color: var(--text-color); }
.script-options .opt-chip { font-size: 18px; line-height: 1; padding: 14px 2px; }

/* çerçeve seçenekleri (mini önizleme) */
.frame-opt {
    flex: 1; min-width: 0; height: 74px; border-radius: 8px; cursor: pointer; padding: 0;
    background: #0d0d0d; position: relative; overflow: hidden;
    border: 2px solid transparent; transition: border-color 0.25s, transform 0.2s;
}
.frame-opt .fbox { position: absolute; inset: 9px; background: #f4efe3; }
.frame-opt:hover { transform: translateY(-2px); }
.frame-opt.is-selected { border-color: var(--primary-color); }

/* metin / iletişim girişleri */
.order-step input, .feedback-form input, .feedback-form textarea {
    width: 100%; background: var(--sanim-panel); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 13px 16px; color: var(--text-color);
    font-family: inherit; font-size: 15px; margin-bottom: 12px; transition: border-color 0.25s;
}
.order-step input:focus, .feedback-form input:focus, .feedback-form textarea:focus {
    outline: none; border-color: var(--primary-color);
}
#order-send { margin-top: 8px; }

/* ============ CANLI ÖNİZLEME ============ */
.order-preview-wrap { flex: 1 1 500px; position: sticky; top: 120px; text-align: center; }
.preview-label { display: inline-block; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--primary-color); margin-bottom: 16px; }
.preview-frame-container {
    height: clamp(300px, 45vh, 420px); width: 100%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
}
.preview-frame {
    height: 100%; max-height: 100%; max-width: 100%; aspect-ratio: 4 / 3;
    transform: scale(0.9);
    background: #f6f1e7; display: flex; align-items: center; justify-content: center;
    padding: 6%; transition: aspect-ratio 0.4s ease, transform 0.4s ease; /* ebat değişince ölçek de değişir */
    box-shadow: 0 24px 55px rgba(0,0,0,0.55);
}
.preview-text {
    color: #1a1208; font-size: clamp(28px, 5vw, 52px); line-height: 1.6;
    word-break: break-word; max-width: 100%; direction: rtl;
}
.preview-meta { margin-top: 18px; font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* hazır çerçeve görünümleri (kullanıcı kendi PNG çerçevelerini verince border-image ile değişecek) */
.frame-1 { border: 14px solid var(--frame-gold); box-shadow: 0 24px 55px rgba(0,0,0,0.55), inset 0 0 0 3px #fff; }
.frame-2 { border: 10px solid #2c2c2c; outline: 4px solid var(--frame-gold); outline-offset: 6px; }
.frame-3 { border: 18px double var(--frame-gold); }
.frame-4 { border: 16px solid #3a2c14; box-shadow: 0 24px 55px rgba(0,0,0,0.55), inset 0 0 0 6px var(--frame-gold); }
.frame-opt[data-frame="1"] .fbox { box-shadow: 0 0 0 3px var(--frame-gold); }
.frame-opt[data-frame="2"] .fbox { box-shadow: 0 0 0 2px #555, 0 0 0 5px var(--frame-gold); }
.frame-opt[data-frame="3"] .fbox { box-shadow: 0 0 0 2px var(--frame-gold), 0 0 0 5px #0d0d0d, 0 0 0 7px var(--frame-gold); }
.frame-opt[data-frame="4"] .fbox { box-shadow: 0 0 0 4px #3a2c14, 0 0 0 6px var(--frame-gold); }

/* ============ DİLEKÇE & ÖNERİLER ============ */
.sanim-feedback { max-width: 720px; margin: 0 auto; padding: 30px 6vw 90px; }
.sanim-feedback .section-title { text-align: center; }
.feedback-form { margin-top: 30px; }
.feedback-form textarea { resize: vertical; min-height: 130px; }
#fb-send { margin-top: 6px; }

/* ============ FOOTER ============ */
.sanim-footer { text-align: center; padding: 34px 20px; color: #777; font-size: 13px; border-top: 1px solid #222; }

/* ============ MOBİL ============ */
@media (max-width: 900px) {
    .sanim-hero { flex-direction: column; gap: 40px; padding-top: 50px; }
    .hero-right { order: -1; width: 100%; }
    .sanim-title { font-size: 48px; }
    .order-grid { flex-direction: column; gap: 40px; }
    .order-preview-wrap { position: static; order: -1; }
}
@media (max-width: 600px) {
    .sanim-nav { gap: 14px; font-size: 13px; }
    .sanim-nav a span, .sanim-logo span { display: none; }
    .sanim-title { font-size: 40px; }
    .sanim-header { padding: 14px 5vw; }
}

/* ============================================================ */
/* === AÇIK TEMA (header + footer dâhil) + ARKA PLAN MOTİFLERİ === */
/* ============================================================ */
body.sanim-page {
    --background-color: #f4eee2;   /* açık krem */
    --text-color: #2a2014;         /* koyu metin */
    --text-light: #6f6452;
    --border-color: #ddd0b8;
    --box-bg-color: #ffffff;
    --sanim-panel: #fbf6ea;        /* açık panel */
    --primary-color: #b3893f;      /* açık temada altın vurgu (tezhiple uyumlu) */
    background-color: #f4eee2;
    color: var(--text-color);
    position: relative; /* arka plan motif katmanı (absolute) buna göre konumlanır */
}
.sanim-header { background: rgba(247,242,232,0.88); border-bottom: 1px solid #e3d8c3; }
.sanim-logo img { filter: brightness(0); } /* açık header'da beyaz logo -> siyah görünür */
.sanim-footer { color: #8a7c64; border-top: 1px solid #e3d8c3; }
.opt-chip.is-selected { background: rgba(179,137,63,0.14); }
.preview-frame { background: #fffdf7; }                 /* kâğıt beyaz, krem zeminden ayrışsın */
.sanim-gallery { background: #efe7d6; }
.sanim-gallery::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), inset 0 -70px 110px rgba(0,0,0,0.22); }

/* Arka plan motif katmanı: tezhip/çerçeveler, irili ufaklı, kenarlardan taşan */
.bg-decor { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; } /* sayfayla birlikte kayar */
.bg-decor img { position: absolute; will-change: transform; }
/* İçerik motiflerin ÜSTÜNDE kalsın */
.sanim-hero, .sanim-order, .sanim-feedback, .sanim-footer { position: relative; z-index: 1; }

/* ============ TELEFON GÖRÜNÜMÜ (iyileştirme) ============ */
@media (max-width: 900px) {
    .sanim-hero { padding: 36px 6vw 56px; gap: 30px; }
    .sanim-title { font-size: 46px; }
    .sanim-title img { transform: scale(1.1); margin-top: 20px; }
    .sanim-info { font-size: 15px; }
    .sanim-gallery { max-width: 100%; }
    .order-grid { display: flex; flex-direction: column; gap: 30px; }
    .order-form { max-width: 100%; }
    .order-preview-wrap { flex: none; width: 100%; position: static; order: -1; top: auto; margin: 0; padding-bottom: 20px; }
    /* mobilde önizleme yüksekliği sabit kalsın ki alttakileri itmesin */
    .preview-frame-container { height: 320px; }
    .preview-frame { width: auto; max-width: 100%; }
    .preview-text { font-size: clamp(26px, 11vw, 46px); }
}
@media (max-width: 560px) {
    .sanim-header { padding: 12px 5vw; }
    .sanim-nav { gap: 11px; font-size: 12px; }
    .sanim-logo img { height: 30px; }
    .sanim-hero { padding-top: 28px; }
    .sanim-title { font-size: 38px; }
    .sanim-kicker { font-size: 11px; margin-bottom: 16px; }
    .sanim-info { line-height: 1.8; }
    .sanim-order, .sanim-feedback { padding-left: 5vw; padding-right: 5vw; }
    .sanim-order .section-title, .sanim-feedback .section-title { font-size: 30px; }
    .order-sub { font-size: 14px; margin-bottom: 30px; }
    .frame-opt { height: 60px; }
    .opt-chip { padding: 10px 2px; font-size: 11px; }
    .script-options .opt-chip { font-size: 14px; padding: 10px 2px; }
    .preview-frame-container { height: 300px; }
    .preview-frame { max-width: 100%; height: 100%; }
    .order-step h3 { font-size: 15px; }
}
