



/* ---------- MOBILE NAV ONLY ---------- */
@media (max-width: 900px) {
  /* show hamburger, hide desktop menu */
  .menu { display: none; }                 /* hide the desktop hover menu */

  .menu-btn span { width: 20px; height: 2px; background:#111; display:block; }

  /* keep navbar padded on phones */
.navbar {
    display: flex !important;
    justify-content: space-between !important; /* Кнопка слева | Лого | Иконки справа */
    align-items: center !important;
    height: 60px;
    padding: 0 1rem !important;
    position: relative;
    border-bottom: 1px solid #eee; /* Тонкая линия снизу */
  }

  /* Скрываем десктопное меню */
  .navbar .menu { 
    display: none !important; 
  }

  /* ЛОГОТИП: Строго по центру */
  .navbar .logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important; /* Центровка по обеим осям */
    margin: 0 !important;
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    z-index: 10;
  }

  /* КНОПКА МЕНЮ: Всегда слева */
  .menu-btn {
    display: inline-flex !important;
    z-index: 20;
    position: relative;
  }

  /* ИКОНКИ: Всегда справа */
  .nav-right {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    z-index: 20;
    position: relative;
  }

  .nav-right img {
    width: 22px !important;
    height: 22px !important;
  }


  /* mask behind drawer */
  .drawer-mask[hidden] { display: none; }
  .drawer-mask {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.28);
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
    z-index: 900;
  }
  .drawer-mask.is-open { opacity: 1; pointer-events: auto; }

  /* the drawer itself */
  .mobile-drawer {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: 86vw; max-width: 420px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 1000;
    display: flex; flex-direction: column;
  }
  .mobile-drawer.is-open { transform: translateX(0); }

  .drawer-topbar {
    display:flex; align-items:center; justify-content: space-between;
    padding: .9rem .9rem .7rem;
    border-bottom: 1px solid #ececec;
  }
  .drawer-close { background:none; border:0; font-size: 1.25rem; line-height:1; }
  .drawer-brand { font-weight:800; }

  /* panels container */
  .drawer-panels { position: relative; flex: 1; overflow: hidden; }

  /* each panel */
  .drawer-panel {
    position: absolute; inset: 0;
    padding: 1rem .9rem 1rem 1rem;
    overflow-y: auto;
    transform: translateX(100%);         /* offscreen to the right */
    transition: transform .22s ease;
    background:#fff;

  }
  .drawer-panel.is-active { transform: translateX(0); }
  /* when navigating forward, slide left the previous panel */
  .drawer-panel.is-prev { transform: translateX(-100%); }

  .drawer-row,
  .drawer-item,
  .drawer-back {
    display:flex; align-items:center; justify-content: space-between;
    gap: .6rem;
    padding: 1rem .25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none; color: #111; background: none; border-left: 0; border-right: 0; 
    width: 100%;
  }
  .drawer-row.login { justify-content: flex-start; gap: .6rem; margin-top: 18em;}
  .drawer-row .row-icon { width: 22px; height: 22px; object-fit: contain; }
  .drawer-divider { height: 12px;}

  .drawer-item { justify-content: flex-start; }
  .drawer-back { font-weight: 700; text-align:left; }

  .drawer-footer {
    display:flex; align-items:center; gap: 1rem;
    padding: 1rem .25rem 0;
  }
  .drawer-footer img { width: 26px; height: 26px; object-fit: contain; }

  /* currency section */
  .currency-search {
    position: sticky; top: 0; background:#fff; padding: .5rem 0 .75rem; z-index: 1;
    display:flex; align-items:center; gap:.5rem;
  }
  .currency-search input {
    flex:1; padding:.7rem .9rem; border:1px solid #ddd; border-radius: 10px;
  }
  .currency-search .currency-clear {
    border:0; background:#f5f5f5; width:36px; height:36px; border-radius:10px; font-size:1rem;
  }

  .currency-list { list-style:none; margin:0; padding:0; }
  .currency-list li button {
    width:100%; text-align:left; padding: .9rem .25rem; border:0; background:none; font-size:1rem;
    display:flex; align-items:center; justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
  }
  .currency-list li span { opacity:.85; }
}



/* 1. Общие стили и Header */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  

body {
    overflow-x: hidden; /* Запрет горизонтальной прокрутки */
    width: 100%;
    margin: 0;
    padding: 0;
}



/* Hide hamburger on desktop by default */
.menu-btn { display: none; }

/* Drawer mask & drawer base (hidden/offscreen) */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28);
  opacity: 0; pointer-events: none;
  z-index: 900;
  transition: opacity .18s ease;
}

.mobile-drawer {
  position: fixed; top: 0; left: 0;
  height: 100vh; width: 86vw; max-width: 420px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transform: translateX(-100%);      /* offscreen by default */
  transition: transform .22s ease;
  z-index: 1000;
  display: flex; flex-direction: column;
}

