/* ================================================
   Markalar Sayfası — Frontend CSS
   ================================================ */

/* --- CSS Custom Properties (defaults, overridden by admin inline <style>) --- */
:root {
    --ms-bg-color: #ffffff;
    --ms-text-color: #1a1a1a;
    --ms-font-family: inherit;
    --ms-page-padding-x: 16px;
    --ms-page-padding-y: 32px;
    --ms-hero-bg: #f5f5f5;
    --ms-hero-title-color: #1a1a1a;
    --ms-hero-title-size-d: 28px;
    --ms-hero-title-size-m: 20px;
    --ms-hero-title-weight: 700;
    --ms-hero-desc-color: #666666;
    --ms-hero-desc-size-d: 16px;
    --ms-hero-desc-size-m: 14px;
    --ms-hero-padding-y: 48px;
    --ms-hero-radius: 12px;
    --ms-search-bg: #ffffff;
    --ms-search-border: #e0e0e0;
    --ms-search-radius: 50px;
    --ms-search-text: #333333;
    --ms-search-placeholder: #999999;
    --ms-search-icon: #999999;
    --ms-search-height: 48px;
    --ms-search-font-size: 15px;
    --ms-search-max-width: 480px;
    --ms-alpha-text: #666666;
    --ms-alpha-active: #1a1a1a;
    --ms-alpha-hover: #333333;
    --ms-alpha-font-size: 14px;
    --ms-alpha-weight: 500;
    --ms-alpha-gap: 8px;
    --ms-alpha-disabled: #cccccc;
    --ms-section-title-color: #1a1a1a;
    --ms-section-title-size-d: 24px;
    --ms-section-title-size-m: 20px;
    --ms-section-title-weight: 700;
    --ms-letter-color: #1a1a1a;
    --ms-letter-size-d: 32px;
    --ms-letter-size-m: 24px;
    --ms-letter-weight: 700;
    --ms-letter-margin-top: 32px;
    --ms-letter-margin-bottom: 16px;
    --ms-card-bg: #f9f9f9;
    --ms-card-hover-bg: #f0f0f0;
    --ms-card-border: #eeeeee;
    --ms-card-radius: 12px;
    --ms-card-padding: 16px;
    --ms-card-gap: 12px;
    --ms-card-shadow: none;
    --ms-card-hover-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --ms-card-transition: all 0.2s ease;
    --ms-brand-name-color: #1a1a1a;
    --ms-brand-name-size: 15px;
    --ms-brand-name-weight: 600;
    --ms-tag-bg: #f0f0f0;
    --ms-tag-text: #555555;
    --ms-tag-border: #e0e0e0;
    --ms-tag-radius: 20px;
    --ms-tag-font-size: 12px;
    --ms-tag-padding-x: 12px;
    --ms-tag-padding-y: 4px;
    --ms-carousel-arrow-bg: #ffffff;
    --ms-carousel-arrow-color: #333333;
    --ms-carousel-arrow-size: 40px;
    --ms-carousel-arrow-border: #e0e0e0;
    --ms-carousel-dot-color: #cccccc;
    --ms-carousel-dot-active: #333333;
}

/* === CONTAINER-SCOPED FULL RESET === */
.ms-wrap,
.ms-wrap *,
.ms-wrap *::before,
.ms-wrap *::after {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    font-family: var(--ms-font-family, inherit) !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    min-height: unset !important;
    height: auto !important;
    text-decoration: none !important;
    outline: none !important;
    list-style: none !important;
    float: none !important;
    vertical-align: baseline !important;
}

.ms-wrap h1,
.ms-wrap h2,
.ms-wrap h3,
.ms-wrap h4,
.ms-wrap h5,
.ms-wrap h6 {
    font-size: inherit !important;
    font-weight: inherit !important;
}

.ms-wrap p,
.ms-wrap a,
.ms-wrap span,
.ms-wrap div {
    color: inherit !important;
}

.ms-wrap img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border: 0 !important;
}

.ms-wrap button,
.ms-wrap input,
.ms-wrap select,
.ms-wrap textarea {
    font: inherit !important;
    color: inherit !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
}

.ms-wrap ul,
.ms-wrap ol,
.ms-wrap li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ms-wrap label {
    cursor: pointer !important;
}

/* =============================
   LAYOUT — .ms-wrap
   ============================= */
