*, ::after, ::before {
    box-sizing: border-box;
	font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    background: #edecfc;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
}

@media screen and (min-width: 768px) {
    body { 
        max-width: 620px;
		margin: 0 auto;
     }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    body { 
       max-width: 300;
       margin-bottom: 100;
    }
}

@media screen and (max-width: 767px) {
    body { 
        max-width: 100%;
        margin-bottom: 100;
    }
}

@media screen and (min-width: 600px) {
	.products {
	max-width: 600px;
    }
}

.cats {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.main-title{
	padding: 5px;
    font-size: 20px;
    margin-top: 20px;
	text-align:center;
}

.horizontal-menu {
    border-radius: 5px 5px 0 0;
    max-width: 600px;
    width: 100%;
    padding: 10px 5px;
    background: #ffffff2e;
    position: fixed;
    bottom: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.horizontal-menu-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    touch-action: pan-x;
}

.horizontal-menu-scroll::-webkit-scrollbar {
display: none;
}

.horizontal-menu button {
	flex: 0 0 auto;
    color: black;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 6px;
    pointer-events: auto;
    background-color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0px solid rgba(255, 255, 255, 0.18);
}

.horizontal-menu button.active {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    color: white;
}

.horizontal-menu button:hover {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    color: white;
}

select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid #001031;
    border-radius: 5px;
    background-color: white;
    color: #000000;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
}

select:focus {
    border-color: #2a4473;
    outline: none;
}

select option {
    background-color: white;
    color: black;
}

.products {
    display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
	margin: 10px 10px 200px 10px;
    text-align: center;
	width: 100%;
	padding-right: 10px;
    padding-left: 10px; 
}

.product {
    background: rgb(255, 255, 255);
    border-radius: 10px;
	position: relative;
    padding-bottom: 45px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product img {
    width: 100%;
    height: auto;
    border-radius: 10px 10px 0 0;
}

.product-name {
    font-size: 1em;
    font-weight: bold;
    color: #000000;
	margin-bottom: 10px;
    margin-top: 10px;
	padding-right: 7px;
    padding-left: 7px;
}

.product-description{
	font-size: 0.8em;
	margin-bottom: 10px;
	white-space: break-spaces;
	padding-right: 5px;
    padding-left: 5px;
}

.product-price {
    font-size: 16px;
    color: #000000;
	margin-bottom: 10px;
}

.min-height267{
	min-height: 267px;
}

.quantity-control {
	display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.quantity-control button {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    border: none;
    border-radius: 5px;
    color: #ffffff;
    padding: 5px 20px;
    cursor: pointer;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border-radius: 5px;
    border: none;
    height: 25px;
}

.oformit {
	max-width: 600px;
    position: fixed;
    bottom: 60px;
    width: 95%;
    border: 0;
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    padding: 15px;
    border-radius: 5px;
    margin-left: 10px;
    margin-right: 10px;
    text-align: center;
    color: white;
    display: none;
    cursor: pointer;
    justify-content: center;
}

.backbtn {
	max-width: 600px;
    height: 33px;
    position: fixed;
    top: 0;
    border-radius: 1px 1px 10px 0px;
    background: #00000024;
	backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100px;
    padding: 3px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    left: 0;
}

#total-price{
	margin-right: 5px;
}

.popup {
	display: none;
	position: fixed;
	max-width: 600px;
	width: 90%;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background-color: white;
	padding: 20px;
	border: 1px solid #ccc;
	z-index: 1000;
}
.popup-overlay {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999;
}
.popup button {
	margin-top: 10px;
	background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    width: 100%;
}
#datetime-input {
	display: none;
	margin-top: 10px;
}
.datetime-label {
	cursor: pointer;
	color: blue;
	text-decoration: underline;
	margin-top: 10px;
	display: block;
}

#datetime-input {
    width: 100%; /* Full width */
    padding: 10px; /* Padding for spacing inside the input */
    margin: 10px 0; /* Margin for spacing around the input */
    font-size: 16px; /* Font size */
    border: 1px solid #ccc; /* Light gray border */
    border-radius: 5px; /* Rounded corners */
    background-color: #f9f9f9; /* Light background color */
    color: #333; /* Dark text color */
    box-sizing: border-box; /* Ensure padding and border do not affect width */
    transition: border-color 0.3s ease; /* Smooth transition for border color */
}

