/* Base styles for CRIMEA_COSM template */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #111;
    background: #f6f7f9;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    padding: 24px 0;
    background: #ffffff;
    border-bottom: 1px solid #e7e9ee;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: #111;
}

.site-main {
    flex: 1;
    padding: 32px 0 48px;
}

.site-footer {
    padding: 24px 0;
    background: #ffffff;
    border-top: 1px solid #e7e9ee;
}

.footer-copy {
    font-size: 14px;
    color: #667;
}


:root {
  --primary-green: #74bc31;
  --text-dark: #333;
}

.main-header {
  width: 100%;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 15px 0;
  font-family: 'Arial', sans-serif;
  position: relative;
}

body.has-hero .main-header{
  box-shadow: none !important;
  background: transparent !important;
}

body.has-page-hero .main-header{
  box-shadow: none !important;
  background: transparent !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

body.has-page-hero .main-header,
body.has-page-hero .main-header button{
  color: #fff !important;
}

body.has-page-hero .main-header .catalog-btn,
body.has-page-hero .main-header .catalog-btn span,
body.has-page-hero .main-header .nav-menu a,
body.has-page-hero .main-header .phone-link{
  color: #fff !important;
}

body.has-page-hero .main-header .burger span,
body.has-page-hero .main-header .hamburger-btn span{
  background: #fff !important;
}

body.has-page-hero .main-header .logo svg path,
body.has-page-hero .main-header .logo svg circle,
body.has-page-hero .main-header .logo svg rect,
body.has-page-hero .main-header .phone-link svg path,
body.has-page-hero .main-header .phone-link svg circle,
body.has-page-hero .main-header .phone-link svg rect,
body.has-page-hero .main-header .user-tools svg path,
body.has-page-hero .main-header .user-tools svg circle,
body.has-page-hero .main-header .user-tools svg rect{
  fill: #fff !important;
  stroke: #fff !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  position: relative;
}

.catalog-btn {
  background-color: var(--primary-green);
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
  gap: 10px;
  transition: opacity 0.2s;
}

.catalog-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.catalog-btn:hover {
  opacity: 0.9;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  margin-right: 25px;
  font-size: 15px;
}

.phone-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.socials {
  display: flex;
  gap: 12px;
  align-items: center;
}

.user-tools {
  display: flex;
  gap: 12px;
  align-items: center; 
}

.user-tools.is-hidden{
  visibility: hidden;
}

.search-panel{
  position: absolute;
  top: 120%;
  left: 0;
  right: 0;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-panel.is-open{
  opacity: 1;
  pointer-events: auto;
}

.search-panel__backdrop{
  position: absolute;
  inset: 8px 0 0 0;
  background: rgba(0,0,0,0.05);
}

.search-panel__body{
  position: relative;
  margin-top: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  border-top: 1px solid #efefef;
  max-height: calc(100vh - var(--header-height, 72px) - 8px);
  overflow: auto;
}

.search-panel__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 15px 36px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.6fr);
  gap: 28px;
}

.search-panel__title{
  font-size: 26px;
  letter-spacing: 0.08em;
  color: #6b6b6b;
  margin-bottom: 14px;
}

.search-panel__input{
  display: flex;
  align-items: center;
  border-bottom: 2px solid #d8d8d8;
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.search-panel__field{
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 4px 0;
}

.search-panel__submit{
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
}

.search-panel__suggestions{
  display: grid;
  gap: 12px;
  color: #444;
  font-size: 14px;
  line-height: 1.4;
}

.search-panel__right{
  border-left: 1px solid #efefef;
  padding-left: 24px;
}

.search-panel__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 18px;
}

.product-card{
  background: #fafafa;
  border: 1px solid #f0f0f0;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.product-badge{
  display: inline-block;
  background: #79b932;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  width: fit-content;
  border-radius: 2px;
}

.product-badge.is-sale{
  background: #a338b0;
}

.product-badge.is-hit{
  background: #f39c12;
}

