/**
 * Custom CSS for Dürümcü Esnaf Theme
 * Styles that Tailwind CDN doesn't cover
 *
 * @package Durumcu_Esnaf
 */

/* Body background pattern (matching Next.js original) */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    background-image: radial-gradient(#f3f4f6 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Hide scrollbar utility */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Marquee animation fine-tuning */
@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* Fade in up animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* Line clamp utilities (for browsers that don't support Tailwind's line-clamp) */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(207, 46, 46, 0.3);
}

/* ============================================================
   Branches Page — Searchable Dropdown (BSD)
   ============================================================ */
.branch-searchable-dropdown {
    position: relative;
    user-select: none;
}

.bsd-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 46px;
}
.bsd-display:hover,
.bsd-display:focus {
    border-color: #cf2e2e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(207, 46, 46, 0.15);
}
.bsd-chevron {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.2s;
}
.bsd-panel--open .bsd-chevron {
    transform: rotate(180deg);
}
.bsd-display-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsd-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    overflow: hidden;
}
.bsd-panel--open {
    display: block;
}

.bsd-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
}
.bsd-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
}
.bsd-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: #1a1a1a;
    background: transparent;
    box-shadow: none !important;
}

.bsd-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
}
.bsd-item {
    padding: 9px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s, color 0.15s;
}
.bsd-item:hover {
    background: #fef2f2;
    color: #cf2e2e;
}
.bsd-item.selected {
    background: #cf2e2e;
    color: #fff;
    font-weight: 600;
}
.bsd-item--all {
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}
.bsd-item--all.selected {
    background: #1a1a1a;
    color: #fff;
}

/* ============================================================
   Branch Card — Photo / Fallback
   ============================================================ */
.branch-card-photo {
    background: #000;
}
.branch-card-photo img {
    display: block;
}
.branch-card-photo-fallback {
    background: #000;
}

/* ============================================================
   Branches Page Header gradient overlay
   ============================================================ */
.branches-page-header {
    /* Fallback background when no image is set via admin */
    background-color: #0d0d0d;
    border-bottom: 3px solid #cf2e2e;
}


/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Fix for WordPress admin bar + fixed header */
body.admin-bar .site-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px !important;
    }
}

/* Sticky filter bar offset when admin bar is visible */
body.admin-bar .branches-filter-sticky {
    top: calc(5rem + 32px) !important; /* 80px header + 32px admin bar */
}
@media (min-width: 768px) {
    body.admin-bar .branches-filter-sticky {
        top: calc(6rem + 32px) !important; /* 96px header + 32px admin bar */
    }
}
@media screen and (max-width: 782px) {
    body.admin-bar .branches-filter-sticky {
        top: calc(5rem + 46px) !important;
    }
}

/* Mobile menu overlay z-index management */
#mobile-menu-overlay {
    z-index: 9999;
}

/* Fix text-9xl for step numbers (if Tailwind CDN doesn't support) */
.text-9xl {
    font-size: 8rem;
    line-height: 1;
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(12px)) {
    .backdrop-blur-md {
        background-color: rgba(0, 0, 0, 0.8);
    }
    .backdrop-blur-sm {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* Gradient text fallback for older browsers */
@supports not (-webkit-background-clip: text) {
    .bg-clip-text {
        color: #cf2e2e;
        -webkit-text-fill-color: initial;
    }
}

/* WordPress specific overrides */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Override WordPress default link styles in content area */
.entry-content a {
    color: #cf2e2e;
    text-decoration: underline;
}
.entry-content a:hover {
    color: #a01e1e;
}

/* Fix for Lucide icons inline sizing */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
}

/* Shadow inner utility (Tailwind CDN may not include) */
.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
}

/* Ensure footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Print styles */
@media print {
    header.site-header,
    footer,
    #mobile-menu-overlay {
        display: none !important;
    }
    main {
        padding-top: 0 !important;
    }
}

/* ============================================================
   Blog yazısı tipografisi (.durumcu-post-content)
   Tailwind CDN @typography plugin olmadan manuel prose stiller
   ============================================================ */
.durumcu-post-content {
    color: #1a1a1a;
    font-size: 1.0625rem;
    line-height: 1.85;
}

.durumcu-post-content h1,
.durumcu-post-content h2,
.durumcu-post-content h3,
.durumcu-post-content h4,
.durumcu-post-content h5,
.durumcu-post-content h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    color: #000000;
    margin-top: 2.25em;
    margin-bottom: 0.75em;
    line-height: 1.25;
}

.durumcu-post-content h2 { font-size: 1.75rem; }
.durumcu-post-content h3 { font-size: 1.375rem; }
.durumcu-post-content h4 { font-size: 1.125rem; }

.durumcu-post-content p {
    margin-bottom: 1.5em;
}

.durumcu-post-content a {
    color: #cf2e2e;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.durumcu-post-content a:hover {
    color: #a02222;
}

.durumcu-post-content strong,
.durumcu-post-content b {
    font-weight: 700;
    color: #000;
}

.durumcu-post-content em,
.durumcu-post-content i {
    font-style: italic;
}

/* Listeler */
.durumcu-post-content ul,
.durumcu-post-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.75em;
}
.durumcu-post-content ul { list-style-type: disc; }
.durumcu-post-content ol { list-style-type: decimal; }
.durumcu-post-content li {
    margin-bottom: 0.5em;
}
.durumcu-post-content li::marker {
    color: #cf2e2e;
}

