/* ==========================================================================
   CAFEIV DARK LUXURY WOOCOMMERCE & INTERACTIVE CART STYLES
   ========================================================================== */

.woocommerce-Price-amount,
.woocommerce-Price-amount bdi,
.woocommerce-Price-currencySymbol,
.woocommerce .amount,
.cafeiv-cart-item .item-price-qty,
.cafeiv-cart-badge-count,
#cafeivCartSubtotalVal,
.drawer-subtotal-row {
  font-family: var(--font-num, 'Vazirmatn', Tahoma, sans-serif) !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   1. Floating Mini-Cart Trigger Button
   -------------------------------------------------------------------------- */
.cafeiv-floating-cart-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 10, 13, 0.90);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.75), 0 0 20px rgba(212, 175, 55, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 6px 18px 6px 14px;
  height: 44px;
  box-sizing: border-box;
  border-radius: 9999px;
  color: #F5E8D7;
  cursor: pointer;
  direction: rtl;
  font-family: var(--font-fa, 'IRANSans', 'Vazirmatn', sans-serif);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  user-select: none;
}

.cafeiv-floating-cart-trigger:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.75);
  box-shadow: 0 14px 40px -5px rgba(0, 0, 0, 0.85), 0 0 28px rgba(212, 175, 55, 0.25);
  background: rgba(14, 14, 18, 0.96);
}

.cart-icon-wrap {
  position: relative;
  color: #D4AF37;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.cart-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cafeiv-cart-badge-count {
  position: absolute;
  bottom: -4px;
  left: -6px;
  right: auto;
  top: auto;
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%);
  color: #070708;
  font-size: 9.5px;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  line-height: 13px;
  border-radius: 9999px;
  border: 1.5px solid #0A0A0D;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65), 0 0 8px rgba(212, 175, 55, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  pointer-events: none;
  z-index: 2;
  font-family: var(--font-num, 'Vazirmatn', Tahoma, sans-serif) !important;
  font-variant-numeric: tabular-nums;
}

.cafeiv-cart-badge-count.has-items {
  animation: cafeivCartPulse 2.4s infinite ease-in-out;
}

@keyframes cafeivCartPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65), 0 0 8px rgba(212, 175, 55, 0.35);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.85), 0 0 12px rgba(212, 175, 55, 0.8);
  }
}

.cart-trigger-label {
  font-size: 13px;
  font-weight: 700;
  color: #F5E8D7;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   2. Sliding Luxury Cart Drawer
   -------------------------------------------------------------------------- */
.cafeiv-cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cafeiv-cart-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cafeiv-cart-drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 420px;
  max-width: 90vw;
  background: #0D0D10;
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  direction: rtl;
  transform: translateX(-100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99996;
}

.cafeiv-cart-drawer-backdrop.open .cafeiv-cart-drawer-panel {
  transform: translateX(0);
}

.cafeiv-drawer-header {
  padding: 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-header-brand .brand-icon {
  font-size: 24px;
}

.drawer-title {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 800;
  color: #F5E8D7;
}

.drawer-sub {
  font-size: 11px;
  color: #D4AF37;
  letter-spacing: 0.05em;
  font-family: 'Cinzel', serif, sans-serif;
}

.drawer-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #857D74;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.drawer-close-btn:hover {
  border-color: #D4AF37;
  color: #F5E8D7;
  transform: rotate(90deg);
}

/* Cart Items Body */
.cafeiv-cart-items-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.cafeiv-cart-items-body::-webkit-scrollbar {
  width: 5px;
}

.cafeiv-cart-items-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.cafeiv-cart-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cafeiv-cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.cafeiv-cart-item .item-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
  flex-shrink: 0;
  background: #131317;
}

.cafeiv-cart-item .item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cafeiv-cart-item .item-info {
  flex: 1;
}

.cafeiv-cart-item .item-title {
  margin: 0 0 4px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #F5E8D7;
  line-height: 1.4;
}

.cafeiv-cart-item .item-price-qty {
  font-size: 12.5px;
  color: #D4AF37;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.cafeiv-cart-item .item-qty {
  color: #857D74;
}

.cafeiv-cart-item .btn-remove-item {
  background: transparent;
  border: none;
  color: #857D74;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.cafeiv-cart-item .btn-remove-item:hover {
  color: #ff6b6b;
  transform: scale(1.2);
}

/* Empty Cart State */
.cafeiv-cart-empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #857D74;
}