.ms-wrap {
    background: var(--ms-bg-color) !important;
    color: var(--ms-text-color) !important;
    padding: var(--ms-page-padding-y) var(--ms-page-padding-x) !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* =============================
   HERO
   ============================= */
body .ms-wrap .ms-hero {
    background: var(--ms-hero-bg) !important;
    border-radius: 28px !important;
    padding: 56px 32px !important;
    text-align: center !important;
    margin-bottom: 40px !important;
}

.ms-hero__title {
    color: var(--ms-hero-title-color) !important;
    font-size: var(--ms-hero-title-size-d) !important;
    font-weight: var(--ms-hero-title-weight) !important;
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
}

.ms-hero__desc {
    color: var(--ms-hero-desc-color) !important;
    font-size: var(--ms-hero-desc-size-d) !important;
    margin-bottom: 24px !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =============================
   SEARCH
   ============================= */
.ms-search {
    position: relative !important;
    max-width: var(--ms-search-max-width) !important;
    margin: 0 auto 20px !important;
    display: flex !important;
    align-items: center !important;
}

.ms-search__icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--ms-search-icon) !important;
    pointer-events: none !important;
    width: 20px !important;
    height: 20px !important;
}

body .ms-wrap .ms-search__input,
body .ms-wrap input[type="text"].ms-search__input,
input[type="text"].ms-search__input {
    width: 100% !important;
    height: var(--ms-search-height) !important;
    background: var(--ms-search-bg) !important;
    border: 1px solid var(--ms-search-border) !important;
    border-radius: var(--ms-search-radius) !important;
    padding: 0 16px 0 48px !important;
    font-size: var(--ms-search-font-size) !important;
    color: var(--ms-search-text) !important;
    min-height: unset !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: text !important;
}

body .ms-wrap .ms-search__input::placeholder {
    color: var(--ms-search-placeholder) !important;
}

body .ms-wrap .ms-search__input:focus {
    border-color: var(--ms-alpha-active) !important;
    box-shadow: 0 0 0 2px rgba(26,26,26,0.1) !important;
}

/* Search wrapper anchors the suggestions dropdown. */
.ms-search-wrap {
    position: relative !important;
    max-width: var(--ms-search-max-width) !important;
    margin: 0 auto 20px !important;
}

.ms-search-wrap .ms-search {
    margin: 0 !important;
    max-width: none !important;
}

.ms-search__suggestions {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
    max-height: 380px !important;
    overflow-y: auto !important;
}

.ms-search__suggestions[hidden] { display: none !important; }

.ms-search__suggestion {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 10px 14px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: background 0.15s ease !important;
    color: #111 !important;
    font-size: 14px !important;
}

.ms-search__suggestion:last-child { border-bottom: none !important; }
.ms-search__suggestion:hover,
.ms-search__suggestion:focus,
.ms-search__suggestion--active {
    background: rgba(0,0,0,0.04) !important;
    outline: none !important;
}

.ms-search__suggestion-logo {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    background: #f5f5f5 !important;
    object-fit: cover !important;
}

.ms-search__suggestion-name {
    font-weight: 600 !important;
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ms-search__suggestion-tags {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.ms-search__suggestion-tag {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    background: rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #444 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* =============================
   ALPHABET FILTER
   ============================= */
.ms-alphabet {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: var(--ms-alpha-gap) !important;
    margin: 0 auto !important;
}

body .ms-wrap .ms-alphabet__letter,
body .ms-wrap button.ms-alphabet__letter,
button.ms-alphabet__letter {
    background: transparent !important;
    border: none !important;
    color: var(--ms-alpha-text) !important;
    font-size: var(--ms-alpha-font-size) !important;
    font-weight: var(--ms-alpha-weight) !important;
    cursor: pointer !important;
    padding: 4px 6px !important;
    min-height: unset !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: color 0.2s ease !important;
}

body .ms-wrap .ms-alphabet__letter:hover {
    color: var(--ms-alpha-hover) !important;
}

body .ms-wrap .ms-alphabet__letter--active {
    color: var(--ms-alpha-active) !important;
    font-weight: 700 !important;
}

body .ms-wrap .ms-alphabet__letter--disabled {
    color: var(--ms-alpha-disabled) !important;
    cursor: default !important;
    pointer-events: none !important;
}

body .ms-wrap .ms-alphabet__letter--current {
    color: var(--ms-alpha-active) !important;
    font-weight: 700 !important;
}

/* =============================
   FEATURED (CAROUSEL)
   ============================= */
.ms-featured {
    margin-bottom: 48px !important;
}

.ms-featured__title {
    color: var(--ms-section-title-color) !important;
    font-size: var(--ms-section-title-size-d) !important;
    font-weight: var(--ms-section-title-weight) !important;
    margin-bottom: 20px !important;
}

.ms-carousel {
    position: relative !important;
    overflow: visible !important;
}

.ms-carousel__track {
    overflow: hidden !important;
    width: 100% !important;
}

.ms-carousel__viewport {
    display: flex !important;
    transition: transform 0.4s ease !important;
    will-change: transform !important;
}

.ms-carousel__item {
    flex-shrink: 0 !important;
    display: block !important;
}

.ms-carousel__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body .ms-wrap .ms-carousel__arrow,
body .ms-wrap button.ms-carousel__arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: var(--ms-carousel-arrow-size) !important;
    height: var(--ms-carousel-arrow-size) !important;
    background: var(--ms-carousel-arrow-bg) !important;
    border: 1px solid var(--ms-carousel-arrow-border) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    transition: opacity 0.2s ease !important;
    min-height: unset !important;
    padding: 0 !important;
    color: var(--ms-carousel-arrow-color) !important;
}

.ms-carousel__arrow--prev {
    left: -20px !important;
}

.ms-carousel__arrow--next {
    right: -20px !important;
}

.ms-carousel__arrow svg {
    width: 24px !important;
    height: 24px !important;
}

.ms-carousel__dots {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
}

.ms-carousel__dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--ms-carousel-dot-color) !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: background 0.2s !important;
}

