/* Loading spinner for location button */
.hero-form-location.loading {
  pointer-events: none;
  opacity: 0.7;
  cursor: not-allowed;
}

.hero-form-location[disabled] {
  pointer-events: none;
  opacity: 0.7;
  cursor: not-allowed;
}

.hero-form-location::before {
    content: '';
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top: 2px solid #ed325c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.hero-form-location.loading::before {
  display: block;
}

.hero-form-location.loading svg {
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* end: Loading spinner */

/* start: Navbar */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.navbar-search {
  display: none;
}

.navbar-search-form-location-current {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 56px;
  cursor: pointer;
  background-color: transparent;
  border: none;
  outline: none;
  width: 20px;
  height: 20px;
  color: var(--gray-500);
}
.navbar-search-form-location {
  width: 100%;
}
.navbar-search-form-location::before {
  display: none;
}
.navbar-search-form-location-input {
  padding-right: 80px;
  background-image: none;
  padding-left: 24px;
}

/* end: Navbar */

/* start: Hero */
.hero-section {
  padding: 50px 0;
  position: relative;
  margin-bottom: 48px;
  background-color: #f7f3f2;
}

.hero-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: 400px;
}

.hero-content {
  padding: 0;
  width: 100%;
}

.hero-title {
  font-size: 32px;
  font-weight: 600;
  color: #ed325c;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-description {
  display: none;
}

.hero-form {
  position: relative;
  max-width: 100%;
  display: block;
}

.hero-form-group {
  position: relative;
  width: 100%;
}

.hero-form-input {
  width: 100%;
  height: 56px;
  padding: 16px 120px 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
}

.hero-form-input:focus {
  border-color: #ed325c;
}

.hero-form-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  height: 40px;
}

.hero-form-location {
  background-color: transparent;
  border: none;
  outline: none;
  width: 40px;
  height: 40px;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.hero-form-location:hover {
  background-color: #f3f4f6;
}

.hero-form-search {
  background-color: #ed325c;
  border: none;
  outline: none;
  width: 80px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.hero-form-search:hover {
  background-color: #dc2626;
}

.hero-image-wrapper {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background-color: #f54b65;
  border-top-left-radius: 999px;
  z-index: 1;
  overflow: hidden;
}

.hero-image {
  width: 110%;
  height: auto;
  z-index: 2;
}

.hero-image.hidden {
  display: none;
}

/* end: Hero */

/* start: Featured */
.featured-section {
  padding: 48px 0;
}

.featured-wrapper {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
}

.featured-item {
  min-width: 0;
  padding: 6px;
  background: #f9f9f9;
  border-radius: 5px;
  height: 272px;
}

.featured-item-wrapper {
  display: flex;
  flex-direction: column-reverse;
  background: #eaeaea;
  border-radius: 5px;
  position: relative;
  border: 5px;
  /* height: 100%; */
  overflow: hidden;
  border: 1px solid #dddddd47;
  border-radius: 8px;
}

.featured-item-header {
  display: flex;
  align-items: center;
  position: absolute;
  margin: 0;
  width: 100%;
  padding: 12px 7px;
  background: #f9f9f9;
}

.featured-item-header-image {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  margin-right: 12px;
}

.featured-item-header-right {
  min-width: 0;
  width: 100%;
}

.featured-item-image {
  display: block;
  margin-bottom: 16px;
  background-color: #f9f9f9;
  padding: 6px;
  box-shadow: var(--shadow);
  border-radius: var(--rounded-12);
  margin: 0;
  padding: 0;
  /* height: 100%; */
}

.featured-item-image-image {
  display: block;
  width: 100%;
  height: 264px;
  object-fit: cover;
  border-radius: var(--rounded-8);
}

.featured-item-title {
  text-decoration: none;
  color: var(--black);
  font-size: 20px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: left;
}

.featured-item-postcode {
  font-size: var(--text-xs);
}

.featured-see-all-btn {
  margin: 52px auto 24px auto;
  display: table;
}

/* end: Featured */

/* start: Benefit */
.benefit-section {
  padding: 32px 0;
  background-color: #f9f9f9;
  overflow: hidden;
}

.benefit-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -16px;
  flex-wrap: wrap;
  margin-right: -16px;
}

.benefit-item {
  display: flex;
  align-items: center;
  background-color: var(--white);
  padding: 4px 24px 4px 4px;
  border: 1px solid var(--gray-50);
  border-radius: var(--rounded-full);
  margin-right: 16px;
  width: calc((100% - (16px * 3)) / 3);
  margin-bottom: 16px;
}

.benefit-item-icon {
  flex-shrink: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--rounded-full);
  background-color: var(--primary-50);
  color: var(--primary-500);
}

