@font-face {
  font-family: YekanBakh;
  font-style: normal;
  font-weight: normal;
  src: url("../assets/fonts/YekanBakh-VF.ttf");
}
@font-face {
  font-family: YekanBakhFaNum;
  font-style: normal;
  font-weight: normal;
  src: url("../assets/fonts/YekanBakhFaNum-Regular.woff");
}

:root {
  --gold: #dbc3a9;
  --gold-dark: #c2ad97;
  --white: #fff;
  --border: #e5e5e5;
  --text: #333;
  --red: #e53935;
  --text-gray: #888;
}

html {
  box-sizing: border-box;
  overflow-y: scroll;
}

body {
  font-family: "YekanBakh", Tahoma, sans-serif;
  position: relative;
  font-size: 1rem;
  line-height: 1.8;
  direction: ltr;
  font-weight: normal;
  overflow-x: hidden;
  text-align: right;
}

* {
  padding: 0;
  margin: 0;
  font-family: inherit;
  direction: rtl;
  text-align: right;
  color: var(--text);
}

*,
::after,
::before {
  box-sizing: border-box;
}

/* farsi number */
.fa {
  font-family: YekanBakhFaNum;
}

/* containers */

.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl,
.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 576px) {
  .container,
  .container-sm {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container,
  .container-sm,
  .container-md {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1320px;
  }
}

.container-fluid {
  max-width: 100%;
}

/* end of containers */

/* row and cols */

/* Row */
.row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

@media (max-width: 768px) {
  .row {
    margin-right: 0;
    margin-left: 0;
  }
}

/* Columns */
[class*="col-"] {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Column Sizes */
.col-1 {
  flex: 0 0 8.333333%;
  max-width: 8.333333%;
}
.col-2 {
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}
.col-3 {
  flex: 0 0 25%;
  max-width: 25%;
}
.col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.col-5 {
  flex: 0 0 41.666667%;
  max-width: 41.666667%;
}
.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}
.col-7 {
  flex: 0 0 58.333333%;
  max-width: 58.333333%;
}
.col-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}
.col-9 {
  flex: 0 0 75%;
  max-width: 75%;
}
.col-10 {
  flex: 0 0 83.333333%;
  max-width: 83.333333%;
}
.col-11 {
  flex: 0 0 91.666667%;
  max-width: 91.666667%;
}
.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Responsive Columns */
@media (min-width: 576px) {
  .col-sm-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-sm-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-sm-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-sm-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-sm-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-sm-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .col-md-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-md-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .col-lg-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-lg-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-lg-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-lg-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-lg-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-lg-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 1200px) {
  .col-xl-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
  .col-xl-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-xl-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-xl-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-xl-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-xl-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-xl-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-xl-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-xl-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-xl-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-xl-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-xl-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* end of row and cols */

.product-card {
  width: 100%;
  background: var(--white);
  position: relative;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
  .product-image::after {
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: block;
    position: absolute;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    opacity: 0;
  }
  &:hover {
    .product-image::after {
      opacity: 1;
      transition: opacity 0.3s ease;
    }
    .product-details {
      .pro-title a {
        color: var(--gold);
        transition: color 0.3s ease;
      }
    }
  }
  .product-link {
    text-decoration: none;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
  }
  .product-image {
    position: relative;
    padding-top: 100%;
    width: 100%;
    height: 248px;

    .discount-badge {
      position: absolute;
      top: 10px;
      right: 10px;
      background-color: var(--red);
      color: var(--white);
      border-radius: 2px;
      font-size: 10px;
      z-index: 2;
      max-width: 50%;
      padding: 0 15px;
      width: fit-content;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .product-details {
    text-align: center;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .pro-title {
      font-size: 16px;
      color: var(--text);
      text-align: center;
      margin-bottom: 5px;
      a {
        text-decoration: none;
        color: var(--text);
        &:hover {
          color: var(--gold);
        }
      }
    }
    .product-rating {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 5px;
      .star {
        i {
          color: #ffb400;
        }
        &.empty i {
          color: var(--border);
        }
      }
    }

    .prc {
      font-size: 14px;
      color: var(--text);
      text-align: center;
      font-weight: normal;
      &.sale {
        color: var(--gold);
      }
    }

    .old-prc {
      padding: 0 5px;
      text-decoration: line-through;
      color: var(--text-gray);
      font-size: 14px;
    }
  }
}

.error-404 {
  padding: 50px 20px;
  text-align: center;

  .page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 100px 0;
  }

  .page-title {
    font-size: 220px;
    color: var(--gold);
    margin: 0;
    line-height: 1;
  }

  .sub-title {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 20px;
  }

  p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: center;
  }

  .home-button-container {
    margin-top: 30px;
  }

  .home-button {
    display: inline-block;
    background-color: var(--gold);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
  }

  .home-button:hover {
    background-color: var(--gold-dark);
    color: var(--white);
  }
}