/* Focus state */
#datetime-input:focus {
    outline: none; /* Remove default outline */
    border-color: #007BFF; /* Blue border on focus */
    background-color: #fff; /* White background on focus */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); /* Subtle blue shadow on focus */
}

.company-photo {
    border-radius: 100%;
    width: 120px;
    margin-top: 15px;
}

.cat-toggle-btn {
	display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    position: fixed;
    bottom: 0;
    width: 100%;
    color: black;
    text-align: center;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    z-index: 1000;
    border-top: 1px solid #000000;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 0;
}

/* Оверлей категорий (по умолчанию скрыт) */
.cat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 2000;
  display: none;
  overflow: auto;
  flex-direction: column;
}

.cat-overlay.active {
  display: flex;
  align-items: center;
}

.cat-overlay-content {
    overflow-y: auto;
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.cat-overlay-content button {
  max-width: 600px;
  width: 100%;
  padding: 18px;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
  color: #333;
  cursor: pointer;
  transition: 0.2s;
}

.cat-overlay-content button:hover {
  background: #ddd;
}

.cat-image {
width: 100%;
height: 110px;
border-radius: 10px;
object-fit: cover;
background: #eaeaea;
}


.cat-overlay-content-im {
	flex: 1;
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    align-content: center;
	overflow-y: unset;
}

.cat-overlay-content-im button{
	display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 600px;
    width: 100%;
    padding: 5px 5px 5px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    color: #272727;
    cursor: pointer;
    transition: transform .12s ease, background-color .2s ease;
}

@media screen and (orientation: landscape)
  and (min-width: 1024px)
  and (max-width: 1366px)
  and (hover: none)
  and (pointer: coarse) {

  :root { --sidebar-w: 260px; --divider: #e5e7eb; }

  .horizontal-menu {
	border-radius: 0;
    display: flex !important;
    position: fixed !important;
    top: 0; left: 0; right: auto; bottom: 0;
    width: var(--sidebar-w);
    height: 100vh; height: 100dvh;
    padding: 0;
    background: #fff;
    border-right: 1px solid var(--divider);
    box-shadow: 2px 0 18px rgba(0,0,0,.06);
    z-index: 1200;
    overflow-y: auto;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;        /* без «резинового» дотягивания */
    touch-action: pan-y; 
    flex-direction: column;
  }

  .horizontal-menu > *,
  .horizontal-menu .scroll-wrapper,
  .horizontal-menu .items,
  .horizontal-menu .list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    scroll-snap-type: none !important;
  }

  /* Пункты меню */
  .horizontal-menu button,
  .horizontal-menu a,
  .horizontal-menu .category,
  .horizontal-menu .category-item {
    position: relative;
    width: 100%;
    display: block !important;
    text-align: left;
    padding: 10px 10px;
	margin: 0 0px;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
    color: #111;
    box-shadow: none;
    border: none !important;
    border-radius: 0 !important;
    transition: transform .12s ease, background-color .2s ease, box-shadow .2s ease;
    white-space: break-spaces;
    line-height: 1.5em;
  }

  /* Серый разделитель между пунктами (кроме последнего) */
  .horizontal-menu button:not(:last-child)::after,
  .horizontal-menu a:not(:last-child)::after,
  .horizontal-menu .category:not(:last-child)::after,
  .horizontal-menu .category-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background: var(--divider);
    transform: scaleY(.5);
    transform-origin: bottom;
    pointer-events: none;
  }

  .horizontal-menu button:hover,
  .horizontal-menu a:hover,
  .horizontal-menu .category:hover,
  .horizontal-menu .category-item:hover {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
  }

  .horizontal-menu .active,
  .horizontal-menu .selected,
  .horizontal-menu .is-active {
    background: linear-gradient(to right, #cb2d3e 0%, #ef473a  51%, #cb2d3e  100%);
    color: #fff !important;
  }

  .main-title,
  .products,
  .backbtn,
  .header, .top-bar, .search, .page-wrap {
    margin-left: 280px;
  }

  .main-title { margin-top: 16px; }
  .products   { margin-right: 16px; }
  .av-profile {margin-left: 280px;}
  .oformit {
    position: fixed;
    left: 0; right: -265px;
    margin: 0 auto;
    bottom: 20px;
    z-index: 1400;
    width: auto;
    padding: 20px;
  }

  .products {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 16px;
    max-width: 1100px;
  }

  body { overflow-x: hidden; max-width: 1000px; margin: 0 auto; }

  .quantity-control button { padding: 15px 50px; }
  .product-price { margin-bottom: 45px; }
  .product-description {
	font-size: 1em;
	}
	.product-name {
		font-size: 1.2em;
	}
	.popup {
	z-index: 9999;
	left: 55%;
	}
	.popup-overlay {
	z-index: 9999;
	}
	.popup button {
	padding: 20px 20px;
	}
	.backbtn {
		display: none;
	}
}

@media screen and (orientation: landscape) and (min-width: 1024px) and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    .products {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        gap: 16px;
        max-width: 660px;
    }
	.backbtn {
		display: none;
	}
}

 .hero-cover {
	position: relative;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    overflow: hidden;
    background: #f3f3f3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
	border-radius: 0px 0px 10px 10px;
  }
  .hero-cover .cover-img {
    display: block;
    width: 100%;
    height: 160px;                 /* при желании 180–220 */
    object-fit: cover;
  }
  .hero-cover .logo-badge {
    position: absolute;
    left: 50%;
	margin-bottom: 15px;
    transform: translateX(-50%);
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
  }
  .hero-cover .logo-badge img {
    width: 100%;
    border-radius: 0;
  }
  
  .m-search {
	width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9;
    margin-top: -20px;
  }
  
  .m-in-search {
	width: 80%;
    padding: 10px;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #131920;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 0px solid #bec8d0;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgb(0 0 0 / 22%), 0 4px 6px rgb(0 0 0 / 0%), inset 0 1px 0 rgb(255 255 255 / 0%);
  }

	.m-in-search:focus {
		outline: none;
		box-shadow: 0 10px 20px rgb(0 0 0 / 22%), 0 4px 6px rgb(0 0 0 / 0%), inset 0 1px 0 rgb(255 255 255 / 0%);
	}


