/**
 * Lula/Stitch Complete Fix - All Visual Issues
 * Fixes: Search, Logo, Footer, Icons
 */

/* =============================================================================
   CRITICAL: OpenCart Search Component Styling
   ========================================================================== */

.stitch-search #search {
  position: relative;
  width: 100%;
}

.stitch-search #search .input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(232, 224, 216, 0.3);
  border-radius: 100px;
  background: rgba(255, 248, 243, 0.6);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 0 !important;
  box-shadow: 0 1px 4px rgba(107, 102, 97, 0.03), 0 0 0 1px rgba(232, 224, 216, 0.1);
}

.stitch-search #search .input-group:focus-within {
  border-color: rgba(76, 99, 88, 0.2);
  box-shadow: 0 2px 8px rgba(76, 99, 88, 0.06), 0 0 0 3px rgba(212, 228, 220, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.stitch-search #search .form-control,
.stitch-search #search input[type="text"] {
  width: 100%;
  padding: 12px 48px 12px 20px !important;
  border: none !important;
  background: transparent !important;
  color: #3a3632 !important;
  font-size: 14px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  box-shadow: none !important;
}

.stitch-search #search .form-control:focus {
  outline: none !important;
  box-shadow: none !important;
}

.stitch-search #search .btn {
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: none !important;
  background: rgba(76, 99, 88, 0.06) !important;
  color: rgba(76, 99, 88, 0.7) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  font-size: 14px !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.stitch-search #search .btn:hover {
  background: rgba(76, 99, 88, 0.12) !important;
  color: #4c6358 !important;
  transform: translateY(-50%) !important;
  box-shadow: 0 1px 3px rgba(76, 99, 88, 0.1) !important;
}

.stitch-search #search .btn i {
  font-size: 14px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* =============================================================================
   CRITICAL: Logo Visibility Fix
   ========================================================================== */

.stitch-logo {
  display: flex !important;
  align-items: center !important;
}

.stitch-logo a {
  display: block !important;
  line-height: 0 !important;
}

.stitch-logo-img {
  display: block !important;
  height: 48px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* =============================================================================
   CRITICAL: Header Icons Fix
   ========================================================================== */

.stitch-icon-link svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
}

.stitch-icon-link {
  position: relative !important;
}

.stitch-cart-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  background: #7c554c !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
  min-width: 18px !important;
  text-align: center !important;
  display: block !important;
}

/* =============================================================================
   CRITICAL: Footer - Stitch/Lula Warm Design
   ========================================================================== */

footer,
.lula-footer {
  background: #fff8f3 !important;
  color: #3a3632 !important;
  border-top: 1px solid #e8e0d8 !important;
  padding: 32px 0 0 0 !important;
  margin-top: 48px !important;
}

.lula-footer-content {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 32px !important;
  margin-bottom: 24px !important;
}

.lula-footer-column {
  display: flex !important;
  flex-direction: column !important;
}

.lula-footer-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #3a3632 !important;
  margin: 0 0 14px 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.lula-footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.lula-footer-links li {
  margin-bottom: 8px !important;
  list-style: none !important;
}

.lula-footer-links li:last-child {
  margin-bottom: 0 !important;
}

.lula-footer-links a {
  color: #6b6661 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  transition: color 0.2s ease !important;
  display: inline-block !important;
}

.lula-footer-links a:hover {
  color: #4c6358 !important;
  text-decoration: none !important;
  transform: translateX(2px) !important;
}

/* About Lula section */
.lula-footer-about {
  grid-column: span 1 !important;
}

.lula-footer-text {
  color: #6b6661 !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  margin: 0 0 20px 0 !important;
  font-weight: 500 !important;
}

