body {
	font-family: "Archivo", sans-serif;
}

* {
	margin: 0;
	color: inherit;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.title {
	font-weight: 900;
	font-variation-settings: "wdth" 125;
	line-height: 0.8;
	text-transform: uppercase;
	letter-spacing: calc(-1 * clamp(0px, -4.0909px + 1.1364vw, 10px));
	grid-column: 1 / -1;
}

.title > *:after {
	content: "®";
	font-size: clamp(12px, 3.8182px + 2.2727vw, 32px);
	vertical-align: top;
	font-weight: 500;
}

.grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	padding: clamp(12px, 3.8182px + 2.2727vw, 32px);
	padding-bottom: 0;
	gap: clamp(12px, 3.8182px + 2.2727vw, 32px);
}

.subgrid {
	display: grid;
	grid-template-columns: subgrid;
	gap: clamp(12px, 3.8182px + 2.2727vw, 32px);
}

.main-nav {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
}

.main-nav-list {
	list-style-type: none;
	padding: 0;
	font-variation-settings: "wdth" 125;
	font-weight: 500;
	text-transform: uppercase;
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
	padding: 4px 0;
	row-gap: 4px;
	border-top: 1px solid black;
	border-bottom: 1px solid black;
}

.main-nav-list > li:nth-last-child(2),
.main-nav-list > li:nth-last-child(1) {
	margin-left: auto;
}

.products-section {
	grid-column: 2 / -1;
}

.side-menu { 
	align-self: start;
	position: sticky;
	top: 1rem;
	background-color: white;
	padding: 10px;
	border-radius: 10px;
}

.side-menu > div {
	max-height: calc(100vh - 1rem);
	/*overflow-y: scroll;*/
}

.side-menu ul {
	list-style-type: none;
	padding-left: 16px;
}

.side-menu h2 {
	margin-bottom: 2rem;
	text-transform: uppercase;
	font-weight: 900;
	font-variation-settings: "wdth" 125;
	font-size: 1.2rem;
}

.side-menu h3 {
	font-weight: 900;
	font-variation-settings: "wdth" 125;
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

.side-menu li:last-of-type {
	margin-bottom: 1rem;
}

.side-menu > div > ul > li:last-of-type > ul > li:last-of-type {
	margin-bottom: 5rem;
}

.side-menu button {
	cursor: pointer;
	background-color: transparent;
	border: 1px solid black;
	font-size: 0.8rem;
	padding: 3px 9px;
	margin-bottom: 3px;
}

.side-menu button:hover {
	background-color: black;
	color: white;
}

#side-menu-toggle {
	display: none;
	position: absolute;
	padding: 9px 3px;
	background-color: white;
	border: 1px solid black;
	border-left: none;
	left: calc(100% - 1px);
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
}

#side-menu-toggle:hover {
	background-color: black;
	color: white;
}

img {
	max-width: 100%;
}

.product-image {
	display: block;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.product-cell {
	display: flex;
	flex-direction: column;
}

.product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: clamp(4px, 1.5455px + 0.6818vw, 10px);
	padding: clamp(4px, 1.5455px + 0.6818vw, 10px) 0;
}

.product-title {
	text-transform: uppercase;
	font-weight: 500;
	font-size: 1rem;
	letter-spacing: -0.025em;
}

.product-price {
	font-size: 0.9rem;
}

.add-to-cart {
	cursor: pointer;
	margin-top: auto;
	background-color: transparent;
	border: 1px solid black;
	font-size: 0.8rem;
	font-variation-settings: "wdth" 125;
	padding: 3px 0;
}

.add-to-cart:hover {
	background-color: black;
	color: white;
}

.red{
	color:red;
}
.center{
	text-align: center;	
}
footer {
	margin-top: 5rem;
	padding: clamp(12px, 3.8182px + 2.2727vw, 32px) 0;
	background-color: white;
	grid-column: 2 / -1;
	border-top: 1px solid black;
	font-size: 0.8rem;
}

@media screen and (max-width: 1000px) {
	.grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.main-nav-list > li:nth-last-child(2),
	.main-nav-list > li:nth-last-child(1) {
		margin-left: 0;
	}
}