.benefit-item-text {
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.3;
}

/* end: Benefit */

/* start: Buy */
.buy-section {
  padding: 48px 0;
}

.buy-box {
  background-color: #f9f9f9;
  border-radius: var(--rounded-12);
  display: flex;
  overflow: hidden;
}

.buy-image {
  max-width: 518px;
  width: 100%;
  flex-shrink: 0;
  margin: 0 auto 0;
  height: auto;
}

.buy-content {
  padding: 48px 96px;
}

.buy-card {
  padding: 12px 20px;
  width: 418px;
  position: relative;
  isolation: isolate;
}

.buy-card::before {
  content: "";
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
}

.buy-card-inner {
  border: 1px solid #e3e9f0;
  padding: 32px 24px;
}

.buy-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
  text-align: center;
}

.buy-description {
  color: #585858;
  margin-bottom: 32px;
  text-align: center;
}

.buy-download {
  display: flex;
  align-items: center;
  justify-content: center;
}

.buy-download-item {
  margin-right: 16px;
}

.buy-download-item:last-child {
  margin-right: 0;
}

.buy-download-item > img {
  width: auto;
  height: 32px;
}

.buy-card-image {
  position: absolute;
  pointer-events: none;
}

.buy-card-image.top {
  z-index: 10;
  bottom: 60%;
  left: 80%;
}

.buy-card-image.bottom {
  z-index: -20;
  top: 30%;
  right: 50%;
}

/* end: Buy */

/* start: Why */
.why-section {
  padding: 48px 0;
  background-color: var(--white);
}

.why-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.why-item {
  padding: 36px 28px;
  border-radius: var(--rounded-16);
  background-color: #f9f9f9;
}

.why-item-icon {
  background-color: var(--white);
  border-radius: var(--rounded-full);
  width: 60px;
  height: 60px;
  border: 1px solid #e3e9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  margin-right: auto;
  margin-left: auto;
}

.why-item-icon > img {
  width: 30px;
  height: 30px;
}

.why-item-title {
  font-size: var(--text-2xl);
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 12px;
}

.why-item-description {
  font-size: 18px;
  color: #585858;
}

/* end: Why */

/* start: Banner */
.banner-section {
  padding: 48px 0;
}

.banner-box {
  padding: 46px 48px;
  background-color: #f9f9f9;
  border-radius: 24px;
}

.banner-title {
  font-size: var(--text-3xl);
}
.banner-content-title {
  font-size: var(--text-2xl);
}
.banner-content-title,
.banner-title {
  line-height: 1.2;
  font-weight: 500;
  margin-bottom: 12px;
}

.banner-description {
  color: #7a7a7a;
  margin-bottom: 32px;
}

.banner-content-description {
  color: #7a7a7a;
  margin-bottom: 20px;
}

.banner-wrapper {
  display: flex;
  align-items: center;
}

.banner-image {
  max-width: 320px;
  width: 100%;
  flex-shrink: 0;
  margin-right: 30px;
}

.banner-content-buttons {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.banner-content-buttons > * {
  margin-right: 12px;
}

.banner-content-buttons img {
  height: 46px;
  display: block;
}

.banner-content-cta {
  border-radius: 8px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  padding: 8px 24px;
  margin-left: 0;
}

.banner-content-cta > :first-child {
  margin-right: 8px;
}

/* end: Banner */

/* start: Browse */
.browse-section {
  padding: 48px 0;
}

.browse-section .section-title {
  margin-bottom: 32px;
}

.search-by-town-input-section {
  width: 535px;
  height: 52px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 10px 20px 10px 50px;
  background: #f7f7f7;
  background-image: url("https://www.mybouquet.co.uk/images/Search.png");
  background-repeat: no-repeat;
  background-position: 16px;
  font-size: 17px;
  margin-bottom: 40px;
}

.search-by-town-input-section:focus {
  outline-style: thin;
  outline-color: #ff1749;
  outline-width: medium;
}

.browse-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
  list-style-type: none;
  margin-top: 32px;
}

.browse-item {
  background: #f9f9f9;
  text-align: center;
  padding: 14px 32px 14px 32px;
  border-radius: 4px;
  display: none;
  align-content: center;
  text-align: left;
}

.browse-item:nth-child(-n + 16) {
  display: block;
}

.browse-item a {
  font-size: 20px;
  font-weight: 500;
  text-align: left;
  color: #4b4b4b;
}

