* {
    box-sizing: border-box;
}

:root {
    --primary: #2d1c7f;
    --primary-2: #3b2597;
    --accent: #83c41f;
    --accent-2: #9ad63a;
    --ink: #231c46;
    --muted: #5e5a79;
    --bg: #f3f4f8;
    --panel: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at 10% 10%, #f8f6f2 0, #f5f4f8 35%, #eff2f7 100%);
    color: var(--ink);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1280px, 94%);
    margin: 0 auto;
}

.top-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #dce8fb;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(12px);
}

.header-row {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 44px;
    border: 1px solid #c9dcf8;
    border-radius: 10px;
    background: #fff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
    background: #f0f2ff;
    border-color: #b8c9eb;
}

.nav-toggle-bars {
    display: inline-block;
    width: 18px;
    height: 14px;
    background:
        linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) 0 6px / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) 0 12px / 100% 2px no-repeat;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 18px;
}

.header-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.header-nav-link:hover,
.header-nav-link.active {
    background: #f0f2ff;
    color: var(--primary);
}

.header-search {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fff;
    border: 1px solid rgba(26, 54, 93, 0.08);
    box-sizing: border-box;
}

.search-box {
    display: flex;
    position: relative;
}

.search-box input {
    width: 100%;
    border: 1px solid #c9dcf8;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 11px 12px;
    font-size: 14px;
}

.search-box button {
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    min-height: 44px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(131, 196, 31, 0.34);
}

.search-suggestions {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: #fff;
    border: 1px solid #dce6f7;
    border-radius: 10px;
    box-shadow: 0 14px 26px rgba(31, 42, 68, 0.14);
    z-index: 40;
}

.search-suggestion-item {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.search-suggestion-item:hover,
.search-suggestion-item.is-active {
    background: #f2f6ff;
}

.search-suggestion-empty {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 13px;
}

.suggestion-name {
    color: var(--ink);
    font-size: 14px;
}

.suggestion-sku {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.account-nav {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 14px;
}

.header-right {
    min-height: 1px;
}

.main-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

.category-layout {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

.sidebar,
.content,
.site-footer {
    background: #fff;
}

.sidebar {
    border-radius: 16px;
    border: 1px solid #dce6f7;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(25, 63, 122, 0.08);
    animation: fadeUp 0.6s ease both;
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.sidebar__header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--primary);
}

.sidebar__toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: #eef2ff;
    border: 1px solid #c9d4f5;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    min-height: 44px;
}

.sidebar__toggle:hover {
    background: #e2e8ff;
}

.sidebar__toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 12px;
    line-height: 1;
}

.sidebar.is-open .sidebar__toggle-icon {
    transform: rotate(180deg);
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list > li {
    border-bottom: 1px solid #edf2fa;
    padding: 10px 0;
}

.category-title {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.category-title::after {
    content: "+";
    font-size: 16px;
    color: #7f8ba1;
    transition: transform 0.22s ease, color 0.22s ease;
}

.category-list ul {
    margin: 0;
    padding-left: 14px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease;
}

.category-list ul li {
    margin: 6px 0;
    font-size: 14px;
    color: var(--muted);
}

.category-list > li:hover .category-title {
    color: var(--primary);
}

.category-list > li:hover .category-title::after {
    content: "-";
    color: var(--accent);
    transform: rotate(180deg);
}

.category-list > li:hover > ul {
    max-height: 340px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 8px;
}

/* Dokunmatik ve dar ekranda alt kategoriler hover olmadan görünsün */
@media (max-width: 1080px), (hover: none) {
    .category-list ul {
        max-height: none;
        opacity: 1;
        overflow: visible;
        transform: none;
        margin-top: 8px;
    }

    .category-title::after {
        display: none;
    }

    .category-list > li:hover .category-title {
        color: inherit;
    }

    .category-list > li:hover .category-title::after {
        content: none;
    }

    .category-list > li:hover > ul {
        max-height: none;
        opacity: 1;
        transform: none;
    }
}

.content {
    border-radius: 16px;
    border: 1px solid #dce6f7;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(25, 63, 122, 0.08);
    animation: fadeUp 0.7s ease both;
}

.hero-slider {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #dce6f7;
    background: #eef2fb;
    margin-bottom: 20px;
    width: 100%;
}

.mySlides {
    display: none;
    position: relative;
    animation: sliderFade 0.8s ease;
}

.slide-frame {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: #eef2fb;
}

.slide-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide-caption {
    position: relative;
    margin-top: -56px;
    min-height: 56px;
    padding: 14px 18px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(45, 28, 127, 0), rgba(45, 28, 127, 0.86));
    z-index: 2;
}

.slider-dots-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.slider-dots {
    pointer-events: auto;
    display: flex;
    gap: 8px;
}

.slider-arrow {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(45, 28, 127, 0.78);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 6;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.slider-arrow:hover {
    background: rgba(45, 28, 127, 0.95);
    transform: translateY(-50%) scale(1.04);
}

.slider-arrow--prev {
    left: 12px;
}

.slider-arrow--next {
    right: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.slider-dot.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.product-section h2 {
    margin: 10px 0 14px;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--primary);
}

.page-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--primary);
}

