/* ====================================================== */
/* 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: #fefde8;
  --th-bg-preheader: #fef9c3;
  --th-border: #fde047;
  --th-input-bg: #fefede;
  --th-input-bg-focus: #ffffff;

  /* Paleta de Culori Principale & Acțiuni (Butoane Roșii cu Text Galben) */
  --th-primary: #dc2626;         /* Roșu butoane */
  --th-primary-hover: #b91c1c;   /* Roșu hover */
  --th-accent: #15803d;          /* Verde accent */
  --th-danger: #b91c1c;
  --th-danger-hover: #991b1b;

  /* Tipografie & Text (Nuanțe de Verde în loc de negru) */
  --th-text-dark: #064e3b;       /* Verde închis profund pentru titluri/texte principale */
  --th-text-muted: #166534;      /* Verde mediu pentru texte secundare */
  --th-text-light: #fef08a;      /* Galben deschis pentru text pe butoane */

  /* Dimensiuni și Butoane (Global Sizing & Margini Rotunjite) */
  --th-btn-padding-y: 0.6rem;
  --th-btn-padding-x: 1.2rem;
  --th-btn-radius: 0.75rem;      /* Margini rotunjite mai accentuate */
  --th-input-radius: 0.5rem;

  /* Culori Specifice Elementelor (Stele rating maro) */
  --th-rating-star: #b45309;     
}


/* ====================================================== */
/* 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: #fefce8;     /* Galben cald pentru fundalul site-ului */
  color: var(--th-text-dark);
  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-accent) !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-accent);
  transform: translateY(-1px);
}

.brand-accent {
  color: var(--th-accent) !important;
}

/* ====================================================== */
/* CATEGORY DROPDOWNS & SUBMENUS                          */
/* ====================================================== */
.site-header .dropdown-menu {
  background-color: #fefde8 !important;
  border: 1px solid var(--th-border) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.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: #fefde8; 
  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.08);
}

#searchSuggestions div { 
  padding: 10px 14px; 
  cursor: pointer; 
  border-bottom: 1px solid var(--th-border); 
}

#searchSuggestions div:hover { 
  background: var(--th-bg-preheader); 
  color: var(--th-accent); 
}

#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-accent);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

/* Stil general butoni custom (Roșu cu text galben și rotunjite) */
.btn-search-custom, .btn-primary {
  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) !important;
  transition: background-color 0.2s ease;
}

.btn-search-custom:hover, .btn-primary:hover {
  background-color: var(--th-primary-hover) !important;
  color: #ffffff !important;
}

.btn-search-custom i, .btn-primary i {
  color: var(--th-text-light) !important;
}

.action-badge {
  background-color: var(--th-primary) !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-accent) !important;
}

/* ====================================================== */
/* MOBILE OFFCANVAS STYLES                                */
/* ====================================================== */
.offcanvas {
  background-color: #fefde8 !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: var(--th-bg-preheader) !important;
  color: var(--th-accent) !important;
}

.mobile-menu-wrapper .submenu {
  padding-left: 1rem !important;
  border-left: 2px solid var(--th-accent) !important;
  margin-top: 4px;
  margin-bottom: 8px;
}

.mobile-categories, 
.mobile-categories a, 
.mobile-categories span {
  font-size: 0.85rem !important;
  color: var(--th-text-dark);
}

.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;
  color: var(--th-accent);
}

/* ====================================================== */
/* STANDARDIZED HOMEPAGE SECTION SPACING                  */
/* ====================================================== */
.home-section {
  margin-bottom: 2rem; 
}

@media (max-width: 768px) {
  .home-section {
    margin-bottom: 1.25rem; 
  }
}

/* ====================================================== */
/* UNIFIED LINK & FOOTER STYLING                          */
/* ====================================================== */
a {
  color: var(--th-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--th-primary);
}

.footer-link-item {
  color: var(--th-accent) !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) !important;
  text-decoration: underline !important;
  padding-left: 3px;
}