/* Variables */

:root {
    --basic-black: #000000;
    --basic-extra-dark: #212121;
    --basic-dark: #aba9a7;
    --basic-neutral: #e5e5e5;
    --basic-extra-light: #f8f5f2;
    --basic-white: #ffffff;

    --special: #663d15;
}


body {
    /* Позициоринование  */

    /* Блочная модель */
    min-width: 960px;
    margin: 0;
    padding: 0;

    /* Типографика */
    font-family: "PT Sans Narrow", Arial, sans-serif;
    font-size: 14px;
    line-height: 24px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;

    /* Оформление */
    background-color: #000000;
    background-image: url("../img/bg.jpg");
    background-position: top center;
    background-repeat: no-repeat;

    /* Анимация */

    /* Разное */
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.visually-hidden {
    position: absolute !important;
    clip: rect(1px 1px 1px 1px);
    /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

.inner-page {
    color: var(--basic-black);
    background-color: var(--basic-extra-light);
    background-image: url("../img/pattern-light.jpg");
    background-position: 0 0;
    background-repeat: repeat;
}

.page-title {
    margin: 0;
    margin-bottom: 15px;
    padding: 0;
    font-size: 30px;
    line-height: 42px;
}


/* Buttons */


.button {
    display: inline-block;
    margin-right: 16px;
    padding: 10px 30px;
    font: inherit;
    text-align: center;
    color: var(--basic-white);
    vertical-align: middle;
    text-transform: uppercase;
    background-color: var(--basic-black);
    border: none;
}

.button:hover,
.button:focus,
.button:active {
    background-color: var(--special);
}

.button.disabled,
.button:disabled {
    cursor: default;
    opacity: 0.5;
    background-color: var(--basic-black);
}

/* Grid */

.page {
    height: 100%;
}

.page-body {
    min-height: 100%;
    display: grid;
    grid-template-rows: min-content 1fr min-content;
    align-content: start;
}

/* Grid for catalog */

.page-catalog {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-content: start;

}

.page-catalog .page-title {
    grid-column: 1 / -1;

}

.page-catalog .breadcrumbs {
    grid-column: 1 / -1;

}

/* Grid for product */

.page-product {
    display: grid;
    grid-template-columns: 460px 1fr;
    align-content: start;
    
}

.page-product .page-title {
    grid-column: 1/ -1;

}

.page-product .breadcrumbs {
    grid-column: 1/ -1;
    margin-bottom: 40px;

}

/* Container */

.container {
    width: 940px;
    margin: 0 auto;
    padding: 0 10px;
}

.main-navigation-wrapper .container {
    display: flex;
    justify-content: space-between;
}
/* current-page nav */
.current-page a {
    position: relative;
}
.current-page a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: calc(100% - 40px);
    height: 4px;
    background-color: var(--basic-white);

}

/* Main header */

.inner-page .main-header {
    background-color: var(--basic-black);
}


.main-header {
    margin-bottom: 70px;
}

/* Logo */

.main-header-logo {
    order: 2;
    width: 368px;
    height: 153px;
}

.inner-page .main-header-logo {
    order: 0;
    width: 111px;
    height: 24px;
    margin-right: 20px;
}

/* Main navigation */

.main-navigation {
    display: flex;
    flex-direction: column;
    align-items: center;

    font-size: 16px;
    line-height: 20px;
    color: var(--basic-white);

    background-color: transparent;
}

.inner-page .main-navigation {
    align-items: center;
    flex-direction: row;
}

.main-navigation-wrapper {
    width: 100%;
    margin-bottom: 60px;
    background-color: var(--basic-black);
}

/* Site navigation */

.site-navigation {
    display: flex;
    flex-wrap: wrap;   
    width: 620px;
    margin: 0;
    padding: 0;
    list-style: none;  
    min-height: 70px;
}

.site-navigation-current a:not([href]) {
    background-color: var(--basic-black);
}

/* User navigation */

.user-navigation {
    max-width: 140px;

}
.inner-page .user-navigation {
    margin-left: auto;
}

.site-navigation a,
.user-navigation a {
    display: block;
    padding: 25px 20px;
    color: var(--basic-white);
}

.site-navigation a:hover,
.site-navigation a:focus,
.user-navigation a:hover,
.user-navigation a:focus {
    background-color: var(--basic-extra-dark);
}

.user-navigation .login-link {
    position: relative;
    padding-left: 50px;
}

/* Login link */

.login-link::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 24px;
    width: 16px;
    height: 18px;
    background-image: url('../img/svg/login.svg');
    background-repeat: no-repeat;
    background-position: 0 0;
    opacity: 0.3;
}

