/*=================================================
  28. Ecommerce (Shop) Section
===================================================*/
.cs_shop_section_1 {
  padding: 120px 0;

  @media (max-width: 991px) {
    padding: 70px 0;
  }
}

/*=================================================
  Shop Toolbar (result count + sorting)
===================================================*/
.cs_shop_toolbar {
  display: flex;
  gap: 16px 24px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;

  .cs_shop_sort {
    width: min(100%, 424px);
    border: 1px solid rgba(134, 148, 167, 0.5);

    .cs_choice,
    .choices,
    .choices__inner {
      width: 100%;
      border: 0;
      outline: 0;
      min-height: auto;
      background-color: transparent;
    }

    .choices {
      margin-bottom: 0;
    }

    .choices__inner {
      padding: 14px 40px 14px 20px !important;
      border-radius: 5px;
    }

    .choices__list--single {
      padding: 0;

      .choices__item {
        color: var(--secondary-color);
      }
    }

    .choices[data-type*="select-one"]::after {
      content: "";
      width: 8px;
      height: 8px;
      margin: 0;
      border: 2px solid var(--secondary-color);
      border-left: 0;
      border-top: 0;
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-65%) rotate(45deg);
      pointer-events: none;
    }

    .choices__list--dropdown,
    .choices__list[aria-expanded] {
      z-index: 3;
      background-color: var(--white-color) !important;
    }
  }

  @media (max-width: 575px) {
    .cs_shop_sort {
      width: 100%;
    }
  }
}

/*=================================================
  Product Card (individual component)
===================================================*/
.cs_product_card_1 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  .cs_product_thumb {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgba(134, 148, 167, 0.5);

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 1);
    }
  }

  .cs_btn_style_2 {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    border: 1px solid var(--accent-color);
    transform: translate(-50%, 20px);
    transition:
      all 0.4s ease,
      opacity 0.4s ease,
      transform 0.4s ease,
      visibility 0.4s ease;

    img {
      width: 16px;
      border-radius: 0;
      transition: filter 0.2s ease;
    }

    &:hover {
      color: var(--white-color);
      background-color: var(--accent-color);

      img {
        filter: brightness(0) saturate(100%) invert(100%);
      }
    }
  }

  .cs_product_info {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .cs_product_title {
    a {
      &:hover {
        color: var(--accent-color);
      }
    }
  }

  .cs_product_meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: auto;
  }

  .cs_product_price {
    color: var(--accent-color);
  }

  .cs_rating {
    width: 100px;
    font-size: 16px;
    letter-spacing: 2px;
  }

  &:hover {
    .cs_product_thumb img {
      transform: scale(1.03);
    }

    .cs_btn_style_2 {
      opacity: 1;
      visibility: visible;
      transform: translate(-50%, 0);
    }
  }
}

/*=================================================
  Shop Details - Product Info
===================================================*/
.cs_shop_details_section_1 {
  padding: 120px 0;

  @media (max-width: 991px) {
    padding: 70px 0;
  }
}

.cs_product_gallery {
  display: block;
  border: 1px solid rgba(134, 148, 167, 0.5);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  @media (max-width: 991px) {
    border-radius: 10px;
  }
}

.cs_product_summary {
  width: min(100%, 650px);
  margin-left: auto;

  .cs_product_meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }

  .cs_rating {
    width: 100px;
    font-size: 16px;
    letter-spacing: 2px;
  }

  .cs_product_feature_list {
    list-style: disc;
    padding-left: 30px;
    display: flex;
    gap: 14px;
    flex-direction: column;

    li {
      &::marker {
        color: currentColor;
      }
    }

    strong {
      font-weight: 600;
      color: var(--primary-color);
    }
  }

  @media (max-width: 991px) {
    width: 100%;
  }
}

.cs_product_cart_row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;

  .cs_btn_style_2 {
    border-color: var(--accent-color);

    img {
      width: 16px;
    }

    &:hover {
      color: var(--white-color);
      background-color: var(--accent-color);

      img {
        filter: brightness(0) saturate(100%) invert(100%);
      }
    }
  }
}

.cs_quantity {
  display: inline-flex;
  align-items: center;
  width: 123px;
  padding: 12px 10px;
  flex: none;
  overflow: hidden;
  border-radius: 5px;
  background-color: var(--white-color);
  border: 1px solid rgba(134, 148, 167, 0.5);

  button {
    flex: none;
    width: auto;
    padding: 0;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-color);
    background-color: transparent;
    transition:
      color 0.3s ease,
      background-color 0.3s ease;

    &:hover {
      color: var(--accent-color);
    }
  }

  .cs_quantity_input {
    flex: 1;
    text-align: center;
    user-select: none;
    color: var(--primary-color);
  }
}

