/* ==========================================================================
   Naemi Factory (نعيمي فاكتوري) - Interactive & Gateway Styles
   Works alongside woodmart-bundle.css (exact original theme & Elementor CSS)
   ========================================================================== */

/* Ensure woodmart-font and eicons load cleanly from local assets */
@font-face {
  font-weight: normal;
  font-style: normal;
  font-family: "woodmart-font";
  src: url("../assets/fonts/woodmart-font-1-400.woff2") format("woff2");
  font-display: block;
}

@font-face {
  font-family: "eicons";
  src: url("../assets/fonts/eicons.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* Smooth scrolling & base RTL fixes */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  padding-bottom: 75px; /* Space for fixed bottom cart bar */
}

/* Hero Slider (Swiper local implementation matching Elementor image-carousel) */
.elementor-image-carousel-wrapper.swiper {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  direction: ltr;
}

.elementor-image-carousel.swiper-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.elementor-image-carousel .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
}

.elementor-image-carousel .swiper-slide-inner {
  margin: 0;
}

.elementor-image-carousel .swiper-slide-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
}

.elementor-swiper-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transition: background 0.2s ease;
  user-select: none;
}

.elementor-swiper-button:hover {
  background: rgba(0, 0, 0, 0.45);
}

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

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

/* Horizontal Product Carousels (Best Sellers & Related Products) */
.wd-carousel-container .wd-carousel-inner {
  position: relative;
}

.wd-carousel-container .wd-carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.wd-carousel-container .wd-carousel::-webkit-scrollbar {
  display: none;
}

.wd-carousel-container .wd-carousel-wrap {
  display: flex;
  flex-wrap: nowrap;
}

.wd-carousel-container .wd-carousel-item {
  flex: 0 0 50%;
  max-width: 50%;
  padding-inline: calc(var(--wd-gap-sm, 10px) / 2);
  scroll-snap-align: start;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .wd-carousel-container .wd-carousel-item {
    flex: 0 0 25%;
    max-width: 25%;
    padding-inline: calc(var(--wd-gap-lg, 30px) / 2);
  }
}

/* Mobile 1-column vs 2-column switcher support */
.products.wd-products.elements-grid.mobile-col-1 > .wd-product {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Quick View Popup Overlay (Magnific Popup Woodmart style) */
.wd-qv-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wd-qv-backdrop.wd-opened {
  display: flex;
  opacity: 1;
}

.wd-qv-modal-container {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  background: #fff;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.wd-qv-close-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.wd-qv-close-btn:before {
  content: "\f112";
  font-family: "woodmart-font";
}

/* PhotoSwipe-style Fullscreen Image Lightbox */
.wd-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99995;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.wd-lightbox-backdrop.wd-opened {
  display: flex;
}

.wd-lightbox-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #fff;
  z-index: 5;
}

.wd-lightbox-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-lightbox-close:before {
  content: "\f112";
  font-family: "woodmart-font";
}

.wd-lightbox-img {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.25s ease;
}

.wd-lightbox-img.zoomed {
  transform: scale(1.65);
  cursor: zoom-out;
}

/* Off-canvas Category Filter Sidebar Drawer */
.wd-filter-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  background: #fff;
  z-index: 99985;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
}

.wd-filter-sidebar.wd-opened {
  transform: translate3d(0, 0, 0);
}

.wd-filter-sidebar .wd-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 16px;
  color: #242424;
}

.wd-filter-sidebar-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.wd-filter-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wd-filter-cat-list li {
  margin-bottom: 10px;
}

.wd-filter-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.wd-filter-cat-list li a:hover,
.wd-filter-cat-list li a.active {
  background: #f5eff2;
  color: #6a1f46;
  font-weight: 700;
}

.wd-filter-cat-count {
  background: #f2f2f2;
  color: #666;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
}

/* Live Search Results Dropdown inside Mobile Nav & Fullscreen Search */
.wd-search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  max-height: 360px;
  overflow-y: auto;
}

.wd-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: #333;
  transition: background 0.15s;
}

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

.wd-search-result-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.wd-search-result-info {
  flex: 1;
  text-align: right;
}

.wd-search-result-title {
  font-size: 13px;
  font-weight: 700;
  color: #242424;
  margin-bottom: 4px;
  display: block;
}

.wd-search-result-price {
  font-size: 13px;
  color: #6a1f46;
  font-weight: 700;
}

/* ==========================================================================
   WooCommerce Checkout Order Type Icons & Label State (Matches live /checkout)
   ========================================================================== */
label[for="billing_billing_type2_التوصيل"]:before,
label[for="billing_billing_type2_الاستلام"]:before {
  font-weight: 900 !important;
}