.cafeiv-cart-empty-state .empty-icon {
  font-size: 44px;
  margin-bottom: 14px;
  color: #D4AF37;
  opacity: 0.8;
}

.cafeiv-cart-empty-state .empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #F5E8D7;
  margin: 0 0 8px 0;
}

.cafeiv-cart-empty-state .empty-desc {
  font-size: 12.5px;
  line-height: 1.7;
  margin: 0 0 20px 0;
}

.btn-cafeiv-cart-explore {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #D4AF37;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-cafeiv-cart-explore:hover {
  background: #D4AF37;
  color: #070708;
}

/* Drawer Footer */
.cafeiv-drawer-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  background: #09090C;
}

.drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.drawer-subtotal-row .subtotal-label {
  font-size: 13.5px;
  color: #857D74;
}

.drawer-subtotal-row .cafeiv-cart-subtotal-val {
  font-size: 16px;
  font-weight: 800;
  color: #D4AF37;
}

.drawer-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-drawer-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #D4AF37, #C5A059);
  color: #070708 !important;
  font-size: 14px;
  font-weight: 800;
  padding: 13px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
}

.btn-drawer-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-drawer-view-cart {
  display: block;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBBCA9 !important;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-drawer-view-cart:hover {
  border-color: #D4AF37;
  color: #F5E8D7 !important;
  background: rgba(212, 175, 55, 0.08);
}

/* --------------------------------------------------------------------------
   3. Product Quick-View Modal Quantity & Add to Cart Controls
   -------------------------------------------------------------------------- */
.modal-add-to-cart-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.modal-qty-control {
  display: flex;
  align-items: center;
  background: #131317;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  overflow: hidden;
  height: 44px;
}

.modal-qty-control .btn-qty {
  background: transparent;
  border: none;
  color: #D4AF37;
  width: 36px;
  height: 100%;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-qty-control .btn-qty:hover {
  background: rgba(212, 175, 55, 0.15);
}

.modal-qty-control .input-qty {
  width: 44px;
  height: 100%;
  background: transparent;
  border: none;
  color: #F5E8D7;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.modal-qty-control .input-qty::-webkit-outer-spin-button,
.modal-qty-control .input-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-modal-add-to-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #D4AF37, #C5A059);
  color: #070708;
  border: none;
  height: 44px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-modal-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-modal-add-to-cart.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-modal-add-to-cart.loading .btn-text {
  visibility: hidden;
}

.btn-modal-add-to-cart.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #070708;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cafeivSpin 0.7s linear infinite;
}

@keyframes cafeivSpin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   4. Editorial Page Hero Banner & 3-Step Checkout Flow Indicator
   -------------------------------------------------------------------------- */
.cafeiv-standard-page-main {
  padding-top: 0;
  min-height: 80vh;
  color: #F5E8D7;
  direction: rtl;
  font-family: var(--font-fa, 'IRANSans', 'Vazirmatn', sans-serif);
}

.cafeiv-page-hero-banner {
  position: relative;
  padding: 130px 0 45px 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08) 0%, rgba(10, 10, 13, 0.98) 70%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  overflow: hidden;
  text-align: center;
}

.cafeiv-page-hero-banner::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cafeiv-page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cafeiv-page-hero-content .text-eyebrow-fa {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.cafeiv-page-hero-content .heading-section-fa {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: #F5E8D7;
  margin: 0 0 12px 0;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.cafeiv-page-hero-content .section-lead-fa {
  font-size: clamp(13.5px, 1.8vw, 15px);
  color: #CBBCA9;
  line-height: 1.7;
  margin: 0 auto 28px auto;
  max-width: 620px;
}

/* 3-Step Checkout Flow Indicator */
.cafeiv-checkout-steps-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 14, 19, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 9999px;
  padding: 8px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  margin-top: 10px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8C827A;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.flow-step .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #181820;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #8C827A;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-num, 'Vazirmatn', sans-serif);
}

.flow-step.is-active {
  color: #F5E8D7;
}

.flow-step.is-active .step-num {
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%);
  color: #070708;
  border-color: #D4AF37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.flow-step.is-completed {
  color: #D4AF37;
}

.flow-step.is-completed .step-num {
  background: rgba(212, 175, 55, 0.18);
  color: #D4AF37;
  border-color: #D4AF37;
}

.flow-step-line {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
}

.flow-step-line.is-passed {
  background: #D4AF37;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.cafeiv-page-body-section {
  padding: 45px 0 85px 0;
  background: #08080A;
}

.cafeiv-page-article-box {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   5. WooCommerce Global Dark Luxury Component Styles
   -------------------------------------------------------------------------- */
.woocommerce-page .site-main,
.woocommerce .site-main {
  color: #F5E8D7;
}

.woocommerce-page .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* WooCommerce Notices */
.woocommerce-notices-wrapper {
  margin-bottom: 25px;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  background: #0E0E14 !important;
  color: #F5E8D7 !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-right: 4px solid #D4AF37 !important;
  border-radius: 10px !important;
  padding: 16px 22px !important;
  margin-bottom: 22px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55) !important;
  direction: rtl !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.woocommerce-message {
  border-right-color: #52a77a !important;
  background: linear-gradient(90deg, #0E0E14 0%, rgba(82, 167, 122, 0.08) 100%) !important;
}

.woocommerce-error {
  border-right-color: #e05252 !important;
  background: linear-gradient(90deg, #0E0E14 0%, rgba(224, 82, 82, 0.08) 100%) !important;
  list-style: none !important;
}

.woocommerce-error li {
  margin: 4px 0 !important;
}

.woocommerce-info {
  border-right-color: #D4AF37 !important;
  background: linear-gradient(90deg, #0E0E14 0%, rgba(212, 175, 55, 0.08) 100%) !important;
}

.woocommerce-message .button,
.woocommerce-info .button {
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #070708 !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  padding: 8px 18px !important;
  border: none !important;
  font-size: 13px !important;
  transition: all 0.25s ease !important;
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4) !important;
}

/* --------------------------------------------------------------------------
   6. WooCommerce Cart Page Styling
   -------------------------------------------------------------------------- */
.woocommerce-cart .woocommerce {
  direction: rtl;
}

/* Cart Table */
.woocommerce-cart table.shop_table.cart {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  border-radius: 12px !important;
  background: #0D0D12 !important;
  overflow: hidden !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 35px !important;
}

.woocommerce-cart table.shop_table.cart thead th {
  background: #14141B !important;
  color: #D4AF37 !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  text-align: right !important;
  letter-spacing: 0.02em !important;
}

.woocommerce-cart table.shop_table.cart tbody td {
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #F5E8D7 !important;
  vertical-align: middle !important;
}

.woocommerce-cart table.shop_table.cart tbody tr:hover td {
  background: rgba(212, 175, 55, 0.02) !important;
}

.woocommerce-cart table.shop_table.cart tbody tr:last-child td {
  border-bottom: none !important;
}

/* Cart Item: Remove Button */
.woocommerce-cart table.shop_table.cart .product-remove a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #CBBCA9 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-remove a.remove:hover {
  background: #e05252 !important;
  color: #FFFFFF !important;
  border-color: #e05252 !important;
  box-shadow: 0 0 10px rgba(224, 82, 82, 0.5) !important;
  transform: scale(1.1) !important;
}

/* Cart Item: Thumbnail */
.woocommerce-cart table.shop_table.cart .product-thumbnail img {
  width: 68px !important;
  height: 68px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  background: #15151B !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.3s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-thumbnail img:hover {
  transform: scale(1.06) !important;
  border-color: #D4AF37 !important;
}

/* Cart Item: Title & Details */
.woocommerce-cart table.shop_table.cart .product-name a {
  color: #F5E8D7 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-decoration: none !important;
  transition: color 0.25s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-name a:hover {
  color: #D4AF37 !important;
}

.woocommerce-cart table.shop_table.cart .product-price {
  color: #CBBCA9 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.woocommerce-cart table.shop_table.cart .product-subtotal {
  color: #D4AF37 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

/* Cart Item: Quantity Input */
.woocommerce-cart .quantity {
  display: inline-flex !important;
  align-items: center !important;
  background: #14141B !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: 8px !important;
  padding: 2px 4px !important;
}

.woocommerce-cart .quantity input.qty {
  width: 50px !important;
  height: 34px !important;
  background: transparent !important;
  border: none !important;
  color: #F5E8D7 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  text-align: center !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-family: var(--font-num, 'Vazirmatn', sans-serif) !important;
}

/* Cart Actions Row (Coupon + Update Cart) */
.woocommerce-cart table.shop_table.cart td.actions {
  padding: 20px 24px !important;
  background: #111117 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.15) !important;
}

.woocommerce-cart .actions .coupon {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  float: right !important;
}

.woocommerce-cart .actions .coupon input#coupon_code {
  background: #171720 !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: #F5E8D7 !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  min-width: 170px !important;
  height: 42px !important;
  box-sizing: border-box !important;
}

.woocommerce-cart .actions .coupon input#coupon_code:focus {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 1px #D4AF37, 0 0 15px rgba(212, 175, 55, 0.25) !important;
}

.woocommerce-cart .actions .coupon .button {
  background: rgba(212, 175, 55, 0.12) !important;
  color: #D4AF37 !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  height: 42px !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
}

.woocommerce-cart .actions .coupon .button:hover {
  background: #D4AF37 !important;
  color: #070708 !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35) !important;
}

.woocommerce-cart .actions button[name="update_cart"] {
  background: #181822 !important;
  color: #F5E8D7 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  border-radius: 8px !important;
  height: 42px !important;
  box-sizing: border-box !important;
  float: left !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
}

.woocommerce-cart .actions button[name="update_cart"]:hover {
  border-color: #D4AF37 !important;
  color: #D4AF37 !important;
  background: #20202C !important;
}

/* Cart Collaterals & Totals */
.cart-collaterals {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.cart-collaterals .cart_totals {
  width: 100% !important;
  max-width: 480px !important;
  background: linear-gradient(180deg, #121218 0%, #0B0B0E 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-radius: 14px !important;
  padding: 28px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6) !important;
  box-sizing: border-box !important;
}

.cart_totals h2 {
  color: #D4AF37 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  margin: 0 0 18px 0 !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  text-align: right !important;
}

.cart_totals table.shop_table {
  width: 100% !important;
  border: none !important;
  background: transparent !important;
  margin-bottom: 24px !important;
}

.cart_totals table.shop_table th {
  background: transparent !important;
  color: #CBBCA9 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  text-align: right !important;
  width: 40% !important;
}

.cart_totals table.shop_table td {
  background: transparent !important;
  color: #F5E8D7 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  text-align: left !important;
}

.cart_totals table.shop_table tr.order-total th {
  color: #F5E8D7 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-bottom: none !important;
  padding-top: 16px !important;
}

.cart_totals table.shop_table tr.order-total td {
  color: #D4AF37 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-bottom: none !important;
  padding-top: 16px !important;
}

/* Proceed to Checkout Button */
.wc-proceed-to-checkout a.checkout-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 52px !important;
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #070708 !important;
  font-weight: 900 !important;
  font-size: 15.5px !important;
  border-radius: 10px !important;
  border: none !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.wc-proceed-to-checkout a.checkout-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.55) !important;
}

/* Empty Cart State */
.cart-empty-wrapper,
.woocommerce-cart .cart-empty {
  text-align: center;
  padding: 55px 25px;
  background: #0E0E14;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  max-width: 540px;
  margin: 20px auto;
}

.woocommerce-cart .return-to-shop {
  text-align: center;
  margin-top: 20px;
}

.woocommerce-cart .return-to-shop a.button {
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #070708 !important;
  font-weight: 800 !important;
  padding: 12px 28px !important;
  border-radius: 10px !important;
  font-size: 14.5px !important;
  display: inline-block !important;
}

/* --------------------------------------------------------------------------
   7. WooCommerce Checkout Page Styling (2-Column Grid)
   -------------------------------------------------------------------------- */
.woocommerce-checkout .woocommerce {
  direction: rtl;
}

/* Login & Coupon Notice Toggles */
.woocommerce-form-login-toggle,
.woocommerce-form-coupon-toggle {
  margin-bottom: 20px;
}

.woocommerce-form-login-toggle .woocommerce-info,
.woocommerce-form-coupon-toggle .woocommerce-info {
  background: #101016 !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 10px !important;
  padding: 14px 20px !important;
  font-size: 13.5px !important;
}

.woocommerce-form-login-toggle a.showlogin,
.woocommerce-form-coupon-toggle a.showcoupon {
  color: #D4AF37 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  margin-right: 6px !important;
}

form.woocommerce-form-login,
form.checkout_coupon {
  background: #111118 !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: 12px !important;
  padding: 22px !important;
  margin-bottom: 25px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Checkout 2-Column Split Layout */
form.checkout.woocommerce-checkout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

/* Column 1: Customer Details Box */
#customer_details {
  background: #0D0D12;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

#customer_details h3 {
  color: #D4AF37;
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 22px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 0;
}

.woocommerce-checkout p.form-row {
  width: 100% !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.woocommerce-checkout p.form-row-first {
  width: 48% !important;
  float: right !important;
}

.woocommerce-checkout p.form-row-last {
  width: 48% !important;
  float: left !important;
}

.woocommerce-checkout p.form-row-wide {
  width: 100% !important;
  clear: both !important;
}

.woocommerce-checkout label {
  display: block !important;
  color: #F5E8D7 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.woocommerce-checkout label .required {
  color: #D4AF37 !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  margin-right: 4px !important;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
  width: 100% !important;
  background: #14141B !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  color: #F5E8D7 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
  font-family: inherit !important;
}

.woocommerce-checkout textarea {
  min-height: 90px !important;
  resize: vertical !important;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 1px #D4AF37, 0 0 18px rgba(212, 175, 55, 0.25) !important;
  outline: none !important;
}

/* Column 2: Sticky Order Review & Payment */
.woocommerce-checkout-review-order {
  position: sticky;
  top: 110px;
}

#order_review {
  background: linear-gradient(180deg, #121218 0%, #0B0B0E 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: 14px !important;
  padding: 28px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65) !important;
}

#order_review_heading {
  color: #D4AF37 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  margin: 0 0 18px 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  text-align: right !important;
}

/* Order Review Table */
table.woocommerce-checkout-review-order-table {
  width: 100% !important;
  border: none !important;
  background: transparent !important;
  border-collapse: collapse !important;
  margin-bottom: 22px !important;
}

table.woocommerce-checkout-review-order-table th {
  background: #15151D !important;
  color: #D4AF37 !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  text-align: right !important;
}

table.woocommerce-checkout-review-order-table td {
  padding: 14px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #F5E8D7 !important;
  font-size: 14px !important;
}

table.woocommerce-checkout-review-order-table .product-name strong.product-quantity {
  color: #D4AF37 !important;
  font-weight: 800 !important;
  margin: 0 4px !important;
}

table.woocommerce-checkout-review-order-table .product-total,
table.woocommerce-checkout-review-order-table tr.cart-subtotal td,
table.woocommerce-checkout-review-order-table tr.order-total td {
  text-align: left !important;
  font-weight: 800 !important;
  color: #D4AF37 !important;
}

table.woocommerce-checkout-review-order-table tr.order-total th {
  background: transparent !important;
  color: #F5E8D7 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.25) !important;
  padding-top: 16px !important;
}

table.woocommerce-checkout-review-order-table tr.order-total td {
  font-size: 20px !important;
  font-weight: 900 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.25) !important;
  padding-top: 16px !important;
}

