/* ============================================================
   Spots — Frontend Custom Styles
   Premium Corporate Catalog UI
   ============================================================ */

/* ----------------------------------------------------------
   Base
   ---------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Custom scrollbar */
::-webkit-scrollbar         { width: 5px; height: 5px; }
::-webkit-scrollbar-track   { background: #f4f4f5; }
::-webkit-scrollbar-thumb   { background: #d4d4d8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* ----------------------------------------------------------
   Navbar — scroll state
   ---------------------------------------------------------- */

/* Transparent start state (used on home hero) */
.navbar-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

/* Hero page: navbar overlays full-viewport hero (not white body above main) */
body.page-hero #mainNavbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

body.page-hero .hero-section {
    /* Hero starts at viewport top; navbar floats over it */
    margin-top: 0;
}

body.page-hero .hero-section .hero-content {
    padding-top: 5.5rem; /* clear fixed navbar (~68px) */
}

/* After scrolling: solid white */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom-color: #e4e4e7 !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* Transition applied to the main nav element */
#mainNavbar {
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Nav link colors — CSS only (avoids Tailwind CDN overriding hero transparent state) */
#mainNavbar .nb-link {
    color: #52525b;
}
#mainNavbar .nb-link:hover {
    color: #18181b;
    background-color: #fafafa;
}
#mainNavbar .nb-link-active {
    color: #1d4ed8;
    font-weight: 600;
}
#mainNavbar .nb-link-active:hover {
    color: #1d4ed8;
    background-color: #eff6ff;
}
#mainNavbar .nb-logo-text {
    color: #18181b;
}
#mainNavbar .nb-burger {
    color: #52525b;
}
#mainNavbar .nb-burger:hover {
    background-color: #f4f4f5;
}
#mainNavbar .nb-phone {
    color: #1d4ed8;
}
#mainNavbar .nb-phone:hover {
    color: #1e40af;
}
#mainNavbar .nb-chevron {
    color: #a1a1aa;
}
#mainNavbar .nb-lang-bg {
    background-color: #f4f4f5;
}
#mainNavbar .nb-lang-active {
    background-color: #fff;
    color: #18181b;
}
#mainNavbar .nb-lang-inactive {
    color: #71717a;
}
#mainNavbar .nb-lang-inactive:hover {
    color: #3f3f46;
}

/* Hero page — transparent navbar at top (white on dark hero) */
#mainNavbar.navbar-transparent:not(.navbar-scrolled) {
    border-color: rgba(255, 255, 255, 0.15);
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-link {
    color: rgba(255, 255, 255, 0.87) !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12);
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-link-active {
    color: #fff !important;
    font-weight: 600;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-link-active:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12);
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-logo-text {
    color: #fff !important;
}
/* Renkli logoları bozmadan hero üzerinde okunaklı tut (invert filtresi beyaz kare yapıyordu) */
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-logo-wrap {
    background: rgba(255, 255, 255, 0.96);
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#mainNavbar.navbar-scrolled .nb-logo-wrap,
#mainNavbar:not(.navbar-transparent) .nb-logo-wrap {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
#mainNavbar .nb-logo-img {
    transition: none;
}

/* Footer — orijinal logo renkleri (brightness/invert kaldırıldı) */
.footer-logo-img {
    flex-shrink: 0;
}

