/*
Theme Name: iHome Store
Theme URI: https://example.com/ihome-store
Author: Your Name
Author URI: https://example.com
Description: A premium WooCommerce theme converted from a React application.
Version: 1.0.0
Text Domain: ihome
*/

/* Global Variables from React App */
:root {
  --primary: #263cda;
  --secondary: #e11d48;
  --accent: #0d9488;
  --bg-main: #fcfdfe;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-main);
  color: #334155;
  overflow-x: hidden;
  font-size: 0.95rem;
}

.glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.rtl-flip {
  transform: scaleX(-1);
}

/* Animations */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

.animate-marquee {
  display: flex;
  width: fit-content;
  animation: marquee 60s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.bg-animated {
  background: linear-gradient(-45deg, #263cda, #f43f5e, #0ea5e9, #8b5cf6);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.card-glow:hover {
  box-shadow: 0 15px 30px -5px rgba(38, 60, 218, 0.15);
  border-color: rgba(38, 60, 218, 0.3);
}

/* Global brand overrides */
.text-indigo-600 {
  color: #263cda !important;
}

.bg-indigo-600 {
  background-color: #263cda !important;
}

.border-indigo-600 {
  border-color: #263cda !important;
}

.hover\:bg-indigo-700:hover {
  background-color: #1e31b3 !important;
}

.from-indigo-600 {
  --tw-gradient-from: #263cda !important;
}

/* WordPress Alignment Classes */
.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 1.5em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
}

/* ---------------------------------------------------------
   WooCommerce Component Overrides
--------------------------------------------------------- */

/* Buttons (Add to Cart, Checkout, Etc) */
.woocommerce button.button,
.woocommerce .button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
  background-color: var(--primary) !important;
  color: white !important;
  border-radius: 0.75rem !important;
  /* rounded-xl */
  padding: 0.875rem 2rem !important;
  font-weight: 900 !important;
  font-size: 0.875rem !important;
  transition: all 0.3s ease !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 15px -3px rgba(38, 60, 218, 0.2) !important;
}

.woocommerce button.button:hover,
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce input.button.alt:hover {
  background-color: #1e31b3 !important;
  /* darker indigo */
  transform: translateY(-2px) !important;
}

.woocommerce button.button.disabled,
.woocommerce button.button:disabled {
  background-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Quantity Input */
.woocommerce .quantity .qty {
  border-radius: 0.75rem !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.5rem !important;
  text-align: center !important;
  font-weight: bold !important;
  width: 4rem !important;
  height: 3rem !important;
  margin: 0 0.5rem !important;
}

/* Forms & Inputs */
.woocommerce-form-row input.input-text,
.woocommerce-form-row textarea {
  padding: 0.875rem 1.25rem !important;
  background-color: #f8fafc !important;
  /* bg-slate-50 */
  border: 1px solid #f1f5f9 !important;
  /* border-slate-100 */
  border-radius: 0.75rem !important;
  /* rounded-xl */
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 0.875rem !important;
  outline: none !important;
  transition: all 0.2s !important;
}

.woocommerce-form-row input.input-text:focus,
.woocommerce-form-row textarea:focus {
  background-color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(38, 60, 218, 0.1) !important;
}

/* Notices / Alerts */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top: none !important;
  border-radius: 1rem !important;
  padding: 1rem 1.5rem !important;
  margin-bottom: 2rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  font-weight: bold !important;
  font-size: 0.875rem !important;
}

.woocommerce-message {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  border-right: 4px solid #10b981 !important;
}

.woocommerce-info {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border-right: 4px solid #3b82f6 !important;
}

.woocommerce-error {
  background-color: #fff1f2 !important;
  color: #be123c !important;
  border-right: 4px solid #f43f5e !important;
}

/* Single Product Specifics */
.single-product div.product form.cart {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-bottom: 2rem !important;
  flex-wrap: wrap !important;
}

.single-product div.product form.cart .button {
  flex-grow: 1 !important;
  height: 3rem !important;
}

/* Tabs */
.woocommerce-tabs ul.tabs {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 0 !important;
  margin: 0 0 2rem 0 !important;
  list-style: none !important;
  display: flex !important;
  gap: 2rem !important;
  overflow-x: auto !important;
}

.woocommerce-tabs ul.tabs li {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
  padding: 0 0 0.75rem 0 !important;
  color: #94a3b8 !important;
  font-weight: 900 !important;
  font-size: 0.75rem !important;
  /* text-xs */
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  display: block !important;
  position: relative !important;
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--primary) !important;
}

.woocommerce-tabs ul.tabs li.active a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 9999px;
}

/* Custom Cart/Checkout Layout Fixes */
.woocommerce-cart-form__contents {
  width: 100%;
}

/* Remove default WC borders if conflicting */
.woocommerce table.shop_table {
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 1rem !important;
}


/* ---------------------------------------------------------
   Navigation Sub-Menus (Dropdowns)
--------------------------------------------------------- */
.menu-item {
  position: relative;
}

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 260px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 1rem;
  z-index: 50;
  list-style: none;
  margin: 0.5rem 0 0 0;
  border: 1px solid #f1f5f9;
}

.sub-menu li {
  margin-bottom: 0.5rem;
}

.sub-menu li:last-child {
  margin-bottom: 0;
}

.sub-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #334155;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.sub-menu a:hover {
  background-color: #f8fafc;
  color: var(--primary);
  transform: translateX(-5px);
  /* Move left on hover for RTL feel */
}

/* Visibility State (toggled by JS) */
.sub-menu.is-active {
  display: block;
  animation: fadeInUp 0.2s ease-out forwards;
}

/* Indicator for parents */
.menu-item-has-children>a::after {
  content: '▾';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s;
}

.menu-item-has-children.menu-active>a::after {
  transform: rotate(180deg);
}

/* For nested sub-menus if any (optional) */
.sub-menu .sub-menu {
  top: 0;
  right: 100%;
  margin-top: 0;
}