/* Payment Box */
#payment {
  background: #0A0A0E !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  border-radius: 10px !important;
  margin-top: 20px !important;
  overflow: hidden !important;
}

#payment ul.payment_methods {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
}

#payment ul.payment_methods li.wc_payment_method {
  padding: 16px 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  line-height: 1.5 !important;
}

#payment ul.payment_methods li.wc_payment_method:last-child {
  border-bottom: none !important;
}

#payment ul.payment_methods li label {
  color: #F5E8D7 !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

#payment ul.payment_methods li input[type="radio"] {
  accent-color: #D4AF37 !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 0 0 8px !important;
  cursor: pointer !important;
}

#payment div.payment_box {
  background: #14141B !important;
  color: #CBBCA9 !important;
  border: 1px solid rgba(212, 175, 55, 0.2) !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  margin: 12px 0 6px 0 !important;
}

#payment div.payment_box::before {
  border-bottom-color: #14141B !important;
}

#payment div.form-row.place-order {
  padding: 20px !important;
  margin: 0 !important;
  background: #08080A !important;
}

.woocommerce-privacy-policy-text {
  font-size: 12.5px !important;
  color: #8C827A !important;
  margin-bottom: 14px !important;
  line-height: 1.5 !important;
}

.woocommerce-terms-and-conditions-checkbox-text {
  font-size: 13px !important;
  color: #CBBCA9 !important;
}