#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-burger {
    color: rgba(255, 255, 255, 0.9) !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-burger:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-lang-bg {
    background-color: rgba(255, 255, 255, 0.15) !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-lang-active {
    background-color: #fff !important;
    color: #18181b !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-lang-inactive {
    color: rgba(255, 255, 255, 0.7) !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-lang-inactive:hover {
    color: #fff !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-phone {
    color: rgba(255, 255, 255, 0.9) !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-phone:hover {
    color: #fff !important;
}
#mainNavbar.navbar-transparent:not(.navbar-scrolled) .nb-chevron {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ----------------------------------------------------------
   Mega Menu
   ---------------------------------------------------------- */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Category columns inside mega menu */
.mega-menu-col {
    border-right: 1px solid #f4f4f5;
}
.mega-menu-col:last-child {
    border-right: none;
}

/* Mega menu link hover bar */
.mega-link {
    position: relative;
    transition: color 0.15s;
}
.mega-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -1px;
    width: 0; height: 2px;
    background: #2563eb;
    transition: width 0.2s ease;
}
.mega-link:hover::after {
    width: 100%;
}

/* ----------------------------------------------------------
   Mobile Drawer
   ---------------------------------------------------------- */
#mobileDrawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

#mobileDrawer.is-open {
    pointer-events: auto;
}

/* Overlay backdrop */
#drawerBackdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

#mobileDrawer.is-open #drawerBackdrop {
    background: rgba(0, 0, 0, 0.45);
}

/* Slide panel */
#drawerPanel {
    position: absolute;
    top: 0; left: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: #fff;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
}

#mobileDrawer.is-open #drawerPanel {
    transform: translateX(0);
}

/* Drawer accordion for sub-categories */
.drawer-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.drawer-sub.is-open {
    max-height: var(--drawer-sub-h, 1200px);
}

/* İç içe alt kategori listesi */
.drawer-sub .drawer-sub.is-open {
    overflow: visible;
}

/* Legacy mobileMenu — keep for fallback */
#mobileMenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}
#mobileMenu.open {
    max-height: 700px;
    opacity: 1;
}

/* ----------------------------------------------------------
   Hero Slider
   ---------------------------------------------------------- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100svh;      /* use svh for mobile browser bars */
    min-height: 560px;
    overflow: hidden;
    background: #18181b;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Zoom / Ken Burns effect on hero bg image */
.hero-slide .hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    will-change: transform;
    transition: transform 8s ease;
}

.swiper-slide-active .hero-bg-img {
    transform: scale(1.06);
}

/* Gradient overlay */
.hero-slide .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.12) 0%,
        rgba(0, 0, 0, 0.40) 40%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 1;
}

/* Hero content above overlay */
.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
}

/* Hero typography */
.hero-title {
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.375rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1rem;
    max-width: 40rem;
    line-height: 1.5;
}

/* Hero CTA button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    background: #fff;
    color: #18181b;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.hero-cta:hover {
    background: #f4f4f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

/* Hero scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator span {
    display: block;
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    position: relative;
}
.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 5px; left: 50%;
    width: 4px; height: 7px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollBounce 1.6s ease infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50%       { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

/* Hero Swiper nav buttons — large premium style */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    width: 48px !important;
    height: 48px !important;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    transition: background 0.2s, border-color 0.2s;
}
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255,255,255,0.55);
}
.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 13px !important;
    font-weight: 700;
    color: #fff;
}

/* Hero pagination dots */
.hero-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.45);
    opacity: 1;
    transition: width 0.3s, background 0.3s;
}
.hero-swiper .swiper-pagination-bullet-active {
    width: 28px;
    border-radius: 4px;
    background: #fff !important;
}

/* ----------------------------------------------------------
   General Swiper overrides
   ---------------------------------------------------------- */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 14px !important;
    font-weight: 700;
    color: #fff;
}

.swiper-button-next,
.swiper-button-prev {
    width: 36px !important;
    height: 36px !important;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.7);
}

.swiper-pagination-bullet-active {
    background: #2563eb !important;
}

/* Thumbnail swiper */
.thumb-swiper .swiper-slide {
    opacity: 0.5;
    transition: opacity 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
}
.thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #2563eb;
}
.thumb-swiper .swiper-slide:hover {
    opacity: 0.8;
}

/* ----------------------------------------------------------
   Product Card
   ---------------------------------------------------------- */
.product-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

/* Square image container — fit by width, letterbox top/bottom if needed */
.product-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ffffff;
    border-radius: 0.75rem 0.75rem 0 0;
}

