/*
Theme Name: Cape Market Online
Description: A custom theme for Cape Market Online.
Author: [Your Name]
Version: 1.0
*/

body {
  font-family: Arial, sans-serif;
  color: #333;
  /* Soft Cream background */
}

header {
  background-color: #b8a290;
  /* Warm Brown */
  color: #fff;
  padding: 20px;
}

footer {
  background-color: #333;

  h2 {
    color: white;
    padding-bottom: 0.5rem;
    border-bottom: 4px solid white;
    margin-bottom: 1rem;
  }

  a {
    color: white;
    transition: linear color 200ms;

    &:hover {
      color: #996666;
    }
  }

  #menu-quick-links {
    padding: 0;
    list-style: none;
  }
}

a {
  color: #996666;
  /* Burnt Orange */
  text-decoration: none;
}

a:hover {
  color: #556b2f;
  /* Olive Green */
}

.hc-offcanvas-nav .nav-highlight>.nav-item-wrapper .nav-item-link {
  background: #996666 !important;
}

.hc-offcanvas-nav ul.bottom-nav svg path {
  fill:#996666 !important;
}

#menu-main {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  position: relative;

  > li {
    position: relative;
    margin: 0;
    padding: 0;

    a {
      display: block;
      padding: 15px 20px;
      color: #fff;
      text-decoration: none;
      background-color: #b8a290;
      position: relative;
      transition: color 0.3s ease;
    }

    /* Pseudo element for underline */
    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 3px;
      background-color: #fff;
      transition: width 0.3s ease, left 0.3s ease;
    }

    &:hover {
      color: #f5f5dc;
    }

    /* When hovering, move the underline smoothly to the item */
    &:hover::after {
      width: 100%;
      left: 0;
    }

    &.current-menu-item > a {
      color: #f5f5dc;
    }

    /* Ensure the active (current) item stays underlined */
    &.current-menu-item::after {
      width: 100%;
      left: 0;
    }

    ul {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      list-style: none;
      background-color: white;
      padding: 0;
      margin: 0;
      z-index: 3;

      li {
        position: relative;

        a {
          padding: 10px 20px;
          width: 200px;
          color: #fff;
          position: relative;

          &::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 3px;
            background-color: white;
            transition: width 0.3s ease, left 0.3s ease;
          }

          &:hover::after {
            width: 100%;
            left: 0;
          }
        }

        &.current-menu-item > a {
          color: #f5f5dc;
        }

        ul {
          display: none;
          position: absolute;
          top: 0;
          left: 100%;
          background-color: #8b4513;

          li {
            a {
              padding: 10px 20px;

              &::after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 0;
                width: 0;
                height: 3px;
                background-color: white;
                transition: width 0.3s ease, left 0.3s ease;
              }

              &:hover::after {
                width: 100%;
                left: 0;
              }
            }

            &.current-menu-item > a {
              color: #f5f5dc;
            }
          }
        }
      }
    }

    &:hover > ul {
      display: block;
    }

    ul li:hover > ul {
      display: block;
    }
  }

  /* Move the underline smoothly when hovering over the items */
  li:hover::after {
    width: 100%;
    left: 0;
  }
}

.site-logo {
  img {
    max-width: 150px;
    height: auto;
  }
}

.menu-item.mini-cart {
  position: relative;
}

.mini-cart-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  width: 250px;
  z-index: 999;
}

.menu-item.mini-cart:hover .mini-cart-content {
  display: block;
}

.cart-icon {
  position: relative;
  display: inline-block;
}

.cart-count {
  background: #cc5500;
  /* Adjust color */
  color: #fff;
  border-radius: 50%;
  padding: 3px 8px;
  font-size: 12px;
  position: absolute;
  top: -8px;
  right: -8px;
}

.woocommerce {
  ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    grid-gap: 2rem;

    &.columns-3 {
      grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

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

    li.product {
      margin: 0;
      display: block;
      float: none;
      width: 100% !important;
      background-color: white;
      text-align: center;
      padding-bottom: 1rem;
      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0);
      transition: linear 200ms;
      .button {
        margin-left: 1rem;
        margin-right: 1rem;
      }
      &:hover {
        box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
      }
    }

    li.product-category {
      margin: 0;
      display: block;
      float: none;
      width: 100% !important;
    }
  }
}