/* Place Order Button */
#payment button#place_order {
  width: 100% !important;
  height: 54px !important;
  background: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #070708 !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-top: 10px !important;
}

#payment button#place_order:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 34px rgba(212, 175, 55, 0.6) !important;
}

/* --------------------------------------------------------------------------
   8. WooCommerce Order Received (Thank You) Page
   -------------------------------------------------------------------------- */
.woocommerce-order-received .woocommerce {
  direction: rtl;
}

.woocommerce-thankyou-order-received {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #52a77a !important;
  background: rgba(82, 167, 122, 0.1) !important;
  border: 1px solid rgba(82, 167, 122, 0.35) !important;
  border-radius: 12px !important;
  padding: 18px 24px !important;
  margin-bottom: 30px !important;
  text-align: center !important;
}

ul.woocommerce-order-overview {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 16px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 35px 0 !important;
}

ul.woocommerce-order-overview li {
  background: #0E0E14 !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 10px !important;
  padding: 18px !important;
  text-align: center !important;
  color: #8C827A !important;
  font-size: 13px !important;
}

ul.woocommerce-order-overview li strong {
  display: block !important;
  color: #D4AF37 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  margin-top: 6px !important;
}

.woocommerce-order-details,
.woocommerce-customer-details {
  background: #0D0D12 !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 14px !important;
  padding: 28px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.woocommerce-order-details h2,
.woocommerce-customer-details h2 {
  color: #D4AF37 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  margin: 0 0 18px 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* --------------------------------------------------------------------------
   9. Mobile Responsive Rules for WooCommerce Pages
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .cafeiv-page-hero-banner {
    padding: 110px 0 35px 0;
  }

  form.checkout.woocommerce-checkout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .woocommerce-checkout-review-order {
    position: static;
  }

  .cart-collaterals {
    justify-content: stretch;
  }

  .cart-collaterals .cart_totals {
    max-width: 100% !important;
  }

  .cafeiv-floating-cart-trigger {
    bottom: 20px;
    right: 20px;
    left: auto;
  }
}

@media (max-width: 768px) {
  .cafeiv-page-hero-banner {
    padding: 95px 0 25px 0;
  }

  .cafeiv-checkout-steps-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
  }

  .flow-step-line {
    width: 16px;
  }

  .flow-step {
    font-size: 11.5px;
  }

  .woocommerce-checkout p.form-row-first,
  .woocommerce-checkout p.form-row-last {
    width: 100% !important;
    float: none !important;
  }

  #customer_details,
  #order_review,
  .woocommerce-order-details,
  .woocommerce-customer-details {
    padding: 18px !important;
  }

  .woocommerce-cart table.shop_table.cart thead {
    display: none !important;
  }

  .woocommerce-cart table.shop_table.cart tbody tr {
    display: block !important;
    padding: 16px !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  }

  .woocommerce-cart table.shop_table.cart tbody td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: none !important;
    padding: 8px 0 !important;
  }

  .woocommerce-cart table.shop_table.cart tbody td::before {
    content: attr(data-title);
    font-weight: 700;
    color: #8C827A;
    font-size: 13px;
  }

  .woocommerce-cart table.shop_table.cart tbody td.product-remove::before,
  .woocommerce-cart table.shop_table.cart tbody td.product-thumbnail::before {
    display: none !important;
  }

  .woocommerce-cart table.shop_table.cart td.actions {
    display: block !important;
  }

  .woocommerce-cart .actions .coupon {
    display: flex !important;
    width: 100% !important;
    float: none !important;
    margin-bottom: 12px !important;
  }

  .woocommerce-cart .actions .coupon input#coupon_code {
    width: 100% !important;
    min-width: 0 !important;
  }

  .woocommerce-cart .actions button[name="update_cart"] {
    width: 100% !important;
    float: none !important;
  }

  .cafeiv-floating-cart-trigger {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    left: auto !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(13, 13, 17, 0.94) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 15px rgba(212, 175, 55, 0.15) !important;
    z-index: 99985 !important;
    box-sizing: border-box !important;
  }

  .cart-icon-wrap {
    position: relative !important;
    color: #D4AF37 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
  }

  .cart-icon-wrap svg {
    width: 22px !important;
    height: 22px !important;
  }

  .cafeiv-cart-badge-count {
    position: absolute !important;
    bottom: -4px !important;
    left: -6px !important;
    top: auto !important;
    right: auto !important;
    min-width: 16px !important;
    height: 16px !important;
    line-height: 13px !important;
    padding: 0 3px !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
    border: 1.5px solid #0A0A0D !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), 0 0 8px rgba(212, 175, 55, 0.4) !important;
  }

  .cart-trigger-label {
    display: none !important;
  }

  .cafeiv-cart-drawer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .modal-add-to-cart-section {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-qty-control {
    justify-content: center;
  }
}

@media (max-width: 440px) {
  .cafeiv-floating-cart-trigger {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    left: auto !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
  }
}
