/* SSF Unified Frontend Responsive Standard — furniture / arkadaslik quality bar */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
    max-width: 100vw;
}

img, video, svg, canvas, iframe {
    max-width: 100%;
    height: auto;
}

/* Container safety — prevent flex/grid blowout */
.arv-container,
.hh-container,
.fc-container,
.container,
.ssf-container,
.edu-site .container,
.rentacar-container,
.mst-container,
.site-wrap .container,
.kf-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* Prevent horizontal page scroll / stacked overlays */
.site-wrap,
.edu-site,
.fc-site,
.arv-site,
.hh-site,
.mst-site,
.rentacar-site,
.kk-site,
body.premium-theme {
    overflow-x: clip;
    max-width: 100vw;
}

body.arv-nav-open,
body.kk-nav-open,
body.nav-open {
    overflow: hidden;
    touch-action: none;
}

h1, h2, h3, p, a, li, td, th, label, .section-title, .page-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@supports (padding: max(0px)) {
    .arv-container,
    .hh-container,
    .fc-container,
    .container,
    .ssf-container,
    .site-header .container,
    .fc-header-main,
    .fc-promo-inner,
    .fc-trust-inner {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

main,
.arv-main,
.fc-main,
.edu-main,
.hh-main,
.panel-main {
    min-width: 0;
}

/* Horizontal scroll for data tables */
.ssf-table-wrap,
.fc-table-wrap,
.table-responsive,
.table-wrap,
.dg-table-wrap,
.adm-table-wrap,
.adm-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.fc-cart-table {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* iOS form zoom prevention */
@media (max-width: 767px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px;
    }
}

/* Touch-friendly controls */
@media (hover: none), (pointer: coarse) {
    .fc-btn,
    .fc-action,
    .fc-mobile-toggle,
    .mobile-toggle,
    .arv-btn-primary,
    .arv-btn-brass,
    .arv-btn-ghost,
    .hh-btn,
    .hh-btn-primary,
    .hh-btn-coral,
    .nav-cta,
    button[type="submit"],
    .adm-menu-btn,
    .panel-nav-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Hero / page title scaling */
.page-header h1,
.sector-hero h1,
.fc-page-title,
.fc-cart-page h1,
.fc-checkout-page h1,
.arv-page-hero h1,
.hh-hero h1 {
    font-size: clamp(1.5rem, 4.5vw + 0.5rem, 2.75rem);
    line-height: 1.15;
    overflow-wrap: break-word;
}

/* Commerce layouts */
@media (max-width: 768px) {
    .fc-cart-layout,
    .fc-checkout-layout,
    .fc-account-layout,
    .fc-product-layout,
    .fc-shop-layout {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .fc-header-actions .fc-action span:not(.fc-cart-badge):not(.cart-badge) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .fc-header-actions {
        gap: .25rem;
    }

    .fc-search {
        order: 10;
        width: 100%;
        flex: 1 1 100%;
    }

    .fc-cart-table th:nth-child(2),
    .fc-cart-table td:nth-child(2) {
        display: none;
    }

    .fc-cart-table th,
    .fc-cart-table td {
        padding: .65rem .5rem;
        font-size: .8125rem;
    }

    .fc-form-row,
    .fc-form-grid,
    .fc-checkout-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Sector / marketing grids */
@media (max-width: 768px) {
    .footer-grid,
    .fc-footer-grid,
    .contact-grid,
    .about-grid,
    .sector-grid,
    .blog-grid,
    .stats-bar,
    .fc-trust-inner {
        grid-template-columns: 1fr !important;
    }

    .hero,
    .sector-hero,
    .cta-band {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile nav scroll lock (fc-nav-open / mp-nav-open set by fc-commerce-nav.js) */
body.fc-nav-open,
body.mp-nav-open {
    overflow: hidden;
    touch-action: none;
}

.fc-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, .35);
    opacity: 1;
    pointer-events: auto;
}

.fc-nav-overlay[hidden] {
    display: none !important;
    pointer-events: none;
}

/* Prose / long content */
.prose,
.fc-prose,
article,
.edu-site .prose {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Safe-area bottom for sticky bars */
.fc-sticky-bar,
.ssf-mobile-cta,
.hh-mobile-cta {
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
}

/* Wide desktop container breathing room */
@media (min-width: 1024px) {
    .fc-container,
    .hh-container,
    .arv-container,
    .kf-container,
    .container {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }
}

@media (min-width: 1440px) {
    .fc-main,
    .mp-main,
    .kf-main,
    .arv-main {
        margin-inline: auto;
    }
}

@media (max-width: 360px) {
    .fc-container,
    .hh-container,
    .arv-container,
    .kf-container,
    .container {
        padding-left: .65rem;
        padding-right: .65rem;
    }
}

@media (max-width: 380px) {
    .fc-container,
    .hh-container,
    .arv-container,
    .kf-container,
    .container {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .fc-promo-inner {
        font-size: .75rem;
        gap: .35rem;
    }
}

/* --- Boutique extras: FAQ, compare, stock alert, mobile bottom nav --- */
.faq-list { display: grid; gap: .75rem; }
.faq-item {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: #fff;
    padding: 0 1rem;
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 0;
    font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-answer { padding: 0 0 1rem; color: rgba(0,0,0,.68); line-height: 1.65; }

.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th,
.compare-table td {
    border: 1px solid rgba(0,0,0,.08);
    padding: .85rem;
    vertical-align: top;
    text-align: left;
}
.compare-thumb {
    width: 96px;
    height: 120px;
    object-fit: cover;
    display: block;
    margin-bottom: .5rem;
    border-radius: 8px;
}
.compare-remove { display: inline-block; margin-top: .35rem; font-size: .85rem; }

.stock-alert-form {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px dashed rgba(0,0,0,.18);
    border-radius: 14px;
    background: rgba(0,0,0,.02);
}
.stock-alert-title { margin: 0 0 .25rem; font-weight: 600; }
.stock-alert-sub { margin: 0 0 .75rem; font-size: .9rem; color: rgba(0,0,0,.62); }
.stock-alert-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.stock-alert-row .input { flex: 1 1 220px; min-width: 0; }

.compare-fab {
    position: fixed;
    right: 18px;
    bottom: 90px;
    z-index: 9996;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    display: none;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0,0,0,.2);
}
.compare-fab.is-visible { display: grid; }
.compare-fab span {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #c45c26;
    color: #fff;
    font-size: 11px;
    display: grid;
    place-items: center;
    padding: 0 5px;
}
.compare-fab svg { width: 20px; height: 20px; }

.quick-view-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,.45);
    display: grid;
    place-items: center;
    padding: 1rem;
}
.quick-view-modal[hidden] { display: none !important; }
.quick-view-dialog {
    position: relative;
    width: min(860px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 1.25rem;
    max-height: min(90vh, 720px);
    overflow: auto;
}
.quick-view-close {
    position: absolute;
    top: .5rem;
    right: .75rem;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}
.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
.quick-view-media img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
.quick-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.mobile-bottom-nav {
    display: none !important;
}

@media (max-width: 720px) {
    .mobile-bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9995 !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        background: rgba(255,255,255,.96);
        border-top: 1px solid rgba(0,0,0,.08);
        padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .15rem;
        min-height: 52px;
        min-width: 0;
        font-size: 10px;
        letter-spacing: .02em;
        color: rgba(0,0,0,.55);
        text-decoration: none;
        text-align: center;
    }
    .mobile-bottom-nav a.is-active { color: #111; font-weight: 600; }
    .mobile-bottom-nav svg { width: 20px; height: 20px; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .whatsapp-fab { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
    .compare-fab { bottom: calc(140px + env(safe-area-inset-bottom)); }
    .cookie-banner { bottom: calc(64px + env(safe-area-inset-bottom)); }
    .product-card-actions .wish-btn,
    .product-card-actions .compare-btn,
    .product-card-actions .quick-view-btn {
        opacity: 1;
        transform: none;
    }
    .quick-view-grid { grid-template-columns: 1fr; }
    .stock-alert-row { flex-direction: column; }
    .stock-alert-row .btn { width: 100%; }
}

@media (min-width: 721px) {
    .compare-fab { bottom: 24px; }
}

/* Product card action stack (compare / quick view / wishlist) */
.product-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-card-actions .wish-btn,
.product-card-actions .compare-btn,
.product-card-actions .quick-view-btn {
    position: static;
    opacity: 0;
    transform: translateY(-6px);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1.5px solid rgba(0,0,0,.12);
    background: #fff;
    color: rgba(0,0,0,.55);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: opacity .25s ease, transform .25s ease, border-color .2s, color .2s, background .2s;
}
.product-card-actions .wish-btn svg,
.product-card-actions .compare-btn svg,
.product-card-actions .quick-view-btn svg {
    width: 17px;
    height: 17px;
}
.product-card:hover .product-card-actions .wish-btn,
.product-card:hover .product-card-actions .compare-btn,
.product-card:hover .product-card-actions .quick-view-btn,
.product-card-actions .wish-btn.is-active,
.product-card-actions .compare-btn.is-active {
    opacity: 1;
    transform: none;
}
.compare-btn,
.quick-view-btn {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid rgba(0,0,0,.12);
    border-radius: 12px;
    background: #fff;
    color: rgba(0,0,0,.55);
    cursor: pointer;
}
.compare-btn:hover,
.quick-view-btn:hover { border-color: var(--primary, #111); color: var(--primary, #111); }
.compare-btn.is-active {
    border-color: var(--primary, #111);
    background: var(--primary, #111);
    color: #fff;
}
.product-media-link { display: block; color: inherit; }

.size-chart {
    margin: 1rem 0 0;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 12px;
    background: #fff;
    padding: 0 .9rem;
}
.size-chart summary {
    cursor: pointer;
    list-style: none;
    padding: .9rem 0;
    font-weight: 600;
}
.size-chart summary::-webkit-details-marker { display: none; }
.size-chart-body { padding: 0 0 1rem; overflow-x: auto; }
.size-chart-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
    font-size: .9rem;
}
.size-chart-table th,
.size-chart-table td {
    border: 1px solid rgba(0,0,0,.08);
    padding: .55rem .7rem;
    text-align: left;
}
.size-chart-table th { background: rgba(0,0,0,.03); }

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .65rem;
}
.instagram-tile {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
    background: rgba(0,0,0,.04);
}
.instagram-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.instagram-tile:hover img { transform: scale(1.04); }
.lookbook-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 980px) {
    .instagram-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lookbook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .instagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lookbook-grid { grid-template-columns: 1fr; }
}