.custom-price-cart {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem 1rem 0;
  flex-wrap: wrap;
  /* Adjust spacing as needed */
  justify-content: space-between;
  .button,
  .product_type_simple {
    margin: 0 !important;
    background-color: #996666 !important;
    border: 2px solid #996666 !important;
    border-radius: 50px !important;
    color: white !important;
    &:hover {
      background-color: white !important;
      color: #996666 !important;
    }
  }
  .added_to_cart {
    flex-grow: 1;
    border-radius: 50px;
    background-color: #ddc4ac !important;
    border: 2px solid #ddc4ac !important;
    border-radius: 50px;
    transition: 200ms linear;
    padding: 0.5rem;
    &:hover {
      background-color: #996666 !important;
      color: #ddc4ac !important;
    }
  }
}

.custom-product-description {
  padding: 0 1rem;
}

.custom-price-cart .price {
  font-size: 1rem;
  /* Adjust price font size */
  margin: 0 !important;
}

.custom-price-cart .button {
  padding: 8px 12px;
  /* Adjust button padding */
  font-size: 0.9rem;
  /* Adjust button font size */
}

.custom-product-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
  /* Adjust font size as needed */
  margin-top: 10px;
  /* Space between the description and the <hr> */
  line-height: 1.4;
  /* Adjust line height for readability */
  color: #555;
  /* Adjust text color as needed */
  min-height: 41px;
}

.wcfmmp_sold_by_container {
  display: none;
}

.items-carousel {
  h4 {
    margin-top: 1rem;
    min-height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
  }

  img {
    border-radius: 1rem;
  }

  .custom-price-cart {
    margin-top: 1rem;
  }
}

.category-item {
  background-color: white;

  .cat-title {
    padding: 1rem 0 1.5rem;
    margin-bottom: 20px;
    min-height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;

    /* Flexbox for vertical centering */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* Optional for smoothness */
    line-height: 1.5;
  }

  .btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: block;
    max-width: 250px;
    background-color: #996666;
    border: 2px solid #996666;
    border-radius: 2rem;
    font-weight: 600;
    color: white;
    max-width: 125px;

    &:hover {
      background-color: white;
      color: #996666;
    }
  }
}

.vendor-item,
.testimonial-item {
  border-radius: 1rem;
  background-color: white;

  h3 {
    text-align: center;
    margin: 0;
    padding: 1rem;
  }

  img {
    border-radius: 1rem 1rem 0 0;
  }

  p {
    padding: 0 1rem 2.5rem;
  }

  .btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: block;
    max-width: 250px;
    background-color: #996666;
    border: 2px solid #996666;
    border-radius: 2rem;
    font-weight: 600;
    color: white;
    max-width: 125px;

    &:hover {
      background-color: white;
      color: #996666;
    }
  }
}

.testimonial-item {
  background-color: #f0e7e0;

  .testimonial-content-area {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }

  p {
    padding: 0;
  }
}

.product_type_simple {
  background-color: #996666;
  color: #f0e7e0;
  border: 2px solid #996666;
  border-radius: 2rem;
  transition: linear 0.25s;

  &:hover {
    color: #996666;
    background-color: #f0e7e0;
  }
}

.woocommerce-Price-amount {
  color: #996666;
  font-weight: 600;
}

.woocommerce-product-gallery {
  display: flex;
  gap: 2rem;

  .flex-viewport {
    flex: 4;
    order: 2;
  }

  ol.flex-control-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto !important;
    scroll-snap-type: y mandatory;
    max-height: 400px;

    li {
      width: 100% !important;
      height: auto;
      scroll-snap-align: start;

      img {
        height: 150px;
        object-fit: contain;
        border: 2px solid transparent;
        /* Optional: Add a border for visual appeal */
        transition: border 0.3s ease;

        &:hover {
          border-color: #f3551c;
          /* Highlight on hover */
        }
      }
    }
  }
}

.custom-product-title {
  padding-bottom: 1rem;
  border-bottom: 5px solid #996666;
  margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding-left: 5px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  border: 2px solid transparent;
  background-color: transparent;
  border-bottom-color: #fff;
  &.active {
    border-color: #ddc4ac;
    border-bottom-color: #fff;
    a {
      color: #996666;
    }
  }
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
  border-bottom: 2px solid #ddc4ac;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::after,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before {
  content: none;
}
.items-carousel {
  img {
    min-height: 300px;
  }
}
/* General styling for the quantity wrapper */
.quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Remove arrows for Chrome, Safari, and Edge */
.quantity input[type="number"]::-webkit-inner-spin-button,
.quantity input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove arrows for Firefox */
.quantity input[type="number"] {
  -moz-appearance: textfield;
  text-align: center; /* Center the number */
}