#billing_billing_type2_field label.is-checked {
  color: #000 !important;
  border: 1px solid #000 !important;
}

#billing_state_field abbr {
  display: none !important;
}

/* ==========================================================================
   Tap Checkout Page (https://checkout.tap.company/?mode=page)
   100% Exact Visual Replica of States 1, 2, and 3
   ========================================================================== */
.tap-modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 98% 58%, #63717b 0%, #444e56 32%, #282b30 66%, #1c1d20 100%);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  direction: ltr;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tap-modal-overlay.wd-opened {
  display: flex;
}

.tap-page-card {
  width: 380px;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #1f1d1a;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
  color: #ffffff;
  direction: ltr;
  text-align: left;
}

.tap-card-top {
  background: #000000;
  padding: 0 18px;
}

.tap-merchant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.tap-merchant-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tap-merchant-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #111;
}

.tap-merchant-texts {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tap-payment-for {
  font-size: 9.5px;
  font-weight: 400;
  color: #8e8e93;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.25;
}

.tap-merchant-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.3;
}

.tap-close-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1c1c1e;
  border: none;
  color: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tap-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid #161618;
}

.tap-price-display {
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.tap-items-pill {
  background: #1a1918;
  border: 1px solid #262523;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 9.5px;
  font-weight: 400;
  color: #a8a6a1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.tap-card-body {
  background: #1f1d1a;
  padding: 18px 18px 20px;
}

.tap-label-caption {
  font-size: 9.5px;
  font-weight: 400;
  color: #a5a29d;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.tap-select-section {
  margin-bottom: 16px;
}

.tap-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tap-alt-method-btn {
  background: #000000;
  border: 1px solid transparent;
  border-radius: 8px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tap-gpay-pill {
  background: #ffffff;
  border-radius: 14px;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tap-applepay-pill {
  background: #ffffff;
  border-radius: 4px;
  height: 21px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tap-black-single-bar {
  background: #000000;
  border-radius: 8px;
  height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tap-s1-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.tap-s1-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 12.5px !important;
  width: 100%;
  padding: 0 !important;
  height: auto !important;
  box-shadow: none !important;
}

.tap-s1-input::placeholder {
  color: #9e9d99;
}

.tap-s1-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.tap-s1-exp {
  width: 48px !important;
  text-align: center;
}

.tap-s1-cvv {
  width: 34px !important;
  text-align: right;
}

.tap-we-accept-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.tap-we-accept-text {
  font-size: 8.5px;
  color: #9c9994;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tap-btn-pay-disabled {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: #2e2c29;
  color: #787570;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.tap-black-double-box {
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.tap-double-row {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.tap-double-row-top {
  border-bottom: 1px solid #191919;
}

.tap-visa-num-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 125px;
}

.tap-filled-input,
.tap-filled-exp,
.tap-filled-cvv,
.tap-filled-holder {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: inherit;
  padding: 0 !important;
  height: auto !important;
  box-shadow: none !important;
}

.tap-filled-input {
  font-size: 12.5px !important;
  width: 100%;
}

.tap-filled-exp {
  width: 55px !important;
  text-align: center;
  font-size: 12.5px !important;
}

.tap-filled-cvv-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tap-filled-cvv {
  width: 36px !important;
  text-align: center;
  font-size: 14px !important;
  letter-spacing: 1.5px;
}

.tap-filled-holder {
  font-size: 11.5px !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 100%;
}

.tap-row-clear-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.tap-btn-pay-visa {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.tap-state3-loader-wrap {
  display: none;
  justify-content: center;
  align-items: center;
  height: 46px;
}

.tap-white-loader-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tap-page-card[data-state="1"] .tap-card-input-state1 {
  display: block;
}
.tap-page-card[data-state="1"] .tap-card-input-state2 {
  display: none;
}

.tap-page-card[data-state="2"] .tap-card-input-state1 {
  display: none;
}
.tap-page-card[data-state="2"] .tap-card-input-state2 {
  display: block;
}

.tap-page-card[data-state="3"] .tap-amount-row,
.tap-page-card[data-state="3"] .tap-select-section,
.tap-page-card[data-state="3"] .tap-card-input-state1,
.tap-page-card[data-state="3"] .tap-btn-pay-visa {
  display: none;
}
.tap-page-card[data-state="3"] .tap-card-input-state2 {
  display: block;
}
.tap-page-card[data-state="3"] .tap-double-row {
  filter: blur(4.5px);
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}
.tap-page-card[data-state="3"] .tap-state3-loader-wrap {
  display: flex;
}

.tap-card-footer {
  background: #252528;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.tap-powered-text {
  font-size: 10.5px;
  color: #b5b5ba;
}

.tap-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}