@media screen and (max-width: 800px) {
	.grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	
	.main-nav-list > li:nth-last-child(2),
	.main-nav-list > li:nth-last-child(1) {
		margin-left: 0;
	}
}

@media screen and (max-width: 600px) {
	.grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	
	.main-nav-list > li:nth-last-child(2),
	.main-nav-list > li:nth-last-child(1) {
		margin-left: 0;
	}
}

@media screen and (max-width: 400px) {
	.grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	
	.main-nav-list > li:nth-last-child(2),
	.main-nav-list > li:nth-last-child(1) {
		margin-left: 0;
	}
	
	#side-menu-toggle {
		display: block;
	}
	
	.side-menu {
		max-width: 75vw;
		min-height: 100vh;
		transform: translateX(calc(-100% - clamp(12px, 3.8182px + 2.2727vw, 32px)));
		position: fixed;
		top: 0px;
	}
	
	.side-menu > div {
		padding: clamp(12px, 3.8182px + 2.2727vw, 32px);
	}
	
	.products-section, footer {
		grid-column: 1 / -1;
	}
	
	.side-menu.show {
		transform: translateX(calc(clamp(12px, 3.8182px + 2.2727vw, 32px) * -1));
	}
	
	.side-menu.show > #side-menu-toggle {
		background-color: black;
		color: white;
	}
	
	.side-menu.show > #side-menu-toggle > svg {
		transform: rotate(180deg);
	}
}

/***************** POPUP ********************/
.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;

    background: rgba(0, 0, 0, 0.5);

    /* Не даём popup выходить за экран */
    padding: 20px;
    box-sizing: border-box;

    /* Прокрутка самого popup */
    overflow-y: auto;

    /* Центрируем содержимое, когда оно помещается */
    align-items: center;
    justify-content: center;
}
.popup.active {
    display: flex;
}

.popup-content {
    position: relative;

    background: #fff;
    padding: 30px;
    border-radius: 10px;

    width: 100%;
    max-width: 500px;

    /* Главное исправление */
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    box-sizing: border-box;
	font-size: 16px;
	line-height: 1.6;
}

.popup-content {
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;

    border: none;
    background: transparent;
    cursor: pointer;

    font-size: 28px;
    line-height: 1;
    color: #333;
	
	margin: 0;
    font-size: 28px;
    line-height: 1;
	
	font-weight: 900;
	font-variation-settings: "wdth" 125;
	margin-bottom: 0.5rem;
}

.close:hover {
    color: red;
}
/***************** END POPUP ****************/

/***************** FORM ****************/

        .form {
            max-width: 500px;
            /*margin: 0 auto 60px;*/
            padding: 25px;
            border: 1px solid #ddd;
            border-radius: 10px;
        }

        .form h2 {
            margin-top: 0;
        }

        .form input,
        .form textarea,
        .form button {
            width: 100%;
            box-sizing: border-box;
            padding: 12px;
            margin-bottom: 15px;
            font-size: 16px;
        }

        .form textarea {
            min-height: 120px;
            resize: vertical;
        }

        .form button {
            cursor: pointer;
            border: 0;
            background: #000;
            color: #fff;
            border-radius: 5px;
        }

        .form button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .form-result {
            margin-top: 10px;
        }
/***************** END FORM ****************/
/***************** TABLE  ****************/
.course-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(35, 31, 32, 0.08);
    font-family: inherit;
    color: #292627;
}

.course-table th {
    width: 50%;
    padding: 24px 28px;
    text-align: left;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    background: #292627;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.course-table th:last-child {
    background: #8b5cf6;
    border-right: none;
}

.course-table td {
    width: 50%;
    padding: 26px 28px;
    vertical-align: top;
    font-size: 16px;
    line-height: 1.6;
    background: #fff;
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
}

.course-table td:last-child {
    border-right: none;
    background: #faf8ff;
}

.course-table p {
    margin: 0 0 12px;
}

.course-table ul {
    margin: 0;
    padding-left: 20px;
}

.course-table li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.course-table li:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .course-table {
        border-radius: 16px;
    }

    .course-table th,
    .course-table td {
        padding: 20px 18px;
    }

    .course-table th {
        font-size: 17px;
    }

    .course-table td {
        font-size: 15px;
    }
}
/***************** END TABLE ****************/


a.open-popup {
  text-decoration: none;
}