.browse-item-link {
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.browse-item-link:hover .townName {
  text-decoration: underline;
}

.browse-item-see-all-btn {
  margin: 70px auto 80px auto;
  display: table;
}

/* end: Browse */
/* start new header */
.poppins {
  font-family: Poppins;
}
#location-mobile__version {
  display: none;
}
.nav-items__link {
  font-weight: 500;
  font-size: 15px;
  margin-right: 32px;
}

.black {
  color: #1e1515;
}

.text-decoration-none {
  text-decoration: none;
}

.nav-items__one {
  margin-left: 52px;
}

.nav-items__last {
  margin-right: 0px;
}

/* start: Breakpoints */
@media screen and (max-width: 1200px) {
  .buy-box {
    flex-direction: column;
  }

  .buy-image {
    order: 2;
    margin-top: 0;
  }

  .buy-content {
    order: 1;
  }

  .buy-card {
    width: 100%;
  }
}

/* start: Breakpoints */
@media screen and (max-width: 991px) {
  .hero-section {
    padding-bottom: 0;
  }
  .hero-box {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
  }
  .hero-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
  }

  .hero-content {
    padding: 32px 24px;
    order: 1;
  }

  .hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    order: 2;
    border-top-left-radius: 184px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
  }

  .buy-box {
    flex-direction: column;
  }

  .buy-image {
    order: 2;
    margin-top: 0;
  }

  .buy-content {
    order: 1;
  }

  .buy-card {
    width: 100%;
  }

  .banner-content-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .banner-content-buttons > * {
    margin-right: 0;
    margin-bottom: 12px;
  }

  .banner-content-buttons > :last-child {
    margin-bottom: 0;
  }

  .browse-wrapper {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .benefit-item {
    width: calc((100% - (16px * 2)) / 2);
  }

  .why-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .banner-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .banner-image {
    margin-right: 0;
    margin-bottom: 30px;
    order: 1;
  }

  .banner-content {
    order: 2;
  }

  .banner-content-buttons {
    gap: 20px;
  }
  .banner-content-buttons a {
    margin: 0 auto;
  }
}

@media screen and (max-width: 767px) {
  .buy-content {
    padding: 48px;
  }
  .hero-section {
    padding: 50px 0 0;
  }

  .hero-content {
    padding: 0;
  }

  .hero-form-location {
    width: 36px;
    height: 36px;
  }

  .hero-image-wrapper {
    height: 250px;
    margin-top: 40px;
  }

  /* New style based on zarab instructions */
  .search-by-town-input-section {
    width: 100%;
  }
  .more-product__section .container {
    margin-top: 20px;
  }
  .more-product__section .section-title {
    display: block;
    width: 100%;
    text-align: center;
  }
  .buttons-wrapper {
    top: 85px;
  }
  .featured-section .section-title {
    width: 100%;
    text-align: center;
  }
  .sub-title {
    color: #000000;
    font-size: 26px;
    font-weight: 600;
  }
  .why-item-title,
  .why-item-description {
    text-align: center;
  }
  #location-mobile__version {
    display: block;
    margin-right: auto;
  }
  #location-desktop__version {
    display: none;
  }
  .navbar-search-form {
    flex-direction: column;
  }

  .why-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .why-item {
    padding: 24px 20px;
  }

  .banner-box {
    padding: 32px 24px;
  }

  .banner-wrapper {
    flex-direction: column;
  }

  .banner-image {
    max-width: 250px;
    margin: 0 auto 24px auto;
  }

  .browse-wrapper {
    grid-template-columns: 2fr;
  }
}

@media screen and (max-width: 575px) {
  .hero-image-wrapper {
    margin-left: -16px;
    width: calc(100% + 16px);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  .featured-wrapper {
    grid-template-columns: 1fr;
  }

  .featured-item {
    /* height: 350px; */
  }

  .featured-item-image-image {
    height: 334px;
  }

  .buy-content {
    padding: 32px 24px;
  }

  .browse-wrapper {
    grid-template-columns: 1fr;
  }

  .benefit-item {
    width: 100%;
  }

  .buy-download {
    flex-wrap: wrap;
  }

  .why-item {
    padding: 20px 16px;
  }

  .banner-box {
    padding: 24px 16px;
  }

  .banner-image {
    max-width: 200px;
  }
}

@media screen and (max-width: 403px) {
  .buy-download-item {
    margin-right: 0;
  }
}

/* end: Breakpoints */

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 
 */
.product-card {
  display: flex;
  flex-direction: column-reverse;
  background: #eaeaea;
  border-radius: 5px;
  position: relative;
  border: 5px;
  overflow: hidden;
}
.product-title {
  text-decoration: none;
  color: var(--black);
  font-size: var(--text-lg);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
  overflow: hidden;
}
.product-price {
  font-size: var(--text-xs);
  text-decoration: none;
}
#more-products__section .section-title {
  margin-bottom: 40px;
}
.swiper-button-next.swiper-button-lock,
.swiper-button-prev.swiper-button-lock {
  display: flex !important;
}
.more-product__section .swiper-button-prev,
.more-product__section .swiper-button-next {
  color: black;
  background: white;
  border: 1px solid #7a7a7a30;
  width: 30px;
  height: 30px;
  font-weight: bold;
  border-radius: 50%;
  /* top: 14px; */
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 12px !important;
}

