/* ================================================
   ORCA ORMAN ÜRÜNLERİ - PREMIUM DESIGN SYSTEM
   Version: 2.0
   ================================================ */

/* ================================================
   CSS VARIABLES - COLOR PALETTE
   ================================================ */
:root {
    /* Safe fallback for images/videos if Tailwind fails */
    --image-max-width: 100%;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block; /* Fixes inline spacing issues */
}

:root {
    /* Primary Brand Colors */
    --brand-wood-primary: #D4A373;
    --brand-wood-light: #E8C39E;
    --brand-wood-dark: #C19A6B;

    /* Neutral Palette */
    --neutral-black: #0a0a0a;
    --neutral-dark: #1a1a1a;
    --neutral-charcoal: #2a2a2a;

    /* Accent Colors */
    --accent-gold: #E8C39E;
    --accent-bronze: #B8956A;

    /* Semantic Colors */
    --background-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f1410 100%);
    --background-overlay: rgba(10, 10, 10, 0.85);
    --glass-background: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Shadows (for depth) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(212, 163, 115, 0.3);

    /* Transitions */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================
   PREMIUM TYPOGRAPHY SYSTEM
   ================================================ */
.text-display {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.text-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.text-body-premium {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.8;
}

.text-label-premium {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Text Shadows for Depth */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ================================================
   PREMIUM ANIMATIONS
   ================================================ */

/* Fade In Up Animation */
@keyframes fadeInUpPremium {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Logo Float for Loader */
@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer Rotate for Loader */
@keyframes shimmerRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Shimmer Bar Animation */
@keyframes shimmerBar {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Pulse Glow for Active States */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(212, 163, 115, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow:
            0 0 30px rgba(212, 163, 115, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* ================================================
   SCROLL-TRIGGERED ANIMATIONS
   ================================================ */
.fade-in-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-visible:nth-child(1) {
    transition-delay: 0.1s;
}

.fade-in-visible:nth-child(2) {
    transition-delay: 0.2s;
}

.fade-in-visible:nth-child(3) {
    transition-delay: 0.3s;
}

.fade-in-visible:nth-child(4) {
    transition-delay: 0.4s;
}

.fade-in-visible:nth-child(5) {
    transition-delay: 0.5s;
}

/* ================================================
   NAVIGATION - GLASSMORPHISM
   ================================================ */
nav.premium-nav {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(212, 163, 115, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s var(--transition-smooth);
}

nav.premium-nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border-bottom-color: rgba(212, 163, 115, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Nav Link with Animated Underline */
.nav-link-premium {
    position: relative;
    color: white;
    padding: 1rem 1.5rem;
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
}

.nav-link-premium::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--brand-wood-primary),
            transparent);
    transform: scaleX(0);
    transition: transform 0.3s var(--transition-smooth);
}

.nav-link-premium:hover::after {
    transform: scaleX(1);
}

.nav-link-premium:hover {
    color: var(--brand-wood-primary);
}

/* Premium Dropdown */
.dropdown-premium {
    display: none;
    position: absolute;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    min-width: 220px;
    border-radius: 16px;
    border: 1px solid rgba(212, 163, 115, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    z-index: 1000;
    top: 100%;
    margin-top: 0;
    padding-top: 10px;
    /* Invisible bridge for hover */
    left: 0;
    overflow: visible;
    /* Changed from hidden to allow box-shadow */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s var(--transition-smooth);
    pointer-events: none;
    clip-path: inset(0 -100% -100% -100%);
    /* Alternative to overflow hidden that allows shadow */
}

/* Fix for inner content to act as the visual container */
.dropdown-premium::before {
    content: '';
    position: absolute;
    top: 10px;
    /* Match padding-top */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(212, 163, 115, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Revert background on main element since we used pseudo */
.dropdown-premium {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dropdown:hover .dropdown-premium {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-premium a {
    color: rgba(255, 255, 255, 0.9);
    padding: 14px 20px;
    text-decoration: none;
    display: block;
    transition: all 0.3s var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Ensure links are cleanly inside the rounded corners */
.dropdown-premium a:first-child {
    border-radius: 16px 16px 0 0;
}

.dropdown-premium a:last-child {
    border-radius: 0 0 16px 16px;
    border-bottom: none;
}

.dropdown-premium a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(212, 163, 115, 0.15),
            transparent);
    transform: translateX(-100%);
    transition: transform 0.4s var(--transition-smooth);
    z-index: -1;
}

.dropdown-premium a:hover::before {
    transform: translateX(100%);
}

.dropdown-premium a:hover {
    background: rgba(212, 163, 115, 0.1);
    color: var(--brand-wood-primary);
    padding-left: 28px;
}



/* ================================================
   GLASS PANEL - PREMIUM REDESIGN
   ================================================ */
.glass-panel-premium {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.5s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    /* Grid Layout Helper */
    /* flex property removed to strictly obey HTML width classes */
}

/* ================================================
   MOBILE MENU STYLES (Fixed)
   ================================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    /* Below nav button */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-menu a:hover {
    color: var(--brand-wood-primary);
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }

    .mobile-menu-button {
        display: none !important;
    }
}

.glass-panel-premium::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(212, 163, 115, 0.2) 50%,
            transparent 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s var(--transition-smooth);
    z-index: -1;
}

.glass-panel-premium:hover::before {
    opacity: 1;
}

.glass-panel-premium:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(212, 163, 115, 0.3);
    transform: translateY(-8px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(212, 163, 115, 0.15);
}

/* ================================================
   VARIANT BUTTONS - PREMIUM STYLING
   ================================================ */
.variant-btn-premium {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s var(--transition-smooth);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.variant-btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s var(--transition-smooth);
}

.variant-btn-premium:hover::before {
    left: 100%;
}

.variant-btn-premium:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.variant-btn-premium.active {
    background: linear-gradient(135deg,
            rgba(212, 163, 115, 0.5) 0%,
            rgba(212, 163, 115, 0.3) 100%);
    border: 2px solid var(--brand-wood-primary);
    color: var(--brand-wood-primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow:
        0 0 20px rgba(212, 163, 115, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulse-glow 2s var(--transition-smooth) infinite;
}

/* ================================================
   TEKLIF AL BUTTON - PREMIUM STYLING
   ================================================ */
.teklif-btn {
    background: linear-gradient(135deg,
            #D4A373 0%,
            #E8C39E 100%);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    box-shadow:
        0 4px 16px rgba(212, 163, 115, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.teklif-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s var(--transition-smooth);
}

.teklif-btn:hover::before {
    left: 100%;
}

.teklif-btn:hover {
    background: linear-gradient(135deg,
            #E8C39E 0%,
            #F5D576 100%);
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(212, 163, 115, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.teklif-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(212, 163, 115, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ================================================
   FLOATING IMAGE ANIMATION
   ================================================ */
.floating-image {
    animation: float 6s ease-in-out infinite;
}

/* ================================================
   PREMIUM LOADER
   ================================================ */
#loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg,
            #0a0a0a 0%,
            #1a1a1a 50%,
            #0f1410 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s var(--transition-smooth);
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(212, 163, 115, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.loader-shimmer {
    position: absolute;
    inset: -20px;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            rgba(212, 163, 115, 0.5) 90deg,
            rgba(212, 163, 115, 0.8) 180deg,
            rgba(212, 163, 115, 0.5) 270deg,
            transparent 360deg);
    border-radius: 50%;
    animation: shimmerRotate 3s linear infinite;
    filter: blur(20px);
    z-index: 1;
}

.loader-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.loader-bar {
    height: 100%;
    background: linear-gradient(90deg,
            var(--brand-wood-dark, #C19A6B) 0%,
            var(--brand-wood-primary, #D4A373) 50%,
            var(--brand-wood-light, #E8C39E) 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    width: 0%;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(212, 163, 115, 0.6);
    animation: shimmerBar 2s linear infinite;
}

.loader-percentage {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-wood-primary, #D4A373);
    font-family: 'Inter', monospace;
    letter-spacing: 0.1em;
}

/* ================================================
   FOOTER PREMIUM STYLING
   ================================================ */
footer.premium-footer {
    position: relative;
    background: linear-gradient(to bottom,
            rgba(10, 10, 10, 0.95) 0%,
            rgba(5, 5, 5, 1) 100%);
    border-top: 1px solid rgba(212, 163, 115, 0.2);
    padding-top: 4rem;
    padding-bottom: 2rem;
    overflow: hidden;
}

footer.premium-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--brand-wood-primary, #D4A373) 50%,
            transparent 100%);
    opacity: 0.5;
}

footer.premium-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px,
            rgba(212, 163, 115, 0.05) 1px,
            transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    opacity: 0.3;
}

footer.premium-footer h3 {
    color: var(--brand-wood-primary, #D4A373);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 0.75rem;
}

footer.premium-footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg,
            var(--brand-wood-primary, #D4A373) 0%,
            transparent 100%);
}

footer.premium-footer a {
    position: relative;
    transition: all 0.3s var(--transition-smooth);
}

footer.premium-footer a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brand-wood-primary, #D4A373);
    transition: width 0.3s var(--transition-smooth);
}

footer.premium-footer a:hover::before {
    width: 100%;
}

footer.premium-footer a:hover {
    color: var(--brand-wood-primary, #D4A373);
    transform: translateX(4px);
}

footer.premium-footer img {
    filter: drop-shadow(0 0 20px rgba(212, 163, 115, 0.2));
    transition: filter 0.4s var(--transition-smooth);
}

footer.premium-footer img:hover {
    filter: drop-shadow(0 0 32px rgba(212, 163, 115, 0.4));
}

/* Footer contact email is one long unbreakable token; let it wrap inside the
   narrow 4-up footer columns (~144px at 768px) instead of overflowing the
   column. min-width:0 lets the <span> shrink within its flex <a>. */
footer a[href^="mailto:"] span {
    overflow-wrap: anywhere;
    min-width: 0;
}

/* ================================================
   MOBILE OPTIMIZATIONS
   ================================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .glass-panel-premium {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .floating-image {
        animation: none;
    }

    .variant-btn-premium,
    .teklif-btn,
    button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Mobile Menu */
.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: all 0.3s var(--transition-smooth);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s var(--transition-smooth);
}

.mobile-menu-button.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

@media (max-width: 1023px) {
    .mobile-menu-button {
        display: flex;
    }
}

/* Desktop nav (Tailwind md:, >=768px) is hidden below 1024px so it never
   collides with the hamburger — which now covers the whole tablet-portrait
   range. Selector is scoped to <nav>; the floating "YAPAY ZEKA" buttons
   also use hidden md:block but sit outside <nav>, so they are unaffected. */
@media (max-width: 1023px) {
    nav .hidden.md\:flex,
    nav .hidden.md\:block {
        display: none !important;
    }
}

/* ================================================
   A11Y — SKIP LINK + KEYBOARD FOCUS
   ================================================ */

/* Skip link is visually hidden until focused; first focusable on every page. */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #D4A373;
    color: #1a2e1a;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Visible keyboard focus on all interactive controls. The dark theme
   strips most browser defaults; this restores them in brand colour. */
:where(a, button, [role="button"], input, select, textarea):focus-visible {
    outline: 2px solid #D4A373;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Sticky-nav offset for in-page anchors. .premium-nav renders ~160px
   (h-32 logo + py-4); 11rem clears it with a ~16px margin. */
[id^="cat-"][id$="-detail"],
[id^="product-"],
.detail-section {
    scroll-margin-top: 11rem;
}