.login-link:hover::before,
.login-link:focus::before,
.login-link:active::before {
    opacity: 1;
}

/* Features */
.features {
    margin-bottom: 70px;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 20px ;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-item {
    width: 300px;
    text-align: center;
}

.feature-item h3 {
    position: relative;
    margin: 0;
    margin-bottom: 60px;
    font-size: 30px;
    line-height: 42px;
}

.feature-item h3::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    background-color: var(--basic-white);
    transform: rotate(45deg);
}

.feature-item p {
    margin: 0 10px;
}

/*  Index columns */

.index-columns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    padding: 50px 80px;
    color: var(--basic-black);
    background-color: var(--basic-extra-light);
    background-image: 
        url('../img/line.png'),
        url("../img/pattern-light.jpg");
    background-position: center, 0 0;
    background-repeat: no-repeat, repeat;
}

.index-columns h2 {
    margin: 0;
    margin-bottom: 25px;
    font-size: 30px;
    line-height: 42px;
}


/* News */

.news {
    width: 380px;
}

.news-list {
    margin: 0;
    margin-bottom: 25px;
    padding: 0;
    list-style: none;
}

.news-item {
    margin-bottom: 25px;
}
.news-item p {
    margin: 0;
}

.news-item time {
    text-transform: none;
}

/* Gallery */

.gallery {
    width: 300px;
}

.gallery-container {
    position: relative;
    height: 260px;
}


.gallery-content {
    height: 164px;
    margin: 0;
    background-color: var(--basic-dark);
    border: 7px solid var(--basic-white);
}

.gallery-content img {
    width: 286px;
    height: 164px;
}

.gallery-button {
    position: absolute;
    bottom: 0;
    box-sizing: border-box;
    width: 140px;
    margin: 0;
}

.gallery-button-back {
    left: 0;
}

.gallery-button-next {
    right: 0;
}

/* Contacts */

.contacts {
    width: 380px;
}
.contacts p {
    margin: 0;
    margin-bottom: 25px;
}
/* Appointment */

.appointment {
    width: 300px;
}

.appointment-info {
    margin: 0;
    margin-bottom: 15px;
}

.appointment-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.appointment-item {
    width: 140px;
    margin-top: 0;
    margin-bottom: 10px;
}

.appointment label {
    display: block;
    margin-bottom: 9px;
    margin-left: 15px;
}

.appointment-item input {
    width: 140px;
    padding: 8px 15px 7px 15px;
    font: inherit;
    background-color: transparent;
    border: 2px solid var(--basic-black);
    box-sizing: border-box;
}

.appointment .button {
    display: block;
    width: 100%;
    margin-top: 10px;
    margin-right: 0;
}
.appointment-item input:focus {
    border-color: var(--special);
    outline: transparent;
}



/* Breadcrumbs */

.breadcrumbs {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 0;
    margin-bottom: 45px;
    padding: 0;
    list-style: none;
}

.breadcrumbs li {
    position: relative;
    margin-right: 42px;;
}

.breadcrumbs li::after {
    content: '';
    position: absolute;
    top: 7px;
    right: -25px;
    width: 8px;
    height: 8px;
    background-color: var(--basic-black);
    transform: rotate(45deg);
}

.breadcrumbs li:last-child {
    margin-right: 0;
}
.breadcrumbs-current::after {
    display: none;
}

