/* eMotion Addons Frontend Styles */

.emotion-search-form {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: visible; /* Changed from hidden to allow search results dropdown to be visible */
}

.emotion-search-has-cats.position-right {
  flex-direction: row-reverse;
}

/* Category Select */
.emotion-search-cat-select {
  border: none;
  background: transparent;
  padding: 0 15px;
  cursor: pointer;
  outline: none;
  height: 100%;
  min-height: 40px;
}

/* Unified Layout Tweaks */
.emotion-search-has-cats .emotion-search-cat-select {
  border-right: 1px solid #ddd;
}

.emotion-search-has-cats.position-right .emotion-search-cat-select {
  border-right: none;
  border-left: 1px solid #ddd;
}

.emotion-search-input-wrap {
  flex: 1;
  position: relative;
}

.emotion-search-has-cats .emotion-search-input {
  border: none;
  background: transparent;
  outline: none;
}

.emotion-search-input {
  width: 100%;
  min-height: 40px;
}

/* If NO categories, reset input styles to what they were or let Elementor styles apply */
.emotion-search-form:not(.emotion-search-has-cats) {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.emotion-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 9999;
  max-height: 550px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: none;
}

.emotion-search-results ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.emotion-search-item {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid #eee;
  transition: background 0.3s;
}

.emotion-search-item:hover {
  background: #f9f9f9;
}

.emotion-search-thumb {
  width: 50px;
  height: 50px;
  margin-right: 15px;
}

.emotion-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emotion-search-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.emotion-search-title {
  font-weight: bold;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.emotion-search-price {
  color: #605be5;
  font-size: 0.9em;
}

.emotion-no-results {
  padding: 20px;
  text-align: center;
  color: #777;
}

.emotion-view-all-wrap {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #eee;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 10;
}

.emotion-view-all-results {
  display: inline-block;
  padding: 8px 16px;
  background: #605be5;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s;
}

.emotion-view-all-results:hover {
  background: #4a45c7;
  color: #fff;
}

/* WooCommerce Modules Shared Styles */
.emotion-woo-module-wrap {
  padding: 20px;
  background: #fff;
}

.emotion-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.emotion-section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.emotion-section-link {
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.emotion-section-link:hover {
  color: #da1a32; /* Red hover color */
}

/* Grid Layout */
.emotion-woo-grid {
  display: grid;
}

/* Product Item Premium Style */
.emotion-product-item {
  position: relative;
  background: #fff;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  height: 100%;
}

.emotion-product-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.emotion-product-image {
  position: relative;
  margin-bottom: 15px;
  overflow: hidden;
}

.emotion-product-image img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s;
  vertical-align: middle;
}

.emotion-product-item:hover .emotion-product-image img {
  transform: scale(1.05);
}

.emotion-sale-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #da1a32;
	color: #fff;
	padding: 5px 10px;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 50%;
	z-index: 2;
	width: 60px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 19px !important;
}

.emotion-product-content {
  padding: 0 5px;
}

.emotion-product-title {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
}

.swiper-wrapper {
  display: flex;
}

.emotion-product-price {
  font-size: 15px;
  font-weight: 700;
  color: #da1a32;
}

.emotion-product-price del {
  color: #999;
  font-weight: 400;
  margin-right: 5px;
  font-size: 13px;
}

.emotion-product-price ins {
  text-decoration: none;
}

.emotion-product-description {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 10px;
}

.emotion-product-reviews {
  margin-bottom: 10px;
}

.emotion-product-reviews .star-rating {
  font-size: 14px;
  width: 5.4em;
  height: 1em;
  line-height: 1;
  font-family: star;
}

.emotion-product-reviews .star-rating::before {
  content: "sssss";
  opacity: 0.25;
}

.emotion-product-reviews .star-rating span {
  display: block;
  top: 0;
  left: 0;
  padding-top: 1.5em;
  overflow: hidden;
  position: absolute;
}

.emotion-product-reviews .star-rating span::before {
  content: "SSSSS";
  top: 0;
  left: 0;
  position: absolute;
}

/* Swiper Tuning */
.emotion-carousel-swiper {
  position: relative;
  padding-bottom: 40px; /* Space for pagination */
  overflow: hidden;
}

.swiper {
  overflow: hidden !important;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.swiper-wrapper {
  display: flex;
  transition-property: transform;
  box-sizing: content-box;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%; /* Fallback */
  height: auto;
  position: relative;
  transition-property: transform;
}

.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  top: 50%;
  width: 44px; /* Explicit clickable size */
  height: 44px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: #333;
  margin-top: 0;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 99 !important; /* Ensure on top */
  cursor: pointer;
}

.swiper-button-prev {
  left: 10px;
  right: auto;
}

.swiper-button-next {
  right: 10px;
  left: auto;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  display: none; /* Hide default Swiper icons */
}

.swiper-button-next svg,
.swiper-button-prev svg {
  width: 20px;
  height: 20px; /* Default SVG size */
  transition: all 0.3s ease;
}

.swiper-button-next i,
.swiper-button-prev i {
  font-size: 20px; /* Default font icon size */
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: #da1a32;
}

/* Category Product Grid Styles */
.emotion-category-product-grid-wrapper {
  width: 100%;
}