.product-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.04);
}

/* Lazy image skeleton pulse */
.product-card-img img[data-src] {
    background: #f4f4f5;
}

/* Category card */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 4 / 3;
    background: #e4e4e7;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.11);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 55%);
    transition: background 0.3s;
}
.category-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 55%);
}

/* Catalog card */
.catalog-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.10);
}

/* ----------------------------------------------------------
   Section titles
   ---------------------------------------------------------- */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #18181b;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 1rem;
    color: #71717a;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.section-divider {
    display: block;
    width: 3rem;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
    margin-top: 0.875rem;
}

/* ----------------------------------------------------------
   Lazy image load state
   ---------------------------------------------------------- */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.img-skeleton {
    background: linear-gradient(90deg, #f4f4f5 25%, #e9e9eb 50%, #f4f4f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

/* Once loaded, skeleton fades out */
img.lazy-loaded {
    animation: imgFadeIn 0.4s ease forwards;
}

@keyframes imgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ----------------------------------------------------------
   Scroll reveal / animate
   ---------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-in {
    animation: fadeInUp 0.55s ease forwards;
}
.animate-fade {
    animation: fadeIn 0.55s ease forwards;
}

/* Stagger delays for children */
[data-stagger] > *:nth-child(1) { animation-delay: 0ms; }
[data-stagger] > *:nth-child(2) { animation-delay: 80ms; }
[data-stagger] > *:nth-child(3) { animation-delay: 160ms; }
[data-stagger] > *:nth-child(4) { animation-delay: 240ms; }
[data-stagger] > *:nth-child(5) { animation-delay: 320ms; }
[data-stagger] > *:nth-child(6) { animation-delay: 400ms; }

/* ----------------------------------------------------------
   Fancybox overrides
   ---------------------------------------------------------- */
.fancybox__container {
    z-index: 9999;
}

.fancybox__toolbar {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* ----------------------------------------------------------
   PDF viewer chrome
   ---------------------------------------------------------- */
#pdfContainer:fullscreen,
#pdfContainer:-webkit-full-screen {
    background: #18181b;
    padding: 20px;
    max-height: 100vh;
    overflow: auto;
}

/* ----------------------------------------------------------
   Line clamp utilities
   ---------------------------------------------------------- */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ----------------------------------------------------------
   Prose / rich text content
   ---------------------------------------------------------- */
.prose img           { max-width: 100%; height: auto; }
.prose table         { width: 100%; border-collapse: collapse; }
.prose table th,
.prose table td      { border: 1px solid #e4e4e7; padding: 8px 12px; }
.prose table th      { background: #f4f4f5; font-weight: 600; }

/* ----------------------------------------------------------
   Misc UI helpers
   ---------------------------------------------------------- */

/* Focus ring for keyboard accessibility */
.focus-ring:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Aspect ratio helpers (for older browsers) */
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-1-1  { aspect-ratio: 1 / 1; }

/* Horizontal scroll strip (for category/product carousels) */
.scroll-strip {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.scroll-strip::-webkit-scrollbar { display: none; }
.scroll-strip > * {
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* Back to top */
#backToTop {
    transition: opacity 0.3s, transform 0.3s;
}

/* Tag / badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-new  { background: #ecfdf5; color: #059669; }
.badge-feat { background: #eff6ff; color: #2563eb; }

/* ----------------------------------------------------------
   About band
   ---------------------------------------------------------- */
.about-band {
    background: #18181b;
    color: #fff;
}

/* ----------------------------------------------------------
   Contact map embed
   ---------------------------------------------------------- */
.map-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    display: block;
}

/* ----------------------------------------------------------
   Responsive helpers
   ---------------------------------------------------------- */
@media (max-width: 640px) {
    .hero-title    { letter-spacing: -0.01em; }
    .hero-cta      { padding: 0.65rem 1.5rem; font-size: 0.875rem; }
    .section-title { font-size: 1.5rem; }
}
