/* ====================================================== */
/* IMPORTS DE COMPONENTE                                  */
/* ====================================================== */
@import url('components/carousel.css');
@import url('components/product-card.css');
@import url('components/categories.css');
@import url('components/product.css');
@import url('components/owners.css');

/* ====================================================== */
/* GLOBAL COLOR PALETTE & VARIABLES (CONTROL CENTRAL)     */
/* ====================================================== */
:root {
  /* Suprafețe și Fundaluri */
  --th-bg-header: #ffffff;
  --th-bg-preheader: #f8fafc;
  --th-border: #e2e8f0;
  --th-input-bg: #f1f5f9;
  --th-input-bg-focus: #ffffff;

  /* Paleta de Culori Principale & Acțiuni */
  --th-primary: #2563eb;
  --th-primary-hover: #1d4ed8;
  --th-accent: #0284c7;
  --th-danger: #ef4444;
  --th-danger-hover: #dc2626;

  /* Tipografie & Text */
  --th-text-dark: #0f172a;
  --th-text-muted: #64748b;
  --th-text-light: #ffffff;

  /* Dimensiuni și Butoane (Global Sizing) */
  --th-btn-padding-y: 0.5rem;
  --th-btn-padding-x: 1rem;
  --th-btn-radius: 0.375rem;
  --th-input-radius: 0.375rem;
}

  /* Culori Specifice Elementelor */
  --th-rating-star: #f59e0b;

/* ====================================================== */
/* GLOBAL MOBILE HORIZONTAL SCROLL FIX & RESET            */
/* ====================================================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

*, *:before, *:after {
  box-sizing: inherit;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Absolute background scroll lock for mobile & desktop drawers */
html.offcanvas-open,
body.offcanvas-open {
  overflow: hidden !important;
  height: 100% !important;
  position: relative !important;
}

/* ====================================================== */
/* HEADER & PREHEADER SURFACES                            */
/* ====================================================== */
.site-header {
  background-color: var(--th-bg-header) !important;
  color: var(--th-text-dark);
  border-bottom: 1px solid var(--th-border);
}

.site-preheader {
  background-color: var(--th-bg-preheader);
  border-bottom: 1px solid var(--th-border) !important;
}

.preheader-link {
  color: var(--th-text-muted) !important;
  transition: color 0.2s ease;
}

.preheader-link:hover {
  color: var(--th-primary) !important;
}

.social-links .social-icon {
  color: var(--th-text-muted);
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.social-links .social-icon:hover {
  color: var(--th-primary);
  transform: translateY(-1px);
}

.brand-accent {
  color: var(--th-primary) !important;
}

/* ====================================================== */
/* CATEGORY DROPDOWNS & SUBMENUS                          */
/* ====================================================== */
.site-header .dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid var(--th-border) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.site-header .dropdown-item {
  color: var(--th-text-dark) !important;
  padding: 8px 16px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-header .dropdown-item:hover {
  background-color: var(--th-primary) !important;
  color: var(--th-text-light) !important;
}

.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
  display: none; 
  position: absolute; 
  top: 0; 
  left: 100%; 
  z-index: 1000; 
  min-width: 220px;
}

@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu { display: block; }
}

.submenu-toggle {
  color: var(--th-text-muted) !important;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.dropdown-item:hover .submenu-toggle {
  color: var(--th-text-light) !important;
}

/* ====================================================== */
/* CUSTOM SEARCH BUTTON & SUGGESTIONS                     */
/* ====================================================== */
.search-wrapper { position: relative; }

#searchSuggestions {
  position: absolute; 
  top: calc(100% + 4px); 
  left: 0; 
  right: 0; 
  background: #ffffff; 
  color: var(--th-text-dark);
  border: 1px solid var(--th-border); 
  border-radius: 0 0 8px 8px; 
  z-index: 9999; 
  max-height: 280px; 
  overflow-y: auto; 
  display: none; 
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#searchSuggestions div { 
  padding: 10px 14px; 
  cursor: pointer; 
  border-bottom: 1px solid #f1f5f9; 
}

#searchSuggestions div:hover { 
  background: #f8fafc; 
  color: var(--th-primary); 
}

#searchInput, #searchInputMobile {
  background-color: var(--th-input-bg);
  border: 1px solid var(--th-border);
  color: var(--th-text-dark);
  border-radius: var(--th-input-radius);
}

#searchInput:focus, #searchInputMobile:focus {
  background-color: var(--th-input-bg-focus);
  border-color: var(--th-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-search-custom {
  background-color: var(--th-primary) !important;
  border: none !important;
  color: var(--th-text-light) !important;
  padding: var(--th-btn-padding-y) var(--th-btn-padding-x);
  border-radius: var(--th-btn-radius);
  transition: background-color 0.2s ease;
}

.btn-search-custom:hover {
  background-color: var(--th-primary-hover) !important;
}

.btn-search-custom i {
  color: var(--th-text-light) !important;
}

.action-badge {
  background-color: var(--th-danger) !important;
  color: var(--th-text-light) !important;
  font-size: 0.75rem;
  padding: 0.2em 0.5em;
  border-radius: 10rem;
}

.action-icon {
  position: relative;
  font-size: 1.25rem;
  color: var(--th-text-dark) !important;
  transition: color 0.2s ease;
}

.action-icon:hover {
  color: var(--th-primary) !important;
}

/* ====================================================== */
/* MOBILE OFFCANVAS STYLES                                */
/* ====================================================== */
.offcanvas {
  background-color: #ffffff !important;
  color: var(--th-text-dark);
}

@media (max-width: 991.98px) {
  #mobileMenu.offcanvas {
    width: 75% !important;
    max-width: 75% !important;
  }
}

.mobile-menu-wrapper .dropdown-menu {
  display: block !important;
  position: static !important;
  float: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-left: 0.5rem;
  margin: 0;
}

.mobile-menu-wrapper .dropdown-item {
  color: var(--th-text-dark) !important;
  padding: 8px 12px;
  border-bottom: 1px solid var(--th-border);
}

.mobile-menu-wrapper .dropdown-item:hover {
  background: #f1f5f9 !important;
  color: var(--th-primary) !important;
}

.mobile-menu-wrapper .submenu {
  padding-left: 1rem !important;
  border-left: 2px solid var(--th-primary) !important;
  margin-top: 4px;
  margin-bottom: 8px;
}

.mobile-categories, 
.mobile-categories a, 
.mobile-categories span {
  font-size: 0.85rem !important;
}

.mobile-categories .nav-link, 
.mobile-categories li {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.user-menu-box {
  font-size: 1rem !important;
}

.user-menu-box .fw-bold {
  font-size: 1.05rem !important;
}

.user-menu-box a {
  font-size: 0.95rem !important;
  padding: 2px 0;
}

/* ====================================================== */
/* STANDARDIZED HOMEPAGE SECTION SPACING                  */
/* ====================================================== */
.home-section {
  margin-bottom: 2rem; /* 32px gap between homepage components */
}

@media (max-width: 768px) {
  .home-section {
    margin-bottom: 1.25rem; /* 20px gap on mobile */
  }
}

/* ====================================================== */
/* UNIFIED FOOTER LINKS STYLING                           */
/* ====================================================== */
.footer-link-item {
  color: var(--th-primary) !important;
  text-decoration: underline !important;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-link-item:hover {
  color: var(--th-primary-hover) !important;
  text-decoration: underline !important;
  padding-left: 3px;
}