/* panels baseline */
.drawer-panels { position: relative; flex: 1; overflow: hidden; }
.drawer-panel { position: absolute; inset: 0; overflow-y: auto; background:#fff; transform: translateX(100%); transition: transform .22s ease; }
.drawer-panel.is-active { transform: translateX(0); }
.drawer-panel.is-prev { transform: translateX(-100%); }

/* Topbar/rows/items baseline style (so they don’t look like purple links if media query fails) */
.drawer-topbar { display:flex; align-items:center; justify-content: space-between; padding: .9rem .9rem .7rem; border-bottom: 1px solid #ececec; }
.drawer-close { background:none; border:0; font-size: 1.25rem; line-height:1; }
.drawer-brand { font-weight:800; }

.drawer-row, .drawer-item, .drawer-back {
  display:flex; align-items:center; justify-content: space-between;
  gap: .6rem; padding: 1rem .25rem; font-size: 1.05rem;
  border-bottom: 1px solid #f0f0f0; text-decoration: none; color: #111; background: none;
}
.drawer-row.login { justify-content: flex-start; gap: .6rem; }
.row-icon { width: 22px; height: 22px; object-fit: contain; }
.drawer-divider { height: 12px; }
.drawer-footer { display:flex; gap: 1rem; padding: 1rem .25rem 0; }
.drawer-footer img { width: 26px; height: 26px; object-fit: contain; }

.currency-search { position: sticky; top: 0; background:#fff; padding: .5rem 0 .75rem; z-index: 1; display:flex; gap:.5rem; }
.currency-search input { flex:1; padding:.7rem .9rem; border:1px solid #ddd; border-radius: 10px; }
.currency-clear { border:0; background:#f5f5f5; width:36px; height:36px; border-radius:10px; font-size:1rem; }
.currency-list { list-style:none; margin:0; padding:0; }
.currency-list li button { width:100%; text-align:left; padding: .9rem .25rem; border:0; background:none; font-size:1rem; display:flex; align-items:center; justify-content: space-between; border-bottom: 1px solid #f0f0f0; }
.currency-list li span { opacity:.85; }




.MadeIn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3em;
    background-color: black;
    color: white;
}


.navbar {
  height: 4em;
  display: flex;
  justify-content: space-between; /* left group | center | right group */
  align-items: center;            /* vertically center everything */
  position: relative;  
  padding: 0 2rem; /* 2rem ≈ 32px; adjust to taste */
  border: 1px solid black;
}

/* center logo absolutely inside navbar */
.navbar .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* left menu and right icons stay in normal flex flow */
.navbar .menu {
  display: flex;
  align-items: center;
}

.navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 1rem; /* space between icons */
}

.navbar .nav-right img {
  width: 24px;   /* adjust size as needed */
  height: 24px;  /* keep square for icons */
  object-fit: contain;
  cursor: pointer;
}
  
/* ===== Desktop menu with hover dropdowns ===== */
.menu {
  display: flex;
  align-items: center;

}

.menu-list {
  list-style: none;
  display: flex;
  gap: 2.2rem;                 /* space between F1 FRAMES / ABOUT US */
  margin: 0;
  padding: 0;
}

.menu-link {
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;  /* like your screenshot */

  color: #111;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* caret ▼ */
.has-dropdown > .menu-link::after {
  content: "▾";
  font-size: .8em;
  transform: translateY(-1px);
  opacity: .7;
}

/* dropdown panel */
.dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: .75rem;
  min-width: 260px;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
  list-style: none;
  padding: .75rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 1000;                /* sit above content */
}

.has-dropdown {
  position: relative;           /* anchor for absolute dropdown */
}

.dropdown li {
  padding: 0;
}

.dropdown a {
  display: block;
  padding: .6rem 1rem;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}

.dropdown a:hover {
  background: #f7f7f7;
}

/* show on hover */
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* keep header above page border lines etc. */
.navbar {
  position: relative;
  z-index: 200;
}




@media (max-width: 900px) {
  .menu { display: none; }             /* hide desktop hover menu on phones */
  .menu-btn {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #dcdcdc;
    background: #fff;
    padding: 6px;
    border-radius: 6px;
  }
  .menu-btn span { width: 20px; height: 2px; background:#111; display:block; }

  /* nicer padding on phones */
  .navbar { padding: .6rem .8rem; }
}


/* Desktop: show dropdown menu, hide burger */
@media (min-width: 901px) {
  .navbar .menu { display: flex; align-items: center; }
  .navbar .menu-btn { display: none; }
}












/* Адаптив для мобильных устройств */
@media (max-width: 767px) {
    /* Контейнер: убираем лишние отступы и тени, которые могут распирать */
    .studio-container {
        margin-top: -80px !important; /* Убираем любой подъем или отступ сверху */
        padding-top: 0 !important;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 0;
        box-shadow: none;
        border-radius: 20px;
        overflow: hidden;
    }


    /* Секция превью: картинка сверху на весь экран */
    .preview-section {
      margin-top: 15px;
        width: 100%;
        padding: 0;
        background: #f4f4f4; /* Светлый фон для зоны фото */
    }

    /* Холст: делаем его адаптивным */
    .frame-canvas {
    margin: 0 auto !important; /* Центрируем холст */
    display: flex;
    width: 100vw !important; /* Растягиваем на всю ширину экрана */
    height: 100vw !important;
    }

    /* Секция управления: добавляем отступы, чтобы текст не лип к краям */
    .controls-section {
        padding: 20px 15px;
        max-width: 100%;
        box-sizing: border-box;
    }



    /* Заголовок и цена */
    h1 {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 10px;
        text-align: left;
    }


    .rating {
      font-size: 18px;
      color:#A42325;
    }

    .price {
        font-size: 20px;
        margin: 10px 0 20px 0;
    }

    .step-indicator {
    font-size: 11px;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
    text-transform: uppercase;
    }



    /* Контейнер вкладок */
    .tabs {
        display: flex;
        gap: 32px;                  /* Расстояние между кнопками */
        border-bottom: 1px solid #da2c2c; /* Длинная тонкая серая линия */
        margin-bottom: 10px;
        padding: 0 5px;
    }

    /* Кнопки вкладок */
    .tab-btn {
        background: none;
        border: none;
        outline: none;
        cursor: pointer;
        
        /* Стили текста */
        text-transform: uppercase;
        letter-spacing: 1.2px;
        font-size: 13px;
        font-weight: 700;
        color: #999;                /* Серый цвет для неактивных */
        
        padding: 12px 0;            /* Отступы сверху/снизу */
        position: relative;         /* Для линии ::after */
        transition: color 0.3s ease;
        border-bottom: none;
    }

    /* Черная линия под активной вкладкой */
    .tab-btn::after {
        content: '';
        position: absolute;
        bottom: -1px;               /* Ложится прямо на серую линию */
        left: 0;
        width: 0;                   /* Сначала ширина 0 */
        height: 2px;                /* Толщина черной линии */
        background-color: none;
        transition: width 0.3s ease; /* Анимация появления */
    }

    /* Эффект при наведении */
    .tab-btn:hover {
        color: #666;
    }

    /* Активная вкладка */
    .tab-btn.active {
        color: none;  
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
        border-bottom: none;
        border: 2px solid black;
    }

    /* Линия под активной вкладкой становится на всю ширину */
    .tab-btn.active::after {
        width: 100%;
    }





/* Сетка становится одной колонкой для эффекта карточек */
    .grid-options {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 5px 0;
    }

    /* Сама кнопка-карточка */
    .opt-btn {
        width: 100%;
        padding: 18px 20px;
        background: #ffffff;
        border: 1px solid #e0e0e0; /* Тонкая серая рамка */
        border-radius: 12px;      /* Сильное закругление */
        text-align: left;         /* Текст слева */
        font-size: 15px;
        font-weight: 600;
        color: #111;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        position: relative;
        overflow: hidden;
    }

    /* Эффект при нажатии (активная команда) */
    .opt-btn.active {
        background: #f8f8f8 !important;
        color: #000 !important;
        border: 2px solid #000 !important; /* Толстая черная рамка при выборе */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* ГЛАВНОЕ: Активный индикатор всегда берет цвет выбранной команды */
    .opt-btn.active::before {
        background-color: var(--team-color) !important;
    }

    /* Цветная полоска слева (которую мы будем вешать через классы команд) */
    .opt-btn::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 6px; /* Толщина цветной полоски */
        background: #ccc; /* Цвет по умолчанию */
        transition: width 0.3s ease;
    }

    /* Пример цветов для команд (добавь свои) */
    .opt-btn.team-redbull::before { background: #0600EF; }
    .opt-btn.team-ferrari::before { background: #EF1A2D; }
    .opt-btn.team-mercedes::before { background: #27F4D2; }
    .opt-btn.team-mclaren::before { background: #FF8700; }
    .opt-btn.team-aston::before { background: #229971; }



    /* Секция покупки: кнопки друг под другом или в ряд */
    .purchase-section {
        display: flex;
        flex-direction: row; /* Оставляем в ряд, если помещаются */
        gap: 10px;
        height: auto;
        margin-top: 25px;
    }

    .stepper {
        width: 100px;
        flex-shrink: 0;
    }

    /* Кнопка "Добавить в корзину" как на фото */
    .add-to-cart {
        border-radius: 8px; /* Закругление кнопки */
        height: 55px;
        font-size: 14px;
        letter-spacing: 2px;

    }

  

    /* Корзина: выезжает на весь экран */
    .cart-sidebar {
        width: 100% !important;
        right: 0;
        transform: translateX(100%);
    }
    
    .cart-sidebar.active {
        transform: translateX(0);
    }






}













.studio-container {
    display: flex;
    background: rgb(255, 255, 255);
    width: 95%;
    gap: 60px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;



    margin: -70px auto 0 auto; /* Уменьшаем отступ сверху (20px) и центруем по горизонтали */
    align-self: flex-start;
}

/* 2. Левая часть: Превью */
.preview-section {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ada8a8; /* Убираем фоновый цвет здесь, чтобы не было сюрпризов */
    padding: 20px;           /* Уменьшаем огромные отступы */
    min-height: auto;        /* УБИРАЕМ фиксированную высоту! */
}

.frame-canvas {
    position: relative;
    width: 800px;            /* Твой размер */
    height: 800px;
    background: #ada8a8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;       /* Позволяем теням выходить за пределы */
}

/* Обертка для контента, чтобы фото не "липло" к краям */
.frame-content {
    position: relative;
    width: 95%;              /* Чуть меньше основной рамки */
    height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Сохраняет пропорции, не растягивая */
    pointer-events: none;
}

#layer-track {
    z-index: 2;
    
    /* Твой рендер уже с рамкой, поэтому он просто ложится в центр */
}

#layer-car {
    z-index: 5;

    top: 52%;   /* Смещение сверху (чем больше %, тем ниже машинка) */
    left: 51.5%;  /* Смещение слева (чем больше %, тем она правее) */
    /* Масштабируем болид относительно трассы */
    transform: translate(-50%, -50%) scale(1.1);
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
}



#layer-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* 3. Правая часть: Управление */
.controls-section {
    flex: 1;
    max-width: 450px;
}

.rating {
  color:#A42325;
  font-size: 20px;
}

h1 {
    font-size: 28px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.price {
    font-size: 22px;
    color: #000;
    font-weight: bold;
    margin: 15px 0;
}

.price del {
    color: #888;
    font-size: 16px;
    margin-left: 10px;
}

/* Вкладки (Общий стиль для всех экранов) */
.tabs {
    display: flex;
    gap: 32px;
    border-bottom: none; /* Светлая линия */
    margin-bottom: 10px;
    padding: 0 5px;
}

.tab-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    padding: 12px 0;
    position: relative;
    transition: color 0.3s ease;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    width: 110px;
    border-bottom: none;
}

/* Черная линия под активной вкладкой */
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: none;
    transition: width 0.3s ease;
}

.tab-btn.active {
    color: #000;
    background: none !important; /* Убираем фон, если он был */
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: none;
    border: 2px solid black;
}

.tab-btn.active::after {
    width: 100%;
}



/* Группы опций и кнопки */
.options-group {
    margin-bottom: 25px;
}

.options-group h4 {
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 12px;
    color: #000;
    letter-spacing: 1px;
}

/* Общий стиль кнопок выбора (Карточки) */
.grid-options {
    display: grid;
    grid-template-columns: 1fr 1fr; /* На десктопе 2 колонки */
    gap: 12px;
}

/* Цветная полоска для команд */
.team-grid {
    border-left: 4px solid #eee; /* Цвет меняется через JS */
    padding-left: 12px;
    transition: border-color 0.3s ease;
}

.opt-btn {
    width: 100%;
    padding: 15px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Цветной индикатор (полоска) слева */
.opt-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: #ccc; /* Серый для неактивных */
    transition: background-color 0.3s ease;
}

/* АКТИВНОЕ СОСТОЯНИЕ (Черная кнопка) */
.opt-btn.active {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
}

/* Когда кнопка активна, она забирает цвет команды из CSS-переменной */
.opt-btn.active::before {
    background-color: var(--team-color) !important;
}

/* Если переменная вдруг не подхватилась, сработают жесткие классы (как запасной вариант) */
.opt-btn.team-ferrari.active::before { background-color: #EF1A2D !important; }
.opt-btn.team-mclaren.active::before { background-color: #FF8700 !important; }
.opt-btn.team-redbull.active::before { background-color: #0600EF !important; }


.step-indicator {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}



/* 4. Секция покупки и Степпер */
.purchase-section {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    height: 55px;
}

.stepper {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    background: #fff;
    padding: 0 5px;
}

.stepper button {
    width: 40px;
    height: 100%;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.stepper span {
    width: 30px;
    text-align: center;
    font-weight: bold;
}

.add-to-cart {
    flex-grow: 1;
    background: #000;
    color: #fff;
    border: none;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.add-to-cart:hover {
    background: #333;
}

/* Вспомогательные классы */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}












/* Product Details Section */
.product-details {
  display: flex;
  background-color: #fff;
  padding: 3em 2em;

}

.product-details-container {
  display: flex;
  justify-content: center;        /* Center vertically */
  align-items: center;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  gap: 3em;

}

.exploded-view {

  width: 50%
}

.exploded-view img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); /* smoother */
  will-change: transform; /* performance boost */
}

.exploded-view:hover img {
  transform: scale(1.025);   
}


.feature-info {
  width: 40%;

  display: flex;                  /* Make it a flex container */
  flex-direction: column;         /* Stack children vertically */
  justify-content: center;        /* Center vertically */
  align-items: center;            /* Center horizontally */
  text-align: center;             /* Optionally center text itself */
}

.feature-info h3 {
  font-size: 1.6em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
}

.feature-info ul {
  list-style-type: none;
  padding-left: 0;
}

.feature-info li {
  margin-bottom: 1.2em;
  font-size: 1.05em;
  line-height: 1.4;
}




/* ===== Product Details — mobile card layout ===== */
@media (max-width: 768px) {
  .product-details {
    background: #f7f7f7;              /* gray background like mock */
    padding: 1.25rem 1rem;
    border: none;
    display: block;                   /* don’t force a row on small screens */
  }

  /* Make the whole block a white card */
  .product-details-container {
    display: block;
    max-width: 680px;
    margin: 0 auto;
    padding: .75rem .75rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    border: none;
  }

  /* Image on top, rounded */
  .exploded-view {
    width: auto;
    margin: 0;
    border: none;
  }
  .exploded-view img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;             /* adjust to 16/9 if you want shorter */
    object-fit: cover;
    border-radius: 12px;
    display: block;
  }

  /* Text block */
  .feature-info {
    width: auto;
    border: none;
    padding: 1rem .5rem 0;
    text-align: center;
    display: block;                   /* no flex needed here */
  }

  .feature-info h3 {
    font-size: clamp(20px, 5.4vw, 24px);
    font-weight: 800;
    line-height: 1.25;
    margin: 1rem 0 .75rem;
    padding: 0;
  }

  .feature-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;                        /* even spacing between bullets */
  }

  .feature-info li {
    font-size: clamp(14px, 4.2vw, 16px);
    line-height: 1.6;
    color: #222;
  }

  /* Turn the <strong> in each li into a small heading */
  .feature-info li strong {
    display: block;
    font-size: clamp(15px, 4.6vw, 17px);
    font-weight: 800;
    margin-bottom: .25rem;
  }
}







/*Models*/

.Models {

  padding-bottom: 4em; /* optional spacing */
  display: grid;
  justify-content: center;
  align-items: center;
}

.custom-frame-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2em;

  height: 30em; 
  margin-top: 2em; 

}

.custom-frame-image {
  flex: 1 1 300px;
  max-width: 680px;
  height: 100%; /* Make image container fill the parent height */

  display: flex; /* to help stretch image */
  align-items: stretch; 

}


.custom-frame-image img {
  width: 100%;
  border-radius: 8px;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); /* smoother */
  will-change: transform; /* performance boost */
}


.custom-frame-image:hover img {
  transform: scale(1.025);   
}

.custom-frame-info {
  flex: 1 1 300px;
  max-width: 36em;
  text-align: left;
 
}

.custom-frame-info h3 {
  font-size: 1.5em;
  margin-bottom: 1em;

}

.custom-frame-info p {
  font-size: 1em;
  margin-bottom: 1.5em;

}

.learn-more-btn {
  background-color: #f26a4f;
  color: white;
  border: none;
  padding: 0.8em 1.2em;
  cursor: pointer;
  font-weight: bold;
  height: 3em;
}

.learn-more-btn:hover {
  background-color: #d9533f;
}



/* ===== Mobile (fix) ===== */
@media (max-width: 768px) {

    .Models { padding: 0 1rem 2.25rem; }

  /* Stack the block; kill fixed height */
  .custom-frame-content{
    
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    margin-top: 1.5rem;
    height: auto;              /* override 30em */
    border: none;
  }

  /* Image first, full width, natural height */
  .custom-frame-image{
    order: 1;
    max-width: 100%;
    height: auto;              /* override 100% */
    border: none;
    display: block;            /* no flex stretching on mobile */
  }
  .custom-frame-image img{
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;       /* or 16/9 if you prefer */
    object-fit: cover;
    border-radius: 12px;
    display: block;
  }

  /* Text block second, centered */
  .custom-frame-info{
    order: 2;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
    border: none;
    padding: .25rem .25rem 0;
  }
  .custom-frame-info h3{
    margin: .5rem 0 .5rem;
    font-size: clamp(18px, 5.4vw, 22px);
    font-weight: 800;
    line-height: 1.2;
    border: none;
  }
  .custom-frame-info p{
    margin: 0 auto 1rem;
    max-width: 60ch;
    font-size: clamp(15px, 4.2vw, 17px);
    line-height: 1.55;
    color: #222;
    opacity: .95;
    border: none;
  }

  .learn-more-btn{
    background-color: #f26a4f;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .9rem 1.2rem;
    height: auto;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    width: 80%;
    max-width: 320px;
    margin: 0 auto 1.25rem;
  }

    .learn-more-btn:active { transform: translateY(1px); }

}








  /* Testimonials Section */
.testimonials {
  text-align: center;
  padding: 3em 1em;
  background-color: #fff;
 
}

.testimonials h2 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
   
}

.rating-stars {
   
  font-size: 1em;
  margin-bottom: 2em;
  color: #f2b01e;
}

.testimonial-cards{
  display:flex;
  flex-wrap:nowrap;              /* one line */
  gap:1rem;
  overflow-x:auto;               /* horizontal scroll */
  overflow-y:hidden;
  scroll-snap-type:x mandatory;  /* snap to cards */
  padding:0 1rem 1.25rem;
  scroll-padding-inline:1rem;
  justify-content:flex-start;
  -webkit-overflow-scrolling:touch;
}

.testimonial-cards::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

.testimonial-card{
  flex:0 0 320px;                /* visible width per card on desktop */
  min-width:280px;               /* don’t shrink too far */
  scroll-snap-align:start;
  background:#fff;
  border-radius:12px;
  padding:1rem;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

/* Spacer so last card can fully snap into view */
.testimonial-cards::after{
  content:"";
  flex:0 0 1rem;
}

.testimonial-card .stars {
  color: #f2b01e;
  font-size: 1.1em;
  margin-bottom: 0.5em;

}

.testimonial-card .text {
  font-size: 0.95em;
  margin-bottom: 0.5em;

}

.testimonial-card .author {
  font-weight: bold;
  font-size: 0.9em;

}


/* === Testimonials: mobile layout like mock === */
@media (max-width: 768px) {
  .testimonials {
    text-align: left;
    padding: 1.5rem 1rem 2.25rem;
    background: #fff;
    border: none;                 /* remove debug */
  }

  .testimonials h2 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 0 0 .35rem;
    border: none;
  }

  /* "★★★★★ from 416 reviews ✅" row */
  .rating-stars {
    margin: 0 0 1rem;
    font-size: .95rem;
    color: #222;
    border: none;
  }
  /* color the stars only (first 5 chars) */
  .rating-stars::first-line { color: #f2b01e; }

  /* Horizontal swipe cards with snap */
.testimonial-cards {
  display: flex;
  flex-wrap: nowrap;              /* force one row */
  gap: 1rem;                       /* space between cards */
  overflow-x: auto;                /* horizontal scrolling */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;   /* snap to cards */
  padding: 0 1rem 1.25rem;         /* side padding */
  scroll-padding-inline: 1rem;     /* snap room for first/last */
  justify-content: flex-start;     /* start from first card */
  -webkit-overflow-scrolling: touch; /* smooth iOS scroll */
}

.testimonial-card {
  flex: 0 0 85%;                   /* width = 85% of screen */
  min-width: 0;
  scroll-snap-align: start;        /* snap point at start of card */
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Spacer so last card is fully visible */
.testimonial-cards::after {
  content: "";
  flex: 0 0 1rem;
}

  .testimonial-card .stars {
    color: #f2b01e;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .5rem;
    border: none;
  }
  .testimonial-card .text {
    font-size: .95rem;
    color: #222;
    margin-bottom: .75rem;
    border: none;
  }
  .testimonial-card .author {
    font-weight: 700;
    font-size: .9rem;
    color: #333;
    border: none;
  }
}



/* Tiny phones */
@media (max-width: 400px) {
  .testimonials h2 { font-size: 1.2rem; }
  .testimonial-cards { grid-auto-columns: 92%; }
}







/* ===== FAQ ===== */
.faq{
  max-width: 1000px;
  margin: 40px auto 80px;
  padding: 0 16px;
}
.faq__title{
  text-align:center;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: .02em;
  margin: 0 0 18px;
}
.faq__list{
  border-top: 1px solid #e8e8e8;
}

/* Row (closed) */
.faq__item{ border-bottom:1px solid #eee; }
.faq__btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 14px;
  background:#fff;
  border:none;
  cursor:pointer;
  font-size: clamp(15px, 2.2vw, 18px);
  text-align:left;
}
.faq__btn:hover{ background:#f7f7f7; }
.faq__label{
  font-weight: 700;
  letter-spacing:.02em;
}
.faq__icon{
  width:18px; height:18px; flex:0 0 18px; opacity:.85;
}

/* Panel (open) with height animation */
.faq__panel{
  overflow:hidden;
  transition:max-height .28s ease;
  max-height:0;
  background:#fff;
}
.faq__panel[hidden]{ display:block; } /* keep layout but hide initially */
.faq__content{
  padding: 18px 14px 28px;
}
.faq__content h3{
  font-size: clamp(16px, 2.2vw, 20px);
  margin: 18px 0 6px;
}
.faq__content p{
  margin: 0 0 12px;
  line-height:1.6;
  color:#202020;
}

/* Visually emphasize the active row like your mock’s light gray */
.faq__item.is-open .faq__btn{ background:#f6f6f6; }







.frame-categories {
  padding: 4em 1em;
  background-color: #fff;
  text-align: center;

}

.frame-categories h2 {
  font-size: 2em;
  margin-bottom: 2em;

}

.frame-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2em;

}

.frame-card {
  background-color: #f2f2f2;
  border-radius: 10px;
  padding: 1.5em;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;

}

.frame-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1em;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); /* smoother */
  will-change: transform; /* performance boost */
}

.frame-card:hover img {
  transform: scale(1.05); /* zoom in */
}

.frame-card h3 {
  font-size: 1.2em;
  margin-bottom: 0.5em;
 
}

.frame-card p {
  font-size: 0.95em;
  margin-bottom: 1em;

}



.frame-card a {
  color: #f26a4f;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 10em;


}





/* ===== Frame Categories — mobile 2-column grid ===== */
@media (max-width: 768px) {
  .frame-categories {
    padding: 1.5rem 1rem 2rem;
    background: #fff;
    text-align: left;          /* like the mock */
    border: none;
  }

  .frame-categories h2 {
    font-size: clamp(20px, 5.4vw, 26px);
    line-height: 1.2;
    margin: 0 0 1rem;
    border: none;
  }

  .frame-options {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* two columns on phones */
    gap: 1rem;
    border: none;
  }

  .frame-card {
    background: #f2f2f2;
    border-radius: 12px;
    padding: .75rem;
    text-align: left;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: none;
  }

  .frame-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;       /* consistent card height; use 16/9 if shorter */
    object-fit: cover;
    border-radius: 10px;
    margin: 0 0 .6rem;
  }

  .frame-card h3 {
    font-size: clamp(14px, 4.2vw, 16px);
    font-weight: 800;
    line-height: 1.25;
    margin: .2rem 0 .25rem;
    border: none;
  }

  .frame-card p {
    font-size: clamp(12px, 3.8vw, 14px);
    line-height: 1.45;
    color: #222;
    opacity: .9;
    margin: 0 0 .75rem;
    border: none;
  }

  .frame-card a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #111;               /* darker like mock */
    font-weight: 700;
    text-decoration: none;
    border: none;
  }
}

/* super-narrow phones: fall back to 1 column */
@media (max-width: 360px) {
  .frame-options { grid-template-columns: 1fr; }
}






/* Footer Section */
.site-footer {
  background-color: #0d0d0d;
  color: #fff;
  padding: 4em 2em 2em;
  font-size: 0.95em;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2em;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 3em;
  border-bottom: 1px solid #333;
}

.footer-column h4 {
  font-size: 1em;
  font-weight: bold;
  margin-bottom: 1em;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 0.6em;
}

.footer-column ul li a {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}

.footer-column ul li a:hover {
  opacity: 1;
}

.footer-column.about p {
  opacity: 0.9;
  line-height: 1.6;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 2em;
  flex-wrap: wrap; /* in case of very small screens */
  margin-top: 1em;
}


.social-icons img {
  height: 26px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
  max-width: 1400px;
  margin: 2em auto 0;
  font-size: 0.9em;
}

.footer-bottom .right {
  display: flex;
  align-items: center;
  gap: 0.3em;
  flex-wrap: wrap; /* in case of very small screens */
}

.footer-bottom .right-KaspiGoogle img {
  height: 22px;
  margin-right: 0.2em;
  object-fit: contain;
}

.footer-bottom .right-rest img {
  height: 28px;
  margin-right: 0.5em;
  object-fit: contain;
}

@media (max-width: 768px) {
  /* Основной контейнер: запрещаем перенос и разрешаем горизонтальную прокрутку, если не влезает */
  .footer-bottom .right {
    flex-wrap: nowrap !important; 
    justify-content: center; /* Центрируем иконки */
    width: 100%;
    gap: 5px; /* Уменьшаем расстояние между группами */
  }

  /* Делаем так, чтобы внутренние блоки не переносили иконки внутри себя */
  .footer-bottom .right-KaspiGoogle,
  .footer-bottom .right-rest {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Чтобы блоки не сжимались */
  }

  /* Оптимизируем размер иконок для мобильных, чтобы они точно влезли в ряд */
  .footer-bottom .right-KaspiGoogle img {
    height: 18px; /* Чуть меньше для мобилок */
    margin-right: 4px;
  }

  .footer-bottom .right-rest img {
    height: 22px; /* Чуть меньше для мобилок */
    margin-right: 4px;
  }
}


/* Currency switcher */
.currency-box{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}
.currency-label{
  font-size:.95rem;
  color:#cfcfcf; /* tweak for your theme */
}

/* Hide the fallback select; we use the bottom sheet */
.currency-select{
  position:absolute;
  width:1px; height:1px;
  opacity:0; pointer-events:none;
}

/* Trigger button styled like your box */
.currency-trigger{
  display:inline-flex; align-items:center; gap:.5rem;
  background:#111; color:#fff;
  border:1.5px solid #7a7a7a; border-radius:10px;
  padding:.6rem .75rem; font-size:1rem; cursor:pointer;
}

/* ===== Bottom sheet ===== */
.cc-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  opacity:0; pointer-events:none; transition:opacity .25s ease;
  z-index: 99998;
}
.cc-sheet{
  position:fixed; left:0; right:0; bottom:0;
  transform: translateY(100%); /* hidden */
  background:#111; color:#fff; z-index: 99999;
  border-top-left-radius:14px; border-top-right-radius:14px;
  box-shadow:0 -10px 40px rgba(0,0,0,.35);
  transition: transform .28s ease;
  display:flex; flex-direction:column;
}
.cc-sheet--small{ max-height:420px; height:40vh; }

.cc-overlay.is-open{ opacity:1; pointer-events:auto; }
.cc-sheet.is-open{ transform: translateY(0); }

.cc-grabber{ width:48px; height:4px; background:#2a2a2a; border-radius:4px; margin:8px auto 4px; }
.cc-header{ display:flex; align-items:center; justify-content:space-between; padding:8px 14px; border-bottom:1px solid #272727; }
.cc-title{ font-weight:700; font-size:1rem; }
.cc-close{ background:none; border:none; color:#fff; font-size:1.1rem; cursor:pointer; }

.cc-searchbar{ padding:10px 14px; border-bottom:1px solid #272727; }
.cc-searchbar input{
  width:100%; background:#181818; color:#fff; border:1px solid #3a3a3a;
  border-radius:10px; padding:.6rem .75rem; font-size:1rem;
}
.cc-searchbar input::placeholder{ color:#9a9a9a; }

.cc-list{ overflow:auto; padding:6px 6px 12px; flex:1 1 auto; min-height:0; -webkit-overflow-scrolling:touch; }
.cc-item{
  width:100%; text-align:left; background:none; border:none; color:#fff;
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; padding:10px 10px; border-radius:10px; cursor:pointer;
}
.cc-item:hover{ background:#1a1a1a; }

/* ensure site header stays under the sheet */
.navbar{ position:relative; z-index:10; }














/* --- СТИЛИ КОРЗИНЫ --- */


/* Контейнер заголовка, чтобы текст и кружок стояли в ряд */
.cart-header h2 {
    display: flex;
    align-items: center;
    gap: 10px; /* Расстояние между словом Корзина и кружком */
    font-size: 20px;
    font-weight: 700;
}

/* Стили самого кружка */
.cart-count-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    
    background-color: #000; /* Цвет кружка */
    color: #fff;            /* Цвет цифры */
    
    font-size: 14px;        /* Размер шрифта цифры */
    font-weight: 600;
    
    width: 24px;            /* Ширина кружка */
    height: 24px;           /* Высота кружка */
    border-radius: 50%;     /* Делаем его идеально круглым */
    
    padding-bottom: 1px;    /* Небольшая коррекция центровки текста по вертикали */
}


/* Бейдж (красный кружок с цифрой) */
/* Контейнер иконки должен быть relative */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

/* Стиль самого кружка */


.cart-badge {
    position: absolute;
    top: -5px;      /* Немного подправил */
    right: -8px;    /* Чтобы не улетал слишком далеко */
    background-color: #ff0000;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;    /* Фиксированная ширина */
    height: 18px;   /* Фиксированная высота */
    display: none;  /* Скрыт по умолчанию, JS включит flex */
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    z-index: 10;
    line-height: 1; /* Чтобы цифра была строго по центру */
}

/* Добавь это для красоты кнопок внутри корзины */
.stepper-mini {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    gap: 10px;
    padding: 2px 8px;
}
.stepper-mini button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}


/* Затемнение фона */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 1500;
    transition: opacity 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Сама панель корзины */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* Скрыта по умолчанию */
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1600;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: right 0.1s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Список товаров */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 10px;
}

.item-details h4 {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.item-details p strong {
    font-weight: 600;
    color: #777; /* Серый цвет для подписей, как на фото */
    display: inline-block;
    width: 90px; /* Фиксированная ширина, чтобы двоеточия стояли в ряд */
}

.item-price {
    font-weight: bold;
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

/* Ряд управления количеством и удалением */
.cart-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

/* Белый контейнер для кнопок +/- */
.qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 10px 15px;
    width: 140px; /* Делаем широким как на фото */
}

.qty-stepper button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    color: #000;
    transition: opacity 0.2s;
}

.qty-stepper button:hover {
    opacity: 0.5;
}

.qty-stepper span {
    font-size: 16px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* Кнопка мусорки */
.delete-trash-btn {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.delete-trash-btn:hover {
    transform: scale(1.1);
    color: #e31e24; /* Краснеет при наведении */
}

/* Футер корзины */
.cart-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    background: #A42325;
    color: #fff;
    border: none;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 15px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-methods img {
    height: 30px;
    opacity: 0;
}

/* Промокод */
.promo-container {
    margin-bottom: 15px;
}

.promo-btn {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    width: 100%;
    
}

.promo-input {
    display: none;
    gap: 5px;
    margin-top: 5px;
}

.promo-input.active {
    display: flex;
}

.promo-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
}

.empty-cart {
    text-align: center;
    padding-top: 50px;
}



/* ОБЩИЕ СТИЛИ (Ноутбук / Десктоп) */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Ровно 2 колонки */
    gap: 15px;                             /* Расстояние между контейнерами */
    width: 100%;
    max-width: 300px;                      /* Ограничиваем общую ширину сетки */
    margin-left: auto;
    margin-right: auto;
}

.pay-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;                   /* Легкий фон контейнера (как на фото) */
    border-radius: 8px;                    /* Скругление углов */
    padding: 12px;                         /* Внутренний отступ контейнера */
    height: 40px;                          /* Высота самого контейнера */
    border: 1px solid #eee;                /* Тонкая рамка */
}

.payment-methods-grid .pay-item:nth-child(2){
    background-color: black !important;                 /* Легкий фон контейнера (как на фото) */               /* Тонкая рамка */
}

.payment-methods-grid .pay-item:nth-child(3){
    background-color: black !important;                 /* Легкий фон контейнера (как на фото) */               /* Тонкая рамка */
}

.pay-item img {
    height: 35px;                          /* РАЗМЕР ИКОНКИ (как ты просил) */
    width: auto;
    object-fit: contain;
}














/* ===========================
   RESPONSIVE PATCH (paste at end)
   =========================== */

/* Prevent overflow */
img, video, svg {
  max-width: 100%;
  height: auto;
}

/* Allow smooth scaling in preview */
.frame-canvas, .preview-section, .studio-container {
  max-width: 100%;
}

/* ---------- MOBILE: up to 767px ---------- */
@media (max-width: 767px) {

  /* Top "Made in" bar slightly smaller */
  .MadeIn {
    min-height: 2.5em;
    font-size: 14px;
  }

  /* Navbar: burger on, desktop menu off, tighter padding */
  .navbar {
    padding: 0 12px;
    height: 56px;
  }

  .menu { display: none; }          /* hide desktop menu */
  .menu-btn { display: inline-flex; } /* show burger */

  .navbar .logo {
    font-size: 16px;
    font-weight: 800;
  }

  .navbar .nav-right {
    gap: 12px;
  }

  .navbar .nav-right img {
    width: 22px;
    height: 22px;
  }

  /* Studio layout becomes vertical */
  .studio-container {
    flex-direction: column;
    gap: 18px;
    padding: 14px;
    margin: 12px auto 0 auto; /* remove negative top margin on mobile */
    border-radius: 12px;
  }

  /* Preview block: reduce padding and min-height */
  .preview-section {
    padding: 14px;
    min-height: auto;
  }

  /* Canvas scales with viewport width
     - base: 92vw
     - limit: max 460px so it doesn't get huge on large phones */
  .frame-canvas {
    width: min(92vw, 460px);
    height: min(92vw, 460px);
    box-shadow: 0 18px 36px rgba(0,0,0,0.18);
  }

  /* Title scales a bit */
  #layer-title {
    top: 14%;
    width: 60%;
    font-size: 14px;
    letter-spacing: 1.2px;
  }

  /* Controls: full width */
  .controls-section {
    max-width: 100%;
  }

  h1 {
    font-size: 22px;
  }

  .price {
    font-size: 18px;
  }

  .tabs {
    gap: 14px;
  }

  .tab-btn {
    font-size: 13px;
  }

  /* Options grid: 2 columns still ok on most phones */
  .grid-options {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .opt-btn {
    padding: 12px 10px;
    font-size: 13px;
  }

  /* Purchase section stacks for narrow screens */
  .purchase-section {
    flex-direction: column;
    height: auto;
  }

  .stepper {
    justify-content: space-between;
    padding: 10px 12px;
  }

  .stepper button {
    width: 44px;
  }

  .add-to-cart {
    width: 100%;
    padding: 16px;
    min-height: 52px;
  }

/* Сама панель: делаем шире, чтобы текст не теснился */
.cart-sidebar {
    /* Чтобы корзина не была шире экрана и не создавала горизонтальный скролл */
    width: 90% !important; 
    max-width: 100vw; 
    
    /* Убеждаемся, что она прижата к правому краю экрана при открытии */
    right: 0 !important; 
    
    /* Убираем лишние отступы, которые могут выталкивать контент */
    margin: 0;
    padding: 0;
    
    /* Чтобы контент внутри не вылезал за границы */
    overflow-x: hidden; 
    box-sizing: border-box;

    transform: translateX(100%); /* Прячем за экран по умолчанию */
    transition: transform 0.3s ease;
  }

  /* Когда корзина открыта (добавь этот класс в JS при открытии) */
  .cart-sidebar.active {
    transform: translateX(0);
  }

  /* Сама кнопка закрытия */
  .close-cart {
    position: absolute;
    right: 15px; /* Фиксированный отступ от правого края */
    top: 15px;
    z-index: 999; /* Чтобы была поверх всего */
    cursor: pointer;
    padding: 10px; /* Увеличиваем зону клика для пальца */
  }

  .cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
  }

    /* Карточка товара: Ключевое изменение */
  .cart-item {
    width: 100%;
    box-sizing: border-box; /* Важно, чтобы padding не расширял блок */
  }


    /* Миниатюра товара как в оригинале */
  .cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 2px;
  }

  /* Контейнер с текстом */
  .item-details {
    flex: 1;
  }

  .item-details h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: none; /* Убираем капс, если в оригинале его нет */
  }

  /* Стилизация характеристик (Команда, Болид и т.д.) */
  .item-details p {
    display: flex;
    justify-content: flex-start;
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.4;
  }

  .item-details p strong {
    color: #888;      /* Серый цвет для подписей как на фото */
    font-weight: 400;
    width: 90px;      /* Фиксированная ширина создает ровную колонку */
    flex-shrink: 0;
  }

  .item-details p span {
    color: #111;      /* Черный цвет для самих значений */
  }

  .item-price {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-top: 10px;
  }

    /* Красивое выравнивание характеристик */
  .item-specs p {
    display: flex;
    font-size: 13px;
    margin-bottom: 4px;
  }
  .item-specs p strong {
    width: 100px; /* Одинаковая ширина для "Команда:", "Болид:" и т.д. */
    color: #888;
    font-weight: 400;
  }

    /* Кнопки управления количеством (Степпер) */
  .cart-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Кнопки слева */
    gap: 20px;
    margin-top: 15px; /* Отступ от цены сверху */
  }

  .qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e1e1e1;
    width: 120px;
    height: 45px;
    padding: 0 10px;
  }

  /* Нижняя часть (Итог и кнопка) */
  .cart-footer {
    padding: 20px;
  }

  .cart-total {
    font-size: 14px;
  }

  .checkout-btn {
    height: 55px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

.payment-methods-grid {
      gap: 10px;                         /* Чуть меньше зазоры на мобилке */
      max-width: 100%;                   /* На мобилке растягиваем по ширине корзины */
      padding: 0 10px;
    
  }

  .pay-item {
      height: 35px;                      /* Контейнеры чуть ниже на мобилках */
      padding: 8px;
  }

  .pay-item img {
      height: 28px;                      /* Оптимальный размер для экрана телефона */
  }




}




