Files
PIbd-22_Ulybin_A.A._Interne…/css/style.css
2025-05-20 14:03:18 +04:00

387 lines
5.8 KiB
CSS

/*Общие стили*/
body {
background-color: #edf7f6;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
a {
text-decoration: none;
color: black;
font-weight: bold;
}
h2 {
text-align: center;
}
img {
width: 180px;
height: 150px;
margin-right: 10px;
}
/*header*/
header {
display: flex;
flex-direction: column;
align-items: start;
margin-bottom: 50px;
}
header img {
width: 200px;
height: auto;
margin-right: 10px;
margin-bottom: 10px;
}
header h1 a{
text-align: left;
}
/*навигация*/
navbar {
display: flex;
gap: 15px;
position: fixed;
top: 40px;
right: 20px;
z-index: 3;
}
span{
top: 10px;
}
.dropdown > span {
z-index: 2;
position: relative;
cursor: pointer;
border: 2px solid black;
border-radius: 5px;
padding: 5px;
/*background: #edf7f6;*/
background: white;
margin-right: 0;
}
.dropdown:hover .links{
display: flex;
flex-direction: column;
background: white;
border-radius: 10px;
padding-right: 30px;
padding-top: 50px;
position: absolute;
top: -25px;
left: -115px;
z-index: 1;
}
.links {
display: none;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.links li {
list-style: none;
color: black;
width: 140px;
border: none;
}
/*Основной контент*/
.goods {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin-bottom: 70px;
gap: 15px;
}
.goods p {
text-align: center;
width: 270px;
height: 285px;
border: 2px solid black;
border-radius: 10px;
}
.goods img {
width: 250px;
height: 250px;
object-fit: cover;
margin: 0 auto;
}
/*Заказы*/
.typeOfOrder {
display: flex;
justify-content: space-around;
}
.typeOfOrder h2{
border: 2px solid black;
border-radius: 5px;
width: 180px;
margin-left: auto;
}
.inProcess h2{
background-color: yellow;
}
.done h2{
background-color: green;
}
/*Корзина и Избранное*/
.basket,
.favourites {
margin-left: 50px;
}
.basket h1,
.orders h1 {
margin-left: 50px;
}
li {
position: relative;
border: 2px solid black;
border-radius: 10px;
width: 400px;
display: flex;
font-size: large;
margin-bottom: 15px;
padding: 10px;
}
.basket p,
.favourites p {
position: absolute;
bottom: 5px;
right: 10px;
margin: 0;
font-weight: bold;
}
/*Кнопка опалты в корзине*/
.buy {
position: fixed;
bottom: 20px;
right: 20px;
background-color: greenyellow;
text-align: center;
border: 2px solid black;
border-radius: 10px;
width: 200px;
height: 60px;
display: flex;
transition: background-color 0.3s ease-in-out;
}
.buy a {
font-size: xx-large;
font-weight: bold;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.buy:hover {
background-color: lightgreen;
}
/*Личный кабинет*/
.account-container {
display: flex;
}
.account {
text-align: center;
margin: auto;
/*margin: 50px auto;*/
width: 300px;
padding: 20px;
border: 2px solid black;
border-radius: 15px;
background-color: #f9f9f9;
}
.account img {
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 20px;
border: 3px solid black;
}
.account h3 {
font-weight: bold;
margin-top: 10px;
font-size: x-large;
}
/*Footer*/
footer {
margin-top: 50px;
text-align: center;
font-size: 14px;
}
.contacts {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
}
.contact-item {
display: flex;
align-items: center;
}
.contact-item p {
margin: 0;
}
.contact-item img {
width: 24px;
height: auto;
}
/* Адаптивная верстка */
@media only screen and (min-width: 961px) {
.goods {
justify-content: space-around;
}
.basket,
.favourites {
margin-left: 50px;
}
}
@media only screen and (min-width: 401px) and (max-width: 960px) {
.goods {
justify-content: center;
}
.typeOfOrder{
flex-direction: column;
}
.typeOfOrder h2 {
margin-left: 0;
}
li {
width: 50%;
flex-direction: column;
}
.basket,
.favourites {
margin-left: auto;
margin-right: auto;
}
.basket p,
.favourites p {
position: relative;
display: block;
bottom: -5px;
right: auto;
}
.buy {
width: 150px;
height: 50px;
}
}
@media only screen and (max-width: 400px) {
body {
font-size: 14px;
}
header {
flex-direction: column;
align-items: center;
}
navbar {
position: static;
flex-direction: column;
align-items: center;
gap: 10px;
}
.dropdown:hover .links {
top: 180px;
left: auto;
}
.goods p {
width: 100%;
height: auto;
}
.goods img {
width: 97%;
height: auto;
}
li {
width: auto;
flex-direction: column;
align-items: center;
}
.typeOfOrder{
flex-direction: column;
}
.typeOfOrder h2 {
margin-left: 5;
}
.basket,
.favourites {
width: 100%;
margin-left: auto;
margin-right: auto;
}
ol {
padding-inline-start: 0;
}
.basket p,
.favourites p {
position: relative;
display: block;
bottom: -5px;
}
.buy {
width: 110px;
height: 35px;
}
.buy a {
font-size: x-large;
}
.account {
width: 100%;
}
.contacts {
gap: 2px;
}
}