.home-hero-title {
    margin: 0 0 16px;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.25;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-card {
    border: 1px solid #d9e5f7;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(18, 55, 112, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    animation: fadeUp 0.55s ease both;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(18, 55, 112, 0.14);
    border-color: #b9cff2;
}

.product-image {
    height: 120px;
    border-radius: 8px;
    background: linear-gradient(160deg, #f2f7ff, #e4eefc);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6785ad;
    margin-bottom: 8px;
}

.product-image img,
.main-image img,
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.product-card h4 {
    margin: 8px 0;
    font-size: 14px;
    min-height: 34px;
}

.stock {
    color: #567096;
    font-size: 12px;
    margin: 6px 0;
}

.detail-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    border-radius: 8px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(31, 42, 68, 0.25);
}

.site-footer {
    margin-top: 22px;
    border-top: 1px solid #dfe7f3;
    padding: 20px 0 0;
}

.site-footer__bottom {
    border-top: 1px solid #dfe7f3;
    padding: 16px 0 20px;
    margin-top: 20px;
    background: rgba(248, 250, 253, 0.65);
}

.site-footer__bottom-inner {
    text-align: center;
}

.site-footer__copyright,
.site-footer__credit {
    margin: 0;
    font-size: 13px;
    color: #5a6b82;
    line-height: 1.5;
}

.site-footer__credit {
    margin-top: 8px;
}

.site-footer__credit a {
    color: var(--primary);
    text-decoration: none;
}

.site-footer__credit a:hover {
    text-decoration: underline;
}

.detail-page {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #dce6f7;
    border-radius: 16px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(25, 63, 122, 0.09);
    animation: fadeUp 0.7s ease both;
}

.main-image {
    height: 360px;
    border-radius: 14px;
    background: linear-gradient(160deg, #f2f7ff, #e4eefc);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6785ad;
    font-size: 20px;
    margin-bottom: 12px;
    position: relative;
}

.thumb-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 560px) {
    .thumb-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .thumb {
        height: 76px;
    }

    .main-image {
        height: min(56vw, 320px);
        min-height: 220px;
    }
}

.thumb {
    height: 90px;
    border-radius: 10px;
    background: linear-gradient(160deg, #f2f7ff, #e4eefc);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6785ad;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumb:hover {
    transform: translateY(-2px);
}

.thumb.active {
    border-color: var(--accent);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 42, 68, 0.78);
    color: #fff;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: min(1200px, 94vw);
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.empty-state {
    width: 100%;
    border: 1px dashed #cdd9ea;
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    color: #516381;
    background: #f9fbff;
}

.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.12s; }
.product-card:nth-child(4) { animation-delay: 0.16s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.24s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sliderFade {
    from {
        opacity: 0.3;
    }
    to {
        opacity: 1;
    }
}

@keyframes shine {
    0%, 25% {
        transform: translateX(-130%);
    }
    55%, 100% {
        transform: translateX(130%);
    }
}

.detail-info h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.detail-text {
    border-top: 1px solid #e5ebf4;
    margin-top: 12px;
    padding-top: 12px;
    color: #334a6b;
    line-height: 1.6;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.footer-grid h4 {
    margin: 0 0 10px;
    color: var(--primary);
}


.footer-grid a {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.whatsapp-float {
    position: fixed;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
    filter: brightness(1.02);
}

.whatsapp-float:active {
    transform: translateY(0);
}

.whatsapp-float:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.35);
    outline-offset: 3px;
}

.whatsapp-float svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

.whatsapp-float__text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.scroll-top {
    position: fixed;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 72px));
    z-index: 10001;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid #c9d4f5;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 22px rgba(25, 63, 122, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease,
        background 0.2s ease, box-shadow 0.2s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #eef2ff;
    box-shadow: 0 10px 26px rgba(25, 63, 122, 0.22);
}