/* ---------- EXTRA SMALL phones: up to 389px (360px common) ---------- */
@media (max-width: 389px) {

  .grid-options {
    grid-template-columns: 1fr; /* one column on very small screens */
  }

  .tabs {
    gap: 10px;
  }

  .tab-btn {
    font-size: 12px;
  }

  .frame-canvas {
    width: min(94vw, 420px);
    height: min(94vw, 420px);
  }
}

/* ---------- LARGE PHONES: 390px+ (iPhone 12/13/14) ---------- */
@media (min-width: 390px) and (max-width: 767px) {
  .frame-canvas {
    width: min(88vw, 520px);
    height: min(88vw, 520px);
  }
}

/* ---------- VERY LARGE PHONES: 428px+ (Pro Max) ---------- */
@media (min-width: 428px) and (max-width: 767px) {
  .studio-container {
    padding: 16px;
  }

  h1 { font-size: 24px; }
}

/* ---------- TABLET: 768px+ ---------- */
@media (min-width: 768px) and (max-width: 1023px) {

  .studio-container {
    gap: 24px;
    padding: 24px;
    margin: 14px auto 0 auto;
  }

  .preview-section {
    padding: 24px;
    min-height: 560px;
  }

  .frame-canvas {
    width: 520px;
    height: 520px;
  }

  .controls-section {
    max-width: 420px;
  }
}