/* Style the input field */
.quantity input[type="number"] {
  width: 60px;
  height: 40px;
  text-align: center; /* Center the number */
  font-size: 16px;
  border: 2px solid #996666;
  border-radius: 5px;
  background-color: #f9f9f9;
  color: #333;
  padding: 0; /* Remove padding to center the text properly */
  margin: 0;
  box-sizing: border-box;
}

/* Focus state for the input */
.quantity input[type="number"]:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Style the plus and minus buttons */
.quantity .plus,
.quantity .minus {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: #996666;
  border: 2px solid #996666;
  color: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Hover effect for buttons */
.quantity .plus:hover,
.quantity .minus:hover {
  background-color: white;
  color: #996666;
}

/* Active state for buttons */
.quantity .plus:active,
.quantity .minus:active {
  background-color: #004c70;
}

/* Disable buttons when not applicable */
.quantity .plus:disabled,
.quantity .minus:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.single_add_to_cart_button {
  background-color: #996666 !important;
  border: 2px solid #996666 !important;
  min-height: 40px;
  &:hover {
    background-color: white !important;
    color: #996666 !important;
  }
}

/* Style the container around the dropdown */
.woocommerce-ordering {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* Label for the dropdown (if visible) */
.woocommerce-ordering label {
  font-size: 16px;
  color: #333;
  margin-right: 10px;
  font-weight: bold;
}

/* Style the dropdown itself */
.woocommerce-ordering select {
  appearance: none; /* Removes default styling in most browsers */
  -webkit-appearance: none; /* Removes default styling for WebKit browsers */
  -moz-appearance: none; /* Removes default styling for Firefox */
  background-color: #fff;
  border: 2px solid #996666;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Add a custom arrow icon for the dropdown */
.woocommerce-ordering select {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"%3E%3Cpath fill="%230071a1" d="M0 3h10L5 8z"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

/* Hover state */
.woocommerce-ordering select:hover {
  border-color: #005f8d;
}

/* Focus state */
.woocommerce-ordering select:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* For smaller screens */
@media (max-width: 768px) {
  .woocommerce-ordering {
    justify-content: center;
  }

  .woocommerce-ordering select {
    width: 100%;
    font-size: 14px;
    padding: 8px 10px;
  }
}

.woocommerce-loop-product__title {
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 55px;
  padding: 0 1rem !important;
}


/* General Styles for the My Account Page */
.woocommerce-account {
  font-family: Arial, sans-serif;
  color: #333;
  margin: 20px 0;
}

/* Style the navigation tabs */
.woocommerce-account .woocommerce-MyAccount-navigation {
  display: flex;
  flex-wrap: wrap;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 20px;
  padding: 15px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #0071a1;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Icons before the tab names */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
  margin-right: 8px;
  font-size: 18px;
}

/* Home Icon */
.woocommerce-account .woocommerce-MyAccount-navigation ul li:first-child a::before {
  content: "\f015"; /* Font Awesome Home icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Orders Icon */
.woocommerce-account .woocommerce-MyAccount-navigation ul li:nth-child(2) a::before {
  content: "\f02c"; /* Font Awesome Orders icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Downloads Icon */
.woocommerce-account .woocommerce-MyAccount-navigation ul li:nth-child(3) a::before {
  content: "\f019"; /* Font Awesome Downloads icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Addresses Icon */
.woocommerce-account .woocommerce-MyAccount-navigation ul li:nth-child(4) a::before {
  content: "\f015"; /* Font Awesome Address icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Account Details Icon */
.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--edit-account a::before {
  content: "\f007"; /* Font Awesome User icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Add Inquiries Icon */
.woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--inquiry a::before {
  content: "\f0e8"; /* Font Awesome Question icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Hover and Active State Styles */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background-color: #005f8d;
  transform: translateY(-2px);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  background-color: #ff6600;
}

/* Content section */
.woocommerce-account .woocommerce-MyAccount-content {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Headings inside the content */
.woocommerce-account .woocommerce-MyAccount-content h2 {
  font-size: 20px;
  font-weight: bold;
  color: #0071a1;
  margin-bottom: 15px;
}

/* Tables in the content */
.woocommerce-account .woocommerce-MyAccount-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.woocommerce-account .woocommerce-MyAccount-content table th,
.woocommerce-account .woocommerce-MyAccount-content table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.woocommerce-account .woocommerce-MyAccount-content table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* Buttons (e.g., logout or edit account) */
.woocommerce-account .woocommerce-MyAccount-content a.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0071a1;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-content a.button:hover {
  background-color: #005f8d;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation {
      flex-direction: column;
      gap: 5px;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
      font-size: 12px;
      padding: 8px 10px;
  }
}