.cs_product_assurance {
  display: flex;
  gap: 10px 24px;
  flex-wrap: wrap;
  align-items: center;

  li {
    position: relative;
    padding-left: 26px;
    color: var(--primary-color);
  }

  img {
    width: 16px;
    position: absolute;
    left: 0;
    top: 8px;
  }
}

/*=================================================
  Shop Details
===================================================*/
.cs_product_details_tabs {
  margin-top: 120px;

  @media (max-width: 991px) {
    margin-top: 60px;
  }
}

.cs_shop_tab_nav {
  display: flex;
  gap: 14px 40px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(134, 148, 167, 0.5);

  li a {
    display: inline-block;
    padding: 0 0 14px;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: 600;
    transition:
      color 0.3s ease,
      border-color 0.3s ease;

    &:hover {
      color: var(--primary-color);
    }
  }

  li.active a {
    color: var(--primary-color);
    border-color: var(--accent-color);
  }

  @media (max-width: 991px) {
    padding-bottom: 20px;

    li a {
      margin-bottom: 0;
      border: 0;
      padding-bottom: 0;
    }
  }

  @media (max-width: 575px) {
    gap: 8px 20px;

    li a {
      font-size: 16px;
    }
  }
}

.cs_product_tab_content {
  padding-top: 24px;
}

.cs_spec_list {
  width: min(100%, 470px);
  display: flex;
  gap: 14px;
  flex-direction: column;

  li {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1.2fr;
    justify-content: space-between;
  }

  .cs_spec_value {
    font-weight: 600;
    color: var(--primary-color);
  }

  @media (max-width: 575px) {
    li {
      gap: 8px;
      grid-template-columns: 1fr;
    }
  }
}

/*=================================================
  Shop Details - You May Also Like
===================================================*/
.cs_related_products_section_1 {
  padding: 120px 0;

  @media (max-width: 991px) {
    padding: 70px 0;
  }
}

/*=================================================
  Cart Page
===================================================*/
.cs_cart_section_1 {
  padding: 120px 0;

  @media (max-width: 991px) {
    padding: 70px 0;
  }
}

.cs_cart_table_wrap {
  overflow-x: auto;
}