.scroll-top:focus-visible {
    outline: 3px solid rgba(45, 28, 127, 0.35);
    outline-offset: 3px;
}

.scroll-top svg {
    display: block;
}

@media (min-width: 521px) {
    .scroll-top {
        bottom: max(76px, calc(env(safe-area-inset-bottom, 0px) + 62px));
    }
}

@media (max-width: 520px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        padding: 0;
        border-radius: 999px;
        justify-content: center;
        right: 14px;
        bottom: 14px;
    }

    .whatsapp-float__text {
        display: none;
    }
}

@media (max-width: 1080px) {
    .main-grid,
    .category-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 10px 12px;
    }

    .sidebar__header {
        margin-bottom: 0;
        gap: 8px;
        align-items: center;
    }

    .sidebar__header h2 {
        font-size: 15px;
        line-height: 1.25;
    }

    .sidebar__toggle {
        display: inline-flex;
        padding: 6px 10px;
        min-height: 0;
        height: auto;
        font-size: 13px;
        font-weight: 600;
        border-radius: 8px;
        gap: 4px;
    }

    .sidebar__toggle-icon {
        font-size: 10px;
    }

    .sidebar:not(.is-open) .sidebar__body {
        display: none;
    }

    .sidebar.is-open .sidebar__header {
        margin-bottom: 10px;
    }

    /* Mobilde önce kategori listesi, sonra içerik */
    .main-grid > .sidebar,
    .category-layout > .sidebar {
        order: 1;
    }

    .main-grid > .content,
    .category-layout > .content {
        order: 2;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-page {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 992px) {
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .header-nav {
        display: none;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        order: 5;
        gap: 4px;
        padding: 10px 0 4px;
        border-top: 1px solid #e8eef9;
    }

    .header-nav.is-open {
        display: flex;
    }

    .header-nav-link {
        white-space: normal;
        border-radius: 10px;
    }

    .header-search {
        order: 3;
        flex: 1;
        min-width: 120px;
    }

    .logo {
        order: 1;
    }

    .header-row {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 10px;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 720px) {
    .header-row {
        row-gap: 12px;
    }

    .account-nav {
        justify-content: flex-start;
    }

    .hero-slider {
        margin-bottom: 14px;
    }

    .slide-frame img {
        height: 100%;
    }

    .slide-frame {
        height: min(52vw, 280px);
        width: 100%;
        min-height: 200px;
    }

    .slide-caption {
        font-size: clamp(14px, 3.5vw, 18px);
    }

    .slider-arrow {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .slider-arrow--prev {
        left: 8px;
    }

    .slider-arrow--next {
        right: 8px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .detail-info h1 {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    /* En az 2 sütun korunur; dar ekranda kartlar daha kompakt */
    .product-grid {
        gap: 8px;
    }

    .product-card {
        padding: 8px;
    }

    .product-image {
        height: 92px;
        margin-bottom: 6px;
    }

    .product-card h4 {
        font-size: 12px;
        min-height: 2.5em;
        line-height: 1.25;
    }

    .product-card .stock {
        font-size: 11px;
        margin: 4px 0;
    }

    .product-card .detail-btn {
        min-height: 38px;
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .slide-frame {
        min-height: 180px;
        height: 48vw;
    }
}