.w-select {
	z-index: 999;
    width: 140px;
    top: 5px;
    right: 6px;
    position: absolute;
    border: 0px;
}

@media screen and (orientation: landscape)
  and (min-width: 1030px)
  and (max-width: 1366px)
  and (hover: none)
  and (pointer: coarse) {

  .hero-cover{
	  margin-left: 140px;
  }
  .m-search {
    margin-left: 280px;
  }
	.hero-cover .logo-badge {
		left: 51%;
	}
	.oformit {
		max-width: 800px;
	}
}

@media screen and (orientation: landscape)
  and (min-width: 1024px)
  and (max-width: 1029px)
  and (hover: none)
  and (pointer: coarse) {

  .hero-cover{
	  margin-left: 287px;
        width: 69%;
  }
  .m-search {
    margin-left: 280px;
	  width: 60%;
  }
  .hero-cover .logo-badge{
	  left: 51%;
  }
	.products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
		max-width: 705px;
	}
	.quantity-control button {
        padding: 15px 30px;
	}
	
}

@media screen and (orientation: landscape)
  and (min-width: 1280px)
  and (max-width: 1300px)
  and (hover: none)
  and (pointer: coarse) {

	.hero-cover{
	margin-left: 203px;
	max-width: 910px;
	}
	.m-search {
	margin-left: 320px;
	}
	.products {
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
	max-width: 910px;
	margin-left: 330px;
	}
	
}

@media screen and (orientation: landscape)
  and (min-width: 1024px)
  and (hover: none)
  and (pointer: coarse) {

	.horizontal-menu-scroll { 
	padding-right: 0px !important;
    flex-direction: column;
	width: 100%;
	}
	.horizontal-menu .horizontal-menu-wrapper .horizontal-menu-more{
		display: none !important;
	}
	
}