.ms-carousel__dot--active {
    background: var(--ms-carousel-dot-active) !important;
}

.ms-carousel__progress {
    position: relative !important;
    width: 100% !important;
    max-width: 280px !important;
    height: 5px !important;
    margin: 20px auto 0 !important;
    background: rgba(0, 0, 0, 0.10) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}

.ms-carousel__progress-thumb {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 25%;
    background: rgba(0, 0, 0, 0.75) !important;
    border-radius: 999px !important;
    transform: translateX(0);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), width 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform, width !important;
}

/* =============================
   ALL BRANDS
   ============================= */
.ms-brands {
    margin-bottom: 40px !important;
}

body .ms-wrap .ms-brands__title {
    color: #000 !important;
    font-size: 36px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.1 !important;
    margin-bottom: 24px !important;
}

.ms-brands__group {
    margin-bottom: 32px !important;
    /* Offset for sticky theme header so scroll target lands below it. */
    scroll-margin-top: 110px !important;
}

.ms-brand-card {
    scroll-margin-top: 110px !important;
    transition: box-shadow 0.4s ease, background-color 0.4s ease !important;
}

.ms-brand-card--flash {
    box-shadow: 0 0 0 2px #111, 0 8px 20px rgba(0,0,0,0.10) !important;
    background-color: rgba(0,0,0,0.04) !important;
}

@media (max-width: 767px) {
    .ms-brands__group,
    .ms-brand-card {
        scroll-margin-top: 80px !important;
    }
}

.ms-brands__group[data-letter] {
    display: flex !important;
    gap: 24px !important;
}

.ms-brands__letter {
    color: #000 !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
    margin-top: var(--ms-letter-margin-top) !important;
    margin-bottom: var(--ms-letter-margin-bottom) !important;
    flex-shrink: 0 !important;
    width: 48px !important;
    display: flex !important;
    align-items: flex-start !important;
    padding-top: 12px !important;
}

.ms-brands__grid {
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(var(--ms-cols-desktop, 2), 1fr) !important;
    gap: var(--ms-card-gap) !important;
}

/* =============================
   BRAND CARD
   ============================= */
body .ms-wrap .ms-brand-card,
body .ms-wrap a.ms-brand-card,
a.ms-brand-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: var(--ms-card-bg) !important;
    border: 1px solid var(--ms-card-border) !important;
    border-radius: var(--ms-card-radius) !important;
    padding: var(--ms-card-padding) !important;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: var(--ms-card-shadow) !important;
    transition: var(--ms-card-transition) !important;
    cursor: pointer !important;
    min-height: unset !important;
    height: auto !important;
}

body .ms-wrap .ms-brand-card:hover,
body .ms-wrap a.ms-brand-card:hover {
    background: var(--ms-card-hover-bg) !important;
    box-shadow: var(--ms-card-hover-shadow) !important;
}