.cs_cart_table {
  min-width: 920px;

  .cs_cart_head,
  .cs_cart_row {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr 1fr 1fr 20px;
    gap: 24px;
    align-items: center;
  }

  .cs_cart_head {
    padding: 12px 24px;
    border-radius: 5px;
    background-color: var(--accent-color);

    span {
      font-size: 20px;
      font-weight: 600;
      color: var(--white-color);
      font-family: var(--secondary-font);
    }
  }

  .cs_cart_row {
    padding: 24px;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(134, 148, 167, 0.5);
  }

  .cs_cart_product_img {
    display: block;
    width: 176px;
    height: 187px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(134, 148, 167, 0.5);

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .cs_cart_product_name {
    color: var(--primary-color);

    a {
      transition: color 0.3s ease;

      &:hover {
        color: var(--accent-color);
      }
    }
  }

  .cs_cart_remove {
    width: 16px;
    height: 16px;
    flex: none;
    padding: 0;
    border: 0;
    cursor: pointer;
    background-color: transparent;

    img {
      width: 100%;
      height: 100%;
      transition: transform 0.3s ease;
    }

    &:hover img {
      transform: scale(1.1);
    }
  }

  @media (max-width: 1199px) {

    .cs_cart_head,
    .cs_cart_row {
      padding: 12px;
      gap: 15px;
      grid-template-columns: 1fr 3fr 1.5fr 1.5fr 1.5fr 20px;
    }

    .cs_cart_row {
      padding: 12px 0;
    }

    .cs_cart_product_img {
      width: 100px;
      height: 100px;
    }
  }
}

.cs_cart_actions {
  display: flex;
  gap: 12px;

  .cs_coupon_form {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;

    input {
      width: min(100%, 424px);
      padding: 12px 15px;
      outline: 0;
      border-radius: 5px;
      border: 1px solid rgba(134, 148, 167, 0.5);
      color: var(--primary-color);
      background-color: var(--gray2-color);

      &::placeholder {
        color: var(--secondary-color);
      }
    }

    .cs_btn_style_1 {
      flex: none;

      img {
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;
      }
    }
  }

  .cs_btn_style_2 {
    margin-left: auto;
    border-color: var(--accent-color);

    img {
      border-radius: 0;
    }

    &:hover {
      color: var(--white-color);
      background-color: var(--accent-color);

      img {
        filter: brightness(0) saturate(100%) invert(100%);
      }
    }
  }

  @media (max-width: 767px) {
    flex-direction: column;

    .cs_btn_style_2 {
      width: 100%;
      justify-content: center;
    }
  }

  @media (max-width: 575px) {
    .cs_coupon_form {
      flex-direction: column;

      .cs_btn_style_1,
      input {
        width: 100%;
      }
    }
  }
}

.cs_cart_totals {
  padding: 24px;
  border-radius: 20px;
  background-color: var(--gray2-color);

  .cs_cart_totals_title {
    display: inline-block;
    padding-bottom: 10px;
    position: relative;

    &::after {
      content: "";
      width: 92px;
      height: 1px;
      position: absolute;
      left: 0;
      bottom: 0;
      background-color: var(--accent-color);
    }
  }

  .cs_cart_totals_list {
    display: flex;
    gap: 16px;
    flex-direction: column;
    margin-bottom: 24px;
    color: var(--primary-color);

    li {
      display: flex;
      gap: 16px;
      justify-content: space-between;
    }
  }

  .cs_btn_style_1 {
    width: 100%;

    &::before,
    &::after {
      display: none;
    }

    img {
      width: 16px;
      filter: brightness(0) saturate(100%) invert(100%);
    }

    &:hover {
      background-color: var(--primary-color);
    }
  }

  @media (max-width: 991px) {
    border-radius: 10px;
  }
}

/*=================================================
  Checkout Page
===================================================*/
.cs_checkout_section_1 {
  padding: 120px 0;

  @media (max-width: 991px) {
    padding: 70px 0;
  }
}

.cs_checkout_form {
  .cs_input_wrap {
    padding: 10px 15px;

    label {
      display: block;
      margin-bottom: 0;
      font-size: 14px;
      line-height: 20px;
      color: var(--primary-color);
    }

    .cs_form_field {
      width: 100%;
      border: 0;
      outline: 0;
      padding: 0;
      font-size: 16px;
      line-height: 26px;
      color: var(--primary-color);
      background-color: transparent;

      &::placeholder {
        color: var(--secondary-color);
        opacity: 0.5;
      }
    }

    textarea.cs_form_field {
      resize: none;
      min-height: 110px;
    }
  }

  // Choices.js select inside the gray field box
  .choices {
    margin-bottom: 0;
  }

  .choices__inner {
    min-height: auto;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    font-size: 16px;
    background-color: transparent;
  }

  .choices__list--single {
    padding: 0;

    .choices__item {
      color: var(--secondary-color);
    }
  }

  .choices[data-type*="select-one"]::after {
    content: "";
    width: 8px;
    height: 8px;
    margin: 0;
    border: 2px solid var(--secondary-color);
    border-left: 0;
    border-top: 0;
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
  }

  .choices__list--dropdown,
  .choices__list[aria-expanded] {
    z-index: 3;
    background-color: var(--white-color) !important;
  }
}

.cs_checkout_sidebar {
  width: min(100%, 312px);
  padding: 24px;

  .cs_checkout_box_title {
    position: relative;
    padding-bottom: 6px;

    &::after {
      content: "";
      width: 92px;
      height: 1px;
      position: absolute;
      left: 0;
      bottom: 0;
      background-color: var(--accent-color);
    }
  }

  .cs_order_summary_list {
    display: flex;
    gap: 13px;
    flex-direction: column;
    color: var(--primary-color);

    li {
      display: flex;
      gap: 16px;
      justify-content: space-between;
    }

    .cs_order_summary_strong {
      font-weight: 600;
    }
  }

  .cs_btn_style_1 {
    width: 100%;

    img {
      width: 16px;
      height: 16px;
      border-radius: 0;
    }

    &::before,
    &::after {
      display: none;
    }

    &:hover {
      background-color: var(--primary-color);
    }
  }

  .cs_payment_methods {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .cs_payment_option {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 0;
      cursor: pointer;
      color: var(--primary-color);

      input[type="radio"] {
        width: 18px;
        height: 18px;
        flex: none;
        margin: 0;
        cursor: pointer;
        position: relative;
        appearance: none;
        border-radius: 50%;
        background-color: var(--white-color);
        border: 1px solid rgba(134, 148, 167, 0.5);
        transition: all 0.2s ease;

        &:checked {
          border-color: var(--accent-color);
          background-color: var(--accent-color);
        }
      }
    }

    .cs_payment_desc {
      margin: 6px 0 0 30px;
    }
  }

  @media (max-width: 991px) {
    width: 100%;
  }
}