/* Blockquote */
.durumcu-post-content blockquote {
    border-left: 4px solid #cf2e2e;
    padding: 1rem 1.5rem;
    margin: 2em 0;
    background-color: #f9f9f9;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #444;
}
.durumcu-post-content blockquote p {
    margin-bottom: 0;
}
.durumcu-post-content blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-size: 0.85em;
    font-weight: 700;
    color: #cf2e2e;
    font-style: normal;
}

/* Kod */
.durumcu-post-content code {
    background: #f3f4f6;
    color: #cf2e2e;
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}
.durumcu-post-content pre {
    background: #1a1a1a;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5em;
    font-size: 0.875em;
    line-height: 1.7;
}
.durumcu-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Tablolar */
.durumcu-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.925em;
}
.durumcu-post-content th {
    background-color: #000;
    color: #fff;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
}
.durumcu-post-content td {
    border: 1px solid #e5e7eb;
    padding: 0.65rem 1rem;
    vertical-align: top;
}
.durumcu-post-content tr:nth-child(even) td {
    background-color: #f9f9f9;
}

/* Görseller */
.durumcu-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.75em auto;
    display: block;
    box-shadow: 0 4px 24px rgb(0 0 0 / 0.10);
}
.durumcu-post-content figure {
    margin: 2em 0;
}
.durumcu-post-content figcaption {
    text-align: center;
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 0.5em;
    font-style: italic;
}

/* Yatay çizgi */
.durumcu-post-content hr {
    border: none;
    border-top: 2px solid #f3f4f6;
    margin: 2.5em 0;
}

/* WordPress embed / iframe (YouTube vb.) */
.durumcu-post-content .wp-block-embed,
.durumcu-post-content .embed-responsive {
    margin: 2em 0;
}
.durumcu-post-content iframe {
    max-width: 100%;
    border-radius: 0.75rem;
}

/* WordPress hizalama sınıfları */
.durumcu-post-content .alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.durumcu-post-content .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.durumcu-post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 640px) {
    .durumcu-post-content .alignleft,
    .durumcu-post-content .alignright {
        float: none;
        margin: 1rem 0;
    }
}

/* scroll-mt yardımcısı (içindekiler anchor offset) */
.scroll-mt-28 { scroll-margin-top: 7rem; }

/* =============================================
   Quality Marquee — küçültülmüş boyutlar
   ============================================= */
.quality-marquee .animate-marquee span {
    font-size: 1rem !important;      /* text-xl (1.25rem) → %20 küçük */
}
.quality-marquee .animate-marquee [data-lucide] {
    width: 1.25rem !important;
    height: 1.25rem !important;
}
@media (min-width: 768px) {
    .quality-marquee .animate-marquee span {
        font-size: 1.5rem !important; /* text-3xl (1.875rem) → %20 küçük */
    }
    .quality-marquee .animate-marquee [data-lucide] {
        width: 2rem !important;
        height: 2rem !important;
    }
}

/* Online Delivery section heading size */
.online-delivery-title {
    font-size: 45.6px;
}

@media (max-width: 767px) {
    .online-delivery-title {
        font-size: 30px;
    }
}

/* ---------------------------------------------------------------
 * Carousel'lar – mobil dokunma desteği
 * pan-y: dikey scroll tarayıcıya, yatay kaydırma JS'e bırakılır
 * --------------------------------------------------------------- */
#blog-carousel-track,
#featured-track {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

/* ---------------------------------------------------------------
 * Yorum Formu & Yorum Listesi
 * --------------------------------------------------------------- */

/* Form grid: 2 sütun yan yana */
.durumcu-comment-form .form-fields-row,
.durumcu-comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Geniş alan (textarea, cookie) tam genişlik */
.durumcu-field-full,
.durumcu-cookie-field,
.durumcu-submit-row {
    grid-column: 1 / -1;
}

/* Label */
.durumcu-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #32373c;
    margin-bottom: 6px;
}

/* Input wrapper (icon + input) */
.durumcu-input-wrap {
    position: relative;
}

.durumcu-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Text input */
.durumcu-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    font-size: 14px;
    font-family: inherit;
    color: #000;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.durumcu-input:focus {
    border-color: #cf2e2e;
    box-shadow: 0 0 0 3px rgba(207,46,46,0.10);
}

/* Textarea */
.durumcu-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #000;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    resize: vertical;
    min-height: 130px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.durumcu-textarea:focus {
    border-color: #cf2e2e;
    box-shadow: 0 0 0 3px rgba(207,46,46,0.10);
}

/* Cookie onay satırı */
.durumcu-cookie-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.durumcu-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #cf2e2e;
    cursor: pointer;
    flex-shrink: 0;
}

/* WordPress default p wrapping – kaldır */
.durumcu-comment-form p {
    margin: 0;
}

/* Yorum metni paragrafı */
.comment-content p {
    margin: 0 0 8px;
}
.comment-content p:last-child {
    margin-bottom: 0;
}

/* İç içe yanıtlar (depth > 1) sol girinti */
#comment-list ol {
    margin-top: 12px;
    margin-left: 52px;
    list-style: none;
    padding: 0;
    space-y: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobil: tek sütun form */
@media (max-width: 639px) {
    .durumcu-comment-form {
        grid-template-columns: 1fr;
    }
}

/* WordPress reply title h3 – sıfırla, span içinde Tailwind ile şekillendirildi */
h3#reply-title {
    margin: 0 0 24px;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* WordPress reply title cancel link konumu */
h3#reply-title #cancel-comment-reply-link {
    font-size: 13px;
    font-weight: 600;
    margin-left: 12px;
    vertical-align: middle;
}

/* #respond varsayılan margin sıfırlama */
#respond {
    margin-top: 0;
}