.breadcrumbs a {
    color: var(--basic-black);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
    text-decoration: underline;
}


.breadcrumbs .breadcrumbs-current a {
    color: var(--basic-dark);
}


.breadcrumbs + .wrapper   {
    margin-top: 55px;
}
/* Filter */

.shop-filter {  
    width: 180px;
}
.shop-filter h2 {
    font-size: 24px;
    line-height: 30px;
}

.shop-filter  .group-filter {
    padding: 0;
    margin: 0;
    margin-bottom: 30px;
}

.shop-filter .group-filter:first-child {
    margin-bottom: 35px;
}

.group-filter h3 {
    margin: 0;
    margin-bottom: 25px;
    font-size: 24px;
    line-height: 30px;
}

.shop-filter ul {
    padding: 0;
    margin: 0;
    list-style: none;
    line-height: 18px;
}

.shop-filter .filter-option {
    margin-bottom: 19px;
    padding-left: 45px;
}

.filter-option label {
    position: relative;
    display: block;
    cursor: pointer;
    user-select: none;
}

.filter-input-checkbox:hover + label,
.filter-input-checkbox:focus + label {
    color: var(--special);
}

.filter-input-checkbox + label::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 0;
    width: 16px;
    height: 16px;
    border: 2px solid var(--basic-black);
}

.filter-input-checkbox:checked + label::after {
    content: '';
    position: absolute;
    top: 4px;
    left: -38px;
    width: 12px;
    height: 12px;
    background-image: url('../img/svg/cross.svg');
    background-repeat: no-repeat;
    background-position: 0 0;
}

.filter-input-checkbox:disabled + label {
    opacity: 0.3;
}
.filter-input-checkbox:disabled:hover + label {
    color: var(--basic-black);
}


.filter-input-radio:hover + label,
.filter-input-radio:focus + label {
    color: var(--special);
}

.filter-input-radio + label::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 0;
    width: 16px;
    height: 16px;
    border: 2px solid var(--basic-black);
    border-radius: 50%;
}

.filter-input-radio:checked + label::after {
    content: '';
    position: absolute;
    top: 6px;
    left: -36px;
    width: 8px;
    height: 8px;
    background-color: var(--basic-black);
    border-radius: 50%;
}

.filter-input-radio:disabled + label {
    opacity: 0.3;
}
.filter-input-radio:disabled:hover + label {
    color: var(--basic-black);
}


.filter-button {
    padding-right: 30px;
    padding-left: 30px;
}

/* Catalog */

.catalog {
    margin-left: 60px;    
}

.catalog-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0; 
    margin-bottom: 25px;
    list-style: none;
}

.catalog-list  .catalog-item {
    width: 220px;
    min-height: 285px;
    background-color: var(--basic-extra-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}


.catalog-item a {
    display: flex;
    flex-direction: column;
    color: var(--basic-black);
}

.catalog-item h3 {
    order: 1;
    margin: 17px 15px 12px 16px;
    font-size: 14px;
    line-height: 18px;
}

.catalog-item-image {
    width: 220px;
    height: 165px;
    margin: 0;
    object-fit: contain;
    background-color: #f7f7f7;
}

.catalog-item-price {
    display: flex;
    margin: 15px;
    margin-top: 0;
}

.catalog-item-price b {
    width: 112px;
    padding: 13px 25px 11px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    background-color: var(--basic-neutral);
}

.catalog-item-price .button {
    padding: 13px 18px 11px;
    margin-right: 0;
    line-height: 20px;
    color: var(--basic-white);
}

/* Pagination */

.paginathion {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}
.paginathion-item + .paginathion-item {
    margin-left: 7px;
}

.paginathion-item a {
    display: block;
    padding: 10px 19px;
    margin: 0;
    color: var(--basic-white);
    background-color: var(--basic-black);
}

.paginathion-item a:hover,
.paginathion-item a:focus,
.paginathion-item a:active {
    background-color: var(--special);
}

.paginathion-item-current a,
.paginathion-item-current a:hover,
.paginathion-item-current a:focus,
.paginathion-item-current a:active {
    color: var(--basic-black);
    background-color: var(--basic-white);
}

/* Product gallery */


.product-photo-preview {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
}

.product-photo-preview li {
    width: 140px;
    height: 149px;
    margin-right: 20px;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.product-photo-preview img {
    max-width: 140px;
}

.product-photo-preview li:hover {
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2);
}

.product-photo-preview li:nth-child(3n) {
    margin-right: 0;
}

.product-photo-full {
    display: block;
    width: 460px;
    height: 498px;
    margin: 0;
    margin-bottom: 20px;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
}



/* Product info */

.product-info {
    width: 390px;
    padding-top: 23px;
    padding-left: 80px;
}

.product-info h3 {
    margin: 0;
    margin-bottom: 25px;
    font-size: 24px;
    line-height: 30px;
}

.product-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-info li {
    position: relative;
    padding-left: 23px;
}

.product-info li::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--basic-black);
    transform: rotate(45deg);
}