.buttons-wrapper {
  top: 44px;
  display: flex;
  width: 110px;
  height: -10%;
  margin-left: auto;
  position: absolute;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title {
  width: 71%;
}
.more-product__section .container {
  position: relative;
}
.listing-item-title {
  text-decoration: none;
  color: var(--black);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.3;
  margin-bottom: 8px;
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-item-shop {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.listing-item-shop-image {
  flex-shrink: 0;
  margin-right: 14px;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--rounded-full);
}
.listing-item-shop-body {
  min-width: 0; /* 🧠 Important for ellipsis inside flex containers */
  flex: 1;
  margin-right: auto;
}
.listing-item-shop-title {
  text-decoration: none;
  color: var(--black);
  font-weight: 600;
  margin-bottom: 2px;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: left;
  max-width: 100%; /* ✅ Allow text to shrink with screen */
}
.listing-item-shop-postcode {
  font-size: var(--text-xs);
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%; /* ✅ Prevent overflow */
  text-overflow: ellipsis;
}
.listing-item-bottom-with-price {
  display: grid;
  gap: 20px;
}
.listing-item-shop-price {
  flex-shrink: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-500);
  text-align: left;
}
.listing-item-bottom {
  display: flex;
  align-items: center;
}
.listing-item-body {
  padding: 16px;
}
.more-product__item {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  padding: 20px;
  background: white;
}
.listing-item-bottom-with-price {
  width: 100%;
}
.listing-item-bottom {
  width: 100%;
}
.listing-item-favourite {
  margin-left: 10px;
}
.listing-item-favourite {
  background-color: transparent;
  cursor: pointer;
  border: none;
  outline: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #46555d;
}
.featured-item-image-image {
  display: block;
  width: 100%;
  height: 264px;
  object-fit: cover;
  border-radius: var(--rounded-8);
  border-bottom-right-radius: 0px;
  border-bottom-left-radius: 0px;
}
.see-more__bouquets {
  background-color: transparent;
  border: 1px solid #ed325c;
  color: #ed325c;
}
.see-more__bouquets:hover {
  background-color: #ed325c;
  color: white;
}
.listing-item-favourite.favourited {
  color: #ed325c;
}
.listing-item-shop-title,
.listing-item-shop-postcode {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  text-align: left;
}
.swiper {
  height: fit-content;
}
/* .more-product__item {
  overflow: hidden;
  word-wrap: break-word;
} */
.wrapper-item__top {
  max-width: 100%;
}
.price-views-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-views {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: #666;
  margin: 0;
}

.product-views svg {
  flex-shrink: 0;
}
#browse-towns-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .swiper-button-prev,
  .swiper-button-next {
    top: 50%;
    transform: translateY(-50%);
  }
  .buttons-wrapper {
    position: unset;
    display: unset;
    width: unset;
    height: unset;
  }
  .browse-section .section-title {
    text-align: center;
    width: 100%;
  }
  .browse-wrapper {
    /* Ensure proper spacing on mobile */
    gap: 0.5rem;
  }

  /* added more */
  .banner-content-title,
  .banner-title {
    text-align: center;
    margin-bottom: 35px;
  }
  .banner-description {
    text-align: center;
  }

  .banner-content-title {
    margin-top: 20px;
  }
  .banner-wrapper {
    text-align: center;
  }

  .banner-content-buttons {
    display: flex;
    margin-top: 42px;
  }
}
.alert-wrapper {
  border: 1px solid #8080802b;
  width: 100%;
  border-radius: 8px;
  padding: 14px;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  color: #000000;
  font-family: "Poppins";
  font-size: 12px;
  position: absolute;
  top: 47px;
  left: 1px;
  z-index: 1000000000000000000000000000000000000000;
  background: white;
  display: flex;
  justify-content: start;
  align-items: center;
  /* display: none; */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease-in-out;
}
.alert-wrapper__icon {
  padding: 2px;
  border: 2px solid #ed325c;
  border-radius: 50%;
  margin-right: 10px;
}
.alert-wrapper.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