.product-thumb{
  height: 110px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 30%, #1f1f1f 0 45%, transparent 47%),
    linear-gradient(180deg, #d8b16a 0 20%, #1f1f1f 20% 100%);
}

.product-title{
  font-size: 12px;
  color: #2b2b2b;
  min-height: 32px;
}

.product-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price{
  font-weight: 700;
  font-size: 14px;
}

.product-cart{
  border: none;
  background: #a338b0;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.tool-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 20px;
  color: #333;
}

.cart-btn{
  position: relative;
}

.cart-badge{
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e60023;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.burger {
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
}
.burger::before, .burger::after {
  content: "";
  width: 18px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 0;
}
.burger::before {
   top: -6px; 
}

.burger::after {
   bottom: -6px;
}

.icon-phone {
  padding-top: 5px;
}

.logo {
  cursor: pointer;
}

.catalog-menu {
  position: absolute;
  top: calc(100% + 20px);
  left: 0;
  background:white;
  display: none;
  box-shadow:0 5px 20px rgba(0,0,0,0.1);
  padding: 10px 30px;
  gap: 40px;
  display: none;
  z-index: 1000;
  align-items: flex-start;
}

.catalog-menu.active{
  display:block;
}

.catalog-menu.show-right{
  display:block;
}

.catalog-left{
  min-width: 150px;
  background: #fff;
  box-shadow: none;
  filter: none;
}

.catalog-left a{
  display:inline-block;
  width: fit-content;
  padding:10px 0;
  font-size:18px;
  text-decoration:none;
  color:#333;
}

.catalog-menu a:hover{
  color: #8e8e8e;
}

.login-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.login-modal.is-open{
  display: block;
}

.login-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.login-modal__content{
  position: relative;
  width: 320px;
  max-width: calc(100% - 32px);
  margin: 10vh auto 0;
  background: #fff;
  border-radius: 8px;
  padding: 24px 26px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-family: 'Manrope', sans-serif;
}

.login-modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #333;
}

.login-modal__title{
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.2;
  color: #333;
  text-transform: uppercase;
}

.login-modal__form{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-modal__label{
  font-size: 13px;
  color: #333;
}

.login-modal__input{
  border: 1px solid #bdbdbd;
  border-radius: 3px;
  padding: 9px 10px;
  font-size: 14px;
}

.login-modal__submit{
  margin-top: 6px;
  background: #a63ab3;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 12px 14px;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-modal__links{
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.login-modal__links a{
  color: #333;
  text-decoration: none;
}

.login-modal__links a:hover{
  text-decoration: underline;
}

.login-modal__check{
  margin-top: 6px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #333;
}

.login-modal__check input{
  margin-top: 2px;
}

.catalog-left a.is-active{
  color:#b600ff;
}

.catalog-right{
  display:none;
  position: absolute;
  top: 0;
  left: calc(100% + 6px);
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow:
    6px 0 12px rgba(0,0,0,0.08),
    0 4px 12px rgba(0,0,0,0.08);
  padding: 5px 16px;
  min-width: 200px;
}

.catalog-menu.show-right .catalog-right{
  display:block;
}

.catalog-right a{
  display:block;
  padding:8px 0;
  color:#333;
  text-decoration:none;
}

.catalog-right-title{
  font-size:16px;
  font-weight:600;
  margin-bottom:10px;
  color:#333;
}

.catalog-right-list a{
  display:block;
  padding:8px 0;
  color:#333;
  text-decoration:none;
}

.hamburger-btn{
  display: none;
  width: 36px;
  height: 30px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-btn span{
  display: block;
  height: 2px;
  width: 100%;
  background: #252525;
  border-radius: 2px;
}

.mobile-menu{
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  z-index: 1000;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-height, 80px);
}

.mobile-menu a{
  text-decoration: none;
  color: #333;
  font-size: 15px;
}

body.has-page-hero .mobile-menu a{
  color: #333 !important;
}

body.has-page-hero .mobile-menu{
  color: #333 !important;
}

.mobile-menu.is-open{
  display: flex;
}

@media (max-width: 768px){
  .main-header{
    padding: 10px 0;
  }

  .container{
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-menu,
  .phone-block,
  .socials{
    display: none;
  }

  .hamburger-btn{
    display: flex;
  }

  .logo{
    order: 1;
  }

  .user-tools{
    order: 2;
    margin-left: auto;
  }

  .hamburger-btn{
    order: 3;
  }

  .catalog-wrap{
    order: 4;
    width: 100%;
  }

  .catalog-btn{
    width: 100%;
    justify-content: center;
  }

  .catalog-left{
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .catalog-left a{
    display: block;
    width: 100%;
  }

  .catalog-menu{
    left: 15px;
    right: 15px;
    width: auto;
  }

  .catalog-right{
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .catalog-left .catalog-right{
    margin-top: 8px;
  }

  .search-panel__inner{
    grid-template-columns: 1fr;
  }

  .search-panel__right{
    border-left: none;
    padding-left: 0;
  }

  .search-panel__grid{
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