.product-info p {
    margin: 0;
}

.product-article {
    text-align: right;
    color: var(--basic-neutral);
}



.product-description {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-right: 10px;
    margin-bottom: 62px;
}
.product-description > p:first-of-type {
    margin-bottom: 33px;
}

.product-article {
    width: 200px;
}

.product-info .product-text {
    margin-bottom: 35px;
}

.product-info .product-price {
    display: flex;
}

.product-price b {
    width: 112px;
    padding: 13px 36px 11px 36px;
    line-height: 20px;
    text-align: center;
    background-color: var(--basic-neutral);
    box-sizing: border-box;
}

.product-price .button {
    padding-right: 17px;
    padding-left: 17px;
    margin-right: 0;
}

/* Price */

.wrapper {
    position: relative;
    border-top: 2px solid #000000;
}
.wrapper .title {
    position: absolute;
    left: 17%;
    top: -7%;
    margin: 0;
    padding: 10px 28px;
    text-align: center;
    font-size: 48px;
    line-height: 48px;
    background-image: url('../img/pattern-light.jpg');

}

.price-column {
    display: flex;
    justify-content: space-between;
    margin-top: 84px;
    margin-bottom: 60px;
}



.best-title {
    margin: 0;
    margin-bottom: 25px;
}

.best-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.best-list li {
    position: relative;
    padding-left: 33px;
}
.best-list li + li {
    margin-top: 13px;
}

.best-list li::before {
    content: '';
    position: absolute;
    left: 0px;
    top: 7px;
    width: 10px;
    height: 10px;
    background-color: var(--basic-black);
    transform: rotate(45deg);
}



.prices-title {
    margin: 0;
    margin-bottom: 25px;
}

.prices-table {
    border-collapse: collapse;
}

.prices-table td {
    width: 231px;
    padding-top: 9px;
    padding-bottom: 10px;
    padding-left: 19px;
    border: 2px solid var(--basic-black);
}

.prices-table td:nth-child(2n) {
    padding-left: 0;
    text-align: center;
}


.about-us h2 {
    margin: 0;
    margin-bottom: 27px;
}


.text-wrapper {
    display: flex;
    justify-content: space-between;
}

.text-wrapper p {
    margin: 0;
    width: 385px;
}
/* Main footer */

.main-footer {

    padding: 60px 0;
    margin-top: 65px;

    color: var(--basic-white);

    background-color: var(--basic-extra-dark);
    background-image: url("../img/pattern-black.jpg");
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: cover;
}

.main-footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.footer-contacts {
    margin: 0;
    width: 320px;
}

.footer-contacts a {
    color: var(--basic-white);

    text-decoration: underline;
}
.footer-contacts p {
    margin: 0;
}

.footer-contacts a:hover,
.footer-contacts a:focus {
    text-decoration: none;
}

.footer-socials {
    width: 145px;
    justify-self: center;
    text-align: center;
}