.ms-brand-card__logo {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ms-brand-card__logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.ms-brand-card__info {
    flex: 1 !important;
    min-width: 0 !important;
}

.ms-brand-card__name {
    color: var(--ms-brand-name-color) !important;
    font-size: var(--ms-brand-name-size) !important;
    font-weight: var(--ms-brand-name-weight) !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.ms-brand-card__count {
    font-size: 12px !important;
    color: #999 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.ms-brand-card__tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 4px !important;
}

.ms-brand-card__tag {
    display: inline-block !important;
    background: var(--ms-tag-bg) !important;
    color: var(--ms-tag-text) !important;
    border: 1px solid var(--ms-tag-border) !important;
    border-radius: var(--ms-tag-radius) !important;
    font-size: var(--ms-tag-font-size) !important;
    padding: var(--ms-tag-padding-y) var(--ms-tag-padding-x) !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

/* =============================
   NO RESULTS
   ============================= */
.ms-no-results {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #999 !important;
    font-size: 16px !important;
}

/* =============================
   SCROLL TO TOP
   ============================= */
.ms-scroll-top {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 40px !important;
    height: 40px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: opacity 0.3s ease !important;
    padding: 0 !important;
    color: #333 !important;
}

.ms-scroll-top:hover {
    background: #f5f5f5 !important;
}

/* =============================
   RESPONSIVE — Tablet
   ============================= */
@media (max-width: 1023px) {
    body .ms-wrap .ms-carousel__arrow,
    body .ms-wrap button.ms-carousel__arrow {
        width: 28px !important;
        height: 28px !important;
    }
    .ms-carousel__arrow svg {
        width: 16px !important;
        height: 16px !important;
    }
    .ms-carousel__arrow--prev { left: -14px !important; }
    .ms-carousel__arrow--next { right: -14px !important; }

    .ms-brands__group[data-letter] {
        flex-direction: column !important;
        gap: 0 !important;
    }

    body .ms-wrap .ms-brands__letter {
        width: auto !important;
        margin-top: 28px !important;
        margin-bottom: 12px !important;
        padding-top: 0 !important;
        font-size: 38px !important;
        font-weight: 800 !important;
        color: #000 !important;
        letter-spacing: -0.01em !important;
        line-height: 1 !important;
    }

    body .ms-wrap .ms-brands__title {
        font-size: 32px !important;
        font-weight: 800 !important;
        color: #000 !important;
        letter-spacing: -0.01em !important;
        line-height: 1.1 !important;
        margin-bottom: 20px !important;
    }

    .ms-alphabet {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }

    .ms-alphabet::-webkit-scrollbar {
        display: none !important; /* Chrome, Safari, Opera */
    }
}

/* =============================
   RESPONSIVE — Mobile
   ============================= */
@media (max-width: 767px) {
    body .ms-wrap .ms-hero {
        padding: 40px 24px !important;
        border-radius: 24px !important;
        margin-bottom: 24px !important;
    }

    .ms-hero__title {
        font-size: var(--ms-hero-title-size-m) !important;
    }

    .ms-hero__desc {
        font-size: var(--ms-hero-desc-size-m) !important;
        margin-bottom: 16px !important;
    }

    .ms-search {
        max-width: 100% !important;
        margin-bottom: 16px !important;
    }

    /* Alphabet: wrap to multiple rows so all 26 letters are visible without scroll. */
    .ms-alphabet {
        overflow-x: visible !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding-bottom: 0 !important;
        column-gap: 4px !important;
        row-gap: 6px !important;
    }
    body .ms-wrap .ms-alphabet__letter,
    body .ms-wrap button.ms-alphabet__letter,
    button.ms-alphabet__letter {
        min-width: 26px !important;
        padding: 4px 4px !important;
        text-align: center !important;
    }

    .ms-featured__title {
        font-size: var(--ms-section-title-size-m) !important;
    }

    body .ms-wrap .ms-brands__title {
        font-size: 32px !important;
        font-weight: 800 !important;
        color: #000 !important;
        letter-spacing: -0.01em !important;
        line-height: 1.1 !important;
        margin-bottom: 20px !important;
    }

    .ms-brands__letter {
        font-size: 38px !important;
        font-weight: 800 !important;
        color: #000 !important;
        margin-top: 28px !important;
        margin-bottom: 12px !important;
        padding-top: 0 !important;
        letter-spacing: -0.01em !important;
        line-height: 1 !important;
    }

    .ms-brands__grid {
        grid-template-columns: repeat(var(--ms-cols-mobile, 1), 1fr) !important;
    }

    body .ms-wrap .ms-carousel__arrow,
    body .ms-wrap button.ms-carousel__arrow {
        width: 24px !important;
        height: 24px !important;
    }
    .ms-carousel__arrow svg {
        width: 14px !important;
        height: 14px !important;
    }
    .ms-carousel__arrow--prev { left: -12px !important; }
    .ms-carousel__arrow--next { right: -12px !important; }

    .ms-scroll-top {
        bottom: 16px !important;
        right: 16px !important;
        width: 36px !important;
        height: 36px !important;
    }
}

/* =============================
   WoodMart / Astra / Theme Overrides
   ============================= */
body .ms-wrap .ms-hero,
body .ms-wrap .ms-brand-card,
body .ms-wrap .ms-brand-card__tag,
body .ms-wrap .ms-carousel__arrow {
    box-sizing: border-box !important;
}

body .ms-wrap a:hover,
body .ms-wrap a:focus,
body .ms-wrap a:active {
    text-decoration: none !important;
}

body .ms-wrap .ms-brand-card__logo img,
body .ms-wrap .ms-carousel__image {
    border: 0 !important;
    box-shadow: none !important;
}

body .ms-wrap input:focus {
    outline: none !important;
}