.emotion-category-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.emotion-grid-item {
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.emotion-grid-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.emotion-grid-item:hover {
  transform: translateY(-5px);
}

.emotion-item-image {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.emotion-item-image img {
  width: 100%;
  height: auto;
  transition: transform 0.3s;
  vertical-align: middle;
}

.emotion-grid-item:hover .emotion-item-image img {
  transform: scale(1.05);
}

.emotion-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-align: left;
  transition: color 0.3s;
}

.emotion-view-all-link {
  display: inline-block;
  color: #0066cc;
  text-decoration: underline;
  transition: color 0.3s;
}

.emotion-view-all-link:hover {
  color: #0052a3;
}

.emotion-view-all-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.emotion-view-all-button:hover {
  background-color: #0052a3;
  color: #fff;
}

/* Sale Badge for Category Product Grid */
.emotion-item-image {
  position: relative;
}

.emotion-sale-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: #ed1c24;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  z-index: 2;
  line-height: 1;
  display: inline-block;
}

/* Slider Styles */
.emotion-slider-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.emotion-slider-swiper,
.emotion-slider-wrapper .swiper {
  position: relative;
  overflow: hidden !important;
  width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

.emotion-slider-swiper .swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  box-sizing: content-box;
}

.emotion-slider-swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fallback: Show first slide if Swiper not initialized */
.emotion-slider-swiper:not(.swiper-initialized) .swiper-slide {
  display: none;
}

.emotion-slider-swiper:not(.swiper-initialized) .swiper-slide:first-child {
  display: flex;
}

.emotion-slider-swiper .swiper-slide img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  width: 100%;
  object-fit: cover;
}

.emotion-slider-swiper .swiper-slide a {
  display: block;
  width: 100%;
  text-align: center;
}

.emotion-slider-swiper .swiper-slide a img {
  display: inline-block;
}

/* Slider Navigation - reuse existing carousel styles */
.emotion-slider-swiper .swiper-button-next,
.emotion-slider-swiper .swiper-button-prev {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: #333;
  margin-top: 0;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 99 !important;
  cursor: pointer;
}

.emotion-slider-swiper .swiper-button-prev {
  left: 10px;
  right: auto;
}

.emotion-slider-swiper .swiper-button-next {
  right: 10px;
  left: auto;
}

.emotion-slider-swiper .swiper-button-next:after,
.emotion-slider-swiper .swiper-button-prev:after {
  display: none;
}

.emotion-slider-swiper .swiper-button-next svg,
.emotion-slider-swiper .swiper-button-prev svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.emotion-slider-swiper .swiper-button-next i,
.emotion-slider-swiper .swiper-button-prev i {
  font-size: 20px;
  transition: all 0.3s ease;
}

.emotion-slider-swiper .swiper-pagination {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.emotion-slider-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: #333;
  opacity: 0.5;
  margin: 0 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.emotion-slider-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: #da1a32;
}

/* Fix for Elementor invisible class conflict */
.elementor-widget-emotion-slider.elementor-invisible .emotion-slider-wrapper,
.elementor-widget-emotion-slider.elementor-invisible .emotion-slider-swiper {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure Swiper slides are properly contained */
.emotion-slider-swiper.swiper-initialized .swiper-wrapper {
  overflow: visible;
}

.emotion-slider-swiper.swiper-initialized .swiper-slide {
  width: 100% !important;
}

/* Custom Header Shortcodes Styles */
#emotionNavShop {
  position: relative;
  display: inline-block;
}

.emotionNavShopTrigger {
  cursor: pointer;
  display: block;
  padding: 5px 10px;
}

.emotionNavShopTitle {
  color: #fff;
  font-size: 14px;
}

/* Category Drawer Styles */
.emotion-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 350px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.emotion-drawer-open {
  transform: translateX(0);
}

.emotion-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.emotion-overlay-open {
  opacity: 1;
  visibility: visible;
}

.emotion-drawer-header {
  padding: 20px;
  background: #232f3e;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #37475a;
}

.emotion-drawer-greeting {
  font-size: 16px;
  font-weight: 500;
}

.emotion-drawer-greeting a {
  color: #fff;
  text-decoration: underline;
}

.emotion-drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emotion-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.emotion-category-list {
  padding: 0;
  list-style: none;
}

.emotion-category-item {
  border-bottom: 1px solid #eee;
}

.emotion-category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.emotion-category-link:hover {
  background: #f5f5f5;
}

.emotion-category-name {
  font-size: 15px;
  font-weight: 400;
}

.emotion-category-arrow {
  color: #999;
  font-size: 12px;
}

.emotion-category-arrow i {
  font-size: 12px;
}

.emotion-back-link {
  display: block;
  padding: 8px 20px;
  color: #666;
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
  font-size: 13px;
}

.emotion-back-link i {
  font-size: 12px;
  margin-right: 6px;
}

.emotion-back-link:hover {
  background: transparent;
  color: #333;
}

.emotion-account-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.emotion-nav-dropdown {
  position: relative;
}

.emotion-nav-dropdown-link {
  color: #333;
  text-decoration: none;
  cursor: pointer;
  display: block;
  padding: 5px 10px;
}

.emotion-nav-link {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 5px 10px;
}

.emotion-nav-link:hover {
  text-decoration: underline;
}

.emotionNavDropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 4px;
  min-width: 180px;
  display: none;
  z-index: 1000;
  padding: 8px 0;
}

.emotion-nav-dropdown:hover .emotionNavDropdown {
  display: block;
}

.emotionNavDropdown a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.emotionNavDropdown a:hover {
  background: #f5f5f5;
}