.lula-footer-contact {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.lula-footer-contact p {
  color: #6b6661 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.lula-footer-contact i {
  color: #4c6358 !important;
  font-size: 14px !important;
  width: 18px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.lula-footer-contact a {
  color: #6b6661 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  font-weight: 500 !important;
}

.lula-footer-contact a:hover {
  color: #4c6358 !important;
}

/* Footer Bottom */
.lula-footer-bottom {
  border-top: 1px solid #e8e0d8 !important;
  padding: 16px 0 !important;
  margin-top: 24px !important;
  background: #fff8f3 !important;
}

.lula-footer-bottom-content {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}

.lula-footer-copyright,
.lula-footer-powered {
  color: #a8a199 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.lula-footer-powered a {
  color: #6b6661 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  font-weight: 600 !important;
}

.lula-footer-powered a:hover {
  color: #4c6358 !important;
}

/* Hide/replace OpenCart branding */
.lula-footer-powered {
  display: none !important;
}

.lula-footer-copyright::after {
  content: ' Lulata. All rights reserved.' !important;
}

/* Remove "Your Store" text from copyright */
footer p:contains("Your Store") {
  display: none !important;
}

/* Hide broken footer icons */
.lula-footer-contact i,
.lula-footer-contact i.fa-square,
.lula-footer-contact i[class*="fa-"] {
  display: none !important;
}

/* Hide About Lula column */
.lula-footer-about {
  display: none !important;
}

/* Simplify copyright - hide duplicates */
.lula-footer-copyright::after {
  content: '' !important;
}

.lula-footer-bottom-content p:last-child {
  display: none !important;
}

/* =============================================================================
   FOOTER RESPONSIVE
   ========================================================================== */

@media (min-width: 992px) {
  .lula-footer-content {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 32px !important;
  }

  .lula-footer-about {
    grid-column: span 1 !important;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .lula-footer-content {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
  }

  .lula-footer-title {
    margin-bottom: 18px !important;
    font-size: 14px !important;
  }

  .lula-footer-links li {
    margin-bottom: 10px !important;
  }
}

@media (max-width: 767px) {
  .lula-footer-content {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }

  .lula-footer {
    padding: 48px 0 0 0 !important;
    margin-top: 48px !important;
  }

  .lula-footer-bottom-content {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }

  .lula-footer-bottom {
    padding: 20px 0 !important;
  }
}

@media (max-width: 575px) {
  .lula-footer-content {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center !important;
  }

  .lula-footer {
    padding: 40px 0 0 0 !important;
    margin-top: 40px !important;
  }

  .lula-footer-title {
    margin-bottom: 16px !important;
  }

  .lula-footer-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .lula-footer-links li {
    margin-bottom: 10px !important;
  }

  .lula-footer-text {
    text-align: center !important;
  }

  .lula-footer-contact p {
    justify-content: center !important;
  }
}

/* =============================================================================
   HERO FIX - Add Right Visual
   ========================================================================== */

.lula-hero-card {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 48px !important;
  align-items: center !important;
}

.lula-hero-image {
  min-height: 300px !important;
  background: linear-gradient(135deg, #d4e4dc 0%, #e8f2ed 100%) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

.lula-hero-image::before {
  content: '' !important;
  position: absolute !important;
  top: 20% !important;
  right: -10% !important;
  width: 300px !important;
  height: 300px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
}

.lula-hero-image::after {
  content: '' !important;
  position: absolute !important;
  bottom: 10% !important;
  left: -5% !important;
  width: 200px !important;
  height: 200px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
}

/* =============================================================================
   MOBILE FIXES
   ========================================================================== */

@media (max-width: 991px) {
  .lula-hero-card {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .lula-hero-image {
    min-height: 200px !important;
    order: -1 !important;
  }

  .stitch-logo-img {
    height: 45px !important;
  }

  .stitch-search #search .form-control {
    padding: 10px 40px 10px 16px !important;
    font-size: 13px !important;
  }

  .stitch-search #search .btn {
    width: 32px !important;
    height: 32px !important;
  }
}

@media (max-width: 767px) {
  .lula-hero-image {
    min-height: 150px !important;
  }
}

/* =============================================================================
   HEADER COMPACT
   ========================================================================== */

.stitch-header-content {
  padding: 12px 0 !important;
  gap: 24px !important;
}

.stitch-nav {
  padding: 10px 0 12px 0 !important;
}
/* =============================================================================
   MOBILE HEADER FIX - Compact Layout
   ========================================================================== */

@media (max-width: 767px) {
  /* Mobile header: logo left, icons right, NO search bar */
  .stitch-header-content {
    grid-template-columns: auto 1fr;
    padding: 12px 15px;
    gap: 12px;
  }

  /* Hide search on mobile to prevent overflow */
  .stitch-search {
    display: none !important;
  }

  /* Logo - smaller but visible */
  .stitch-logo-img {
    height: 36px !important;
  }

  /* Actions align to right */
  .stitch-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
  }

  /* Compact icons */
  .stitch-icon-link {
    width: 36px;
    height: 36px;
  }

  /* Compact language dropdown */
  .stitch-lang-toggle {
    padding: 5px 10px;
    gap: 4px;
  }

  .stitch-lang-toggle svg:first-child {
    width: 16px;
    height: 16px;
  }

  .stitch-lang-current {
    font-size: 12px;
  }

  /* Nav scrollable */
  .stitch-nav {
    gap: 16px;
    padding: 10px 0 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .stitch-nav::-webkit-scrollbar {
    display: none;
  }

  .stitch-nav-link {
    font-size: 13px;
    white-space: nowrap;
  }
}

@media (max-width: 575px) {
  .stitch-header-content {
    padding: 10px 15px;
  }

  .stitch-logo-img {
    height: 38px !important;
  }

  .stitch-actions {
    gap: 4px;
  }

  .stitch-icon-link {
    width: 34px;
    height: 34px;
  }

  .stitch-cart-badge {
    font-size: 10px;
    padding: 1px 5px;
  }
}
