/* ================================================================
   marketplace.css — стили витрины (главная + общая шапка/футер)
   Подключается ПОСЛЕ style.css, переопределяет шапку.
   ================================================================ */

/* ------ TOP BAR (тонкая верхняя полоса) ------ */
.mp-topbar {
    background: #4a0e0c;
    color: #f5e6d0;
    font-size: 12px;
    padding: 6px 16px;
}
.mp-topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.mp-topbar a {
    color: #f5e6d0;
    text-decoration: none;
    margin: 0 8px;
}
.mp-topbar a:hover { color: #fff; text-decoration: underline; }
.mp-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.mp-topbar-right .lang-switch {
    display: flex; gap: 4px; padding: 0; background: none;
}
.mp-topbar-right .lang-switch button {
    background: transparent;
    color: #f5e6d0;
    border: 1px solid transparent;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}
.mp-topbar-right .lang-switch button:hover { background: rgba(255,255,255,.1); }
.mp-topbar-right select#currency-select {
    background: transparent;
    color: #f5e6d0;
    border: 1px solid #8a1c17;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
}

/* ------ MAIN HEADER ------ */
.mp-header {
    background: #611411;
    padding: 14px 16px;
    border-bottom: 1px solid #4a0e0c;
}
.mp-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}
.mp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}
.mp-logo img { width: 56px; height: 56px; object-fit: contain; }
.mp-logo-text {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    line-height: 1.1;
}
.mp-logo-tagline {
    font-size: 11px;
    color: #f5e6d0;
    opacity: 0.8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mp-search {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    border: 2px solid transparent;
    transition: border-color .15s, box-shadow .15s;
}
.mp-search:focus-within {
    border-color: #f5b441;
    box-shadow: 0 0 0 3px rgba(245,180,65,.35);
}
.mp-search input[type="text"],
.mp-search input {
    display: block !important;
    width: 100% !important;
    padding: 12px 110px 12px 16px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    font-family: Georgia, serif;
    background: #fff !important;
    color: #2a0a0a !important;
    outline: none !important;
    box-sizing: border-box !important;
}
.mp-search input::placeholder { color: #998877; }
.mp-search button {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    background: #f5b441 !important;
    color: #4a0e0c !important;
    border: none !important;
    padding: 0 18px !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
    height: auto !important;
    width: auto !important;
    min-width: 92px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s, color .15s;
}
.mp-search button:hover { background: #ffc960 !important; }
.mp-search button svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    flex: 0 0 18px;
    display: block;
    fill: currentColor;
}

.mp-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.mp-action {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    line-height: 1.2;
    position: relative;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background .15s;
}
.mp-action:hover { background: rgba(255,255,255,.08); color: #fff; }
.mp-action-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.mp-action-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: #f5b441;
    color: #4a0e0c;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    padding: 0 6px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

/* ------ CATEGORY NAV (под шапкой) ------ */
.mp-catnav {
    background: #fff;
    border-bottom: 1px solid #e6dccf;
    padding: 10px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.mp-catnav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}
.mp-catnav a {
    display: inline-flex;
    align-items: center;
    color: #fff !important;
    background: #611411;
    text-decoration: none !important;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid #4a0e0c;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    transition: background .15s, color .15s, transform .1s, box-shadow .15s;
}
.mp-catnav a:hover {
    background: #f5b441;
    color: #4a0e0c !important;
    border-color: #d49530;
    box-shadow: 0 3px 8px rgba(245,180,65,.45);
    transform: translateY(-1px);
}
.mp-catnav a.is-active {
    background: #f5b441;
    color: #4a0e0c !important;
    border-color: #d49530;
}

/* ------ HERO ------ */
.mp-hero {
    position: relative;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(245,180,65,.18) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(97,20,17,.55) 0%, transparent 60%),
        linear-gradient(135deg, #4a0e0c 0%, #2a0a0a 55%, #1a0606 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 20px;
    overflow: hidden;
}
.mp-hero.mp-hero-has-image::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.60) 100%);
}
.mp-hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(255,255,255,.04) 0 2px, transparent 3px),
        radial-gradient(circle at 75% 60%, rgba(255,255,255,.03) 0 2px, transparent 3px),
        radial-gradient(circle at 45% 85%, rgba(255,255,255,.03) 0 2px, transparent 3px);
    background-size: 220px 220px, 320px 320px, 180px 180px;
    pointer-events: none;
    opacity: .6;
}
.mp-hero-inner { position: relative; z-index: 1; max-width: 800px; }
.mp-hero h1 {
    font-family: Georgia, serif;
    font-size: 48px;
    margin: 0 0 12px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.mp-hero p {
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 24px;
    color: #f5e6d0;
}
.mp-hero .mp-cta {
    display: inline-block;
    background: #f5b441;
    color: #4a0e0c;
    padding: 12px 32px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
    transition: background .15s, transform .15s;
}
.mp-hero .mp-cta:hover { background: #ffc960; transform: translateY(-1px); }

/* ------ HERO LOGO MODE ------ */
.mp-hero-logo-mode {
    min-height: 460px;
    background:
        radial-gradient(ellipse at 50% 35%, rgba(245,180,65,.22) 0%, transparent 45%),
        radial-gradient(ellipse at 15% 85%, rgba(120,30,25,.55) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 15%, rgba(60,15,12,.65) 0%, transparent 55%),
        linear-gradient(160deg, #5a1212 0%, #3a0a0a 50%, #1a0606 100%);
}
.mp-hero-logo {
    display: block;
    margin: 0 auto 18px;
    width: 240px;
    height: 240px;
    max-width: 60vw;
    max-height: 60vw;
    object-fit: contain;
    filter:
        drop-shadow(0 0 28px rgba(245,180,65,.45))
        drop-shadow(0 8px 24px rgba(0,0,0,.55));
    animation: mpLogoFloat 6s ease-in-out infinite;
}
@keyframes mpLogoFloat {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-6px); }
}
.mp-hero-srtitle {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 600px) {
    .mp-hero-logo { width: 180px; height: 180px; }
    .mp-hero-logo-mode { min-height: 380px; }
}

/* ------ MAIN CONTENT WRAPPER ------ */
.mp-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ------ SECTION BLOCKS ------ */
.mp-block { margin: 36px 0; }
.mp-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d8c9b9;
}
.mp-block-head h2 {
    font-family: Georgia, serif;
    color: #611411;
    font-size: 24px;
    margin: 0;
}
.mp-block-head .mp-block-link {
    color: #611411;
    text-decoration: none;
    font-size: 14px;
}
.mp-block-head .mp-block-link:hover { text-decoration: underline; }