.footer-socials ul {
    display: flex;
    column-gap: 6px;
    width: 141px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

/* .footer-socials li + li {
    margin-left: 10px;
} */

.footer-socials h2 {
    font-size: 14px;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    background-color: var(--basic-black);
    color: inherit;
}

.social-button:hover,
.social-button:focus {
    background-color: var(--basic-white);
}

.social-button:hover path,
.social-button:focus path {
    fill: var(--basic-black);
}

.footer-copyright {
    max-width: 150px;
    margin: 0;
    justify-self: end;
    text-align: center;
}

.footer-copyright b {
    display: block;
    margin-bottom: 15px;
}

.footer-copyright .button:hover,
.footer-copyright .button:focus {
    color: var(--basic-black);

    background-color: var(--basic-white);
}

.footer-copyright .button {
    margin-right: 0;
    padding: 10px 26px;
}

/* Modal */

.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    display: none;
    color: var(--basic-black);
    background-color: var(--basic-extra-light);
    background-image: url("../img/pattern-light.jpg");
    background-position: 0 0;
    background-repeat: repeat;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.7);
}

.modal-close {
    position: absolute;
    top: 0;
    right: -34px;
    width: 22px;
    height: 22px;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 2px;
    width: 19px;
    height: 3px;
    background-color: var(--basic-dark);
    transform: rotate(-45deg);
}

.modal-close::after {
    transform: rotate(45deg);
}

.modal-show {
    display: block;
    animation-name: bounce;
    animation-duration: 0.6s;
}

.modal-error {
    animation-name: shake;
    animation-duration: 0.6s;
}

.modal-map {
    width: 766px;
    height: 560px;
    border: 7px solid var(--basic-white);
}

.modal-map iframe {
    border: none; 
}


.modal-login {
    top: 120px;
    bottom: auto;
    width: 300px;
    padding: 50px 80px;
}

.modal-login h2 {
    margin: 0;
    margin-bottom: 20px;
    font-size: 30px;
    line-height: 42px;
}
.modal-description {
    margin: 0;
    margin-bottom: 10px;
}

/* Login form */
.login-form p {
    margin: 0;
    margin-bottom: 10px;
}

.login-form .login-help {
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    box-sizing: border-box;
    width: 300px;
    padding: 10px 40px 10px 15px;
    font: inherit;
    color: var(--basic-black);
    text-transform: uppercase;
    background-color: var(--basic-extra-light);
    border: 2px solid var(--basic-black);
}

.login-form input:focus {
    border-color: var(--special);
    outline: inherit;
}

.login-form .button {
    width: 100%;
}

.login-icon-user {
    background-image: url("../img/svg/user.svg");
    background-position: 270px center;
    background-repeat: no-repeat;
}

.login-icon-password {
    background-image: url("../img/svg/lock.svg");
    background-position: 270px center;
    background-repeat: no-repeat;
}


.login-checkbox:hover,
.login-checkbox:focus {
    color: var(--special);
    outline: inherit;
}



.login-checkbox input {
    appearance: none;
}

.checkbox-indicator {
    box-sizing: border-box;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    vertical-align: text-bottom;;
    border: 2px solid #000101;
}

.checkbox-indicator:hover,
.checkbox-indicator:focus {
    border-color: var(--special);
    outline: inherit;
}

.login-checkbox input:checked + span {
    background-image: url('../img/svg/cross.svg');
    background-position: 47% 56%;
    background-repeat: no-repeat;
}
/* Restore */

.restore {
    color: var(--basic-black);
    text-decoration: underline;
}

.restore:hover,
.restore:focus {
    text-decoration: none;
}


/* keyframes */

@keyframes bounce {
    0%     { transform: translateY(-2000px); }
    70%    { transform: translateY(30px);    }
    90%    { transform: translateY(-10px);   }
    100%   { transform: translateY(0);       }
}

@keyframes shake {
    0%, 100%                 { transform: translateX(0px);   }
    10%, 30%, 50%, 70%, 90%  { transform: translateX(-10px); }
    20%, 40%, 60%, 80%       { transform: translateX(10px);  }
}