/* Categories grid */
.mp-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.mp-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e6dccf;
    border-radius: 8px;
    padding: 20px 12px;
    text-decoration: none;
    color: #3c1f1f;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    text-align: center;
}
.mp-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(97,20,17,.15);
    border-color: #c8a96a;
}
.mp-cat-card-icon {
    font-size: 38px;
    margin-bottom: 10px;
    line-height: 1;
}
.mp-cat-card-title {
    font-weight: 600;
    font-size: 15px;
    color: #611411;
}

/* Products grid */
.mp-prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.mp-prod-card {
    background: #fff;
    border: 1px solid #e6dccf;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}
.mp-prod-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}
.mp-prod-card .img {
    background: #f7f1e8;
    aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
}
.mp-prod-card .img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.mp-prod-card .body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.mp-prod-card .name {
    font-size: 14px;
    line-height: 1.3;
    color: #3c1f1f;
    margin: 0 0 8px;
    min-height: 36px;
}
.mp-prod-card .price {
    font-weight: bold;
    color: #611411;
    font-size: 18px;
    margin-bottom: 10px;
}
.mp-prod-card .add-btn {
    background: #611411;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 13px;
    margin-top: auto;
}
.mp-prod-card .add-btn:hover { background: #8a1c17; }

.mp-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
    background: #fff;
    border: 1px dashed #d8c9b9;
    border-radius: 6px;
}

/* ------ MOBILE ------ */
@media (max-width: 900px) {
    .mp-header-inner {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }
    .mp-search {
        grid-column: 1 / -1;
        order: 3;
    }
    .mp-actions { gap: 10px; }
    .mp-logo-text { font-size: 18px; }
    .mp-logo img { width: 44px; height: 44px; }
    .mp-hero h1 { font-size: 32px; }
    .mp-hero p { font-size: 15px; }
}
@media (max-width: 600px) {
    .mp-action-label { display: none; }
    .mp-topbar-left { display: none; }
    .mp-search-label { display: none; }
    .mp-search button { padding: 0 14px; }
}
