/* ======================================================
   BASE
   ====================================================== */
html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}
body {
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

/* ======================================================
   HEADER
   ====================================================== */
/* TOP BAR — YELLOW */
.top-bar{
  background-color:#FFD200;
  height:56px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 16px;
  position:relative;
  z-index:1031;
}
.top-bar .navbar-brand,
.top-bar .brand-title{
  font-size:clamp(1.6rem, 3.2vw, 2.4rem);
  line-height:56px;
  font-weight:800;
  text-transform:uppercase;
  margin-left:.5rem;
  color:#000 !important;
  text-decoration:none;
}

/* Search box */
.search-box { max-width: 300px; }
.search-box .form-control{
  border-radius:4px 0 0 4px;
  border:1px solid #ccc;
}
.search-box .btn-search{
  border-radius:0 4px 4px 0;
  background:#000;
  border:1px solid #000;
  color:#FFD200;
  font-weight:700;
}
.search-box .btn-search:hover{ background:#222; border-color:#222; }
.search-box .btn-search svg,
.search-box .btn-search i { vertical-align: -2px; }

/* NAVBAR — BLACK */
nav.navbar{
  background:#000 !important;
  position:relative;
  z-index:1030;
}
nav.navbar .container,
nav.navbar .container-fluid{
  padding-left:1.25rem !important;
  padding-right:1rem !important;
}

/* Navbar layout */
nav.navbar .navbar-collapse{
  display:flex !important;         /* keep visible even if JS off */
  align-items:center;
  justify-content:flex-start;
  gap:.75rem;
  flex-wrap:wrap;
}
nav.navbar .navbar-nav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.25rem 1rem;
  margin:0;
  padding-left:0;
}
.navbar .lang-select{ margin-left:auto; }

@media (min-width:992px){
  nav.navbar .navbar-collapse{ flex-wrap:nowrap; }
  nav.navbar .navbar-nav{ padding-left:1.25rem; }
}

@media (max-width:991.98px){
  nav.navbar .navbar-collapse{
    flex-direction:column;
  }
  nav.navbar .navbar-nav{ padding-left:0; }
  .navbar .lang-select{ margin-left:0; margin-top:.5rem; }
}

/* Home icon (left) */
.navbar .home-left{
  display:inline-flex;
  align-items:center;
  color:#fff !important;
  margin-right:.75rem;
  text-decoration:none;
}
.navbar .home-left:hover{ color:#FFD200 !important; }
.navbar .home-left svg{
  width:22px; height:22px;
  fill: currentColor;
}

/* Menu links */
.navbar .nav-link{
  color:#fff !important;
  text-transform:uppercase;
  font-weight:800 !important;
  letter-spacing:.5px;
  line-height:1;
}
.navbar .nav-link:hover,
.navbar .nav-link.active{ color:#FFD200 !important; }

/* Collapse visibility (fallback if JS absent) */
#navbarNav.collapse,
#navbarNav.collapse:not(.show) { display: flex !important; }

/* Hamburger (yellow lines) */
.navbar-toggler{ border-color:#FFD200; }
.navbar-toggler-icon{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23FFD200' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Mobile container padding & wrap */
@media (max-width: 991.98px) {
  nav.navbar .container,
  nav.navbar .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  #navbarNav { flex-basis:100%; }
}

/* ======================================================
   TITLES / BUTTONS / GENERAL
   ====================================================== */
h1, h2, h3 { font-weight:700; margin-bottom:20px; color:#000; }
main { flex: 1; }

.btn-primary{
  background:#FFD200;
  border-color:#FFD200;
  color:#000;
  font-weight:700;
  font-size:1.1rem;
}
.btn-primary:hover{ background:#FFE94D; border-color:#FFE94D; color:#000; }

/* ======================================================
   FOOTER (Spanish, multi-column)
   ====================================================== */
.site-footer {
  background: #111;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: auto;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  transition: color .2s ease;
  font-weight: 500;
}
.site-footer a:hover {
  color: #FFD200;
  text-decoration: underline;
}

/* Top dark block */
.footer-top {
  background: #111;
  padding: 40px 0;
}
.footer-title {
  font-weight: 700;
  text-transform: uppercase;
  color: #FFD200;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-title a { color: inherit; text-decoration: none; }
.footer-title a:hover { color: #FFE94D; }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { font-size: 0.9rem; }
.footer-links a:hover { color: #FFD200; }

/* Contact block */
.footer-contact p { margin-bottom: 0.6rem; }
.footer-contact strong { color: #FFD200; font-weight: 700; }

/* Bottom black strip */
.footer-bottom {
  background: #000;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 0.85rem;
  padding: 15px 0;
  text-align: center;
}
.footer-bottom .text-muted {
  color: rgba(255,255,255,.7) !important;
}
.footer-social a {
  font-size: 1.2rem;
  margin: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Logos block — white background */
.footer-logos-wrapper {
  background: #fff;
  padding: 25px 0;
}
.footer-logos img.footer-logo {
  height: 70px;         /* desktop size */
  max-width: 173px;
  object-fit: contain;
  transition: transform .2s ease;
}
.footer-logos img.footer-logo:hover { transform: scale(1.08); }

/* Responsive footer */
@media (max-width: 768px) {
  .footer-top .row > div { text-align: left; }
  .footer-social { justify-content: center; }
  .footer-logos { justify-content: center !important; }
  .footer-logos img.footer-logo {
    height: 55px;       /* mobile size */
    max-width: 135px;
  }
}

/* ======================================================
   GALLERY
   ====================================================== */
.gallery-img{
  cursor:pointer;
  border-radius:5px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.gallery-img:hover{
  transform:scale(1.05);
  box-shadow:0 4px 12px rgba(0,0,0,.2);
}

/* ======================================================
   FORM VALIDATION
   ====================================================== */
.was-validated .form-control:invalid { border-color:#dc3545; }
.was-validated .form-control:valid   { border-color:#28a745; }

/* ======================================================
   RESPONSIVE GENERAL
   ====================================================== */
@media (max-width:768px){
  .top-bar{ flex-direction:column; height:auto; padding:10px; }
  .search-box{ width:100%; margin-top:8px; }
  .lang-select{ margin-top:10px; }
  .nav-link{ padding:8px 0; }
}

/* ======================================================
   LEFT MENU (Products)
   ====================================================== */
.product-categories li { margin-bottom:8px; }
.product-categories a{
  text-decoration:none;
  color:#000;
  font-weight:500;
}
.product-categories a:hover,
.product-categories a.active{
  color:#000;
  background:#FFD200;
  padding:4px 8px;
  border-radius:4px;
  font-weight:700;
}

/* ======================================================
   PRODUCT CARDS (Products list)
   ====================================================== */
.product-card{
  border:1px solid #eee;
  border-radius:8px;
  background:#fff;
  padding:10px;
  transition:transform .2s ease, box-shadow .2s ease;
  display:flex;
  flex-direction:column;
  height:100%;
}
.product-card:hover{
  transform:translateY(-5px);
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}
.product-card img{ max-height:200px; object-fit:contain; padding:10px; display:block; }
.product-card p{ font-size:.9rem; font-weight:700; margin-top:auto; }
.product-grid > [class*="col-"]{ display:flex; }

/* ======================================================
   STANLEY
   ====================================================== */
.stanley-img{ max-height:400px; object-fit:cover; }
.stanley-section{
  min-height:calc(100vh - 200px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:60px 0;
}

/* ======================================================
   HERO SLIDER
   ====================================================== */
#heroSlider, #heroSlider .carousel-inner, #heroSlider .carousel-item { width:100%; }
#heroSlider .carousel-item{
  position:relative;
  overflow:hidden;
  background:transparent;
  margin:0;
  padding:0;
}
.carousel-item .slide-bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  filter:blur(18px);
  transform:scale(1.12);
}
.carousel-item > img.slide-fg{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  height:clamp(420px, 80vh, 900px);
  object-fit:contain;
  object-position:center center;
  background:transparent;
}
.carousel-item > img{ width:100%; height:auto; display:block; }
.slider-img{ display:none; }

/* Hide slider on mobile */
@media (max-width: 768px) {
  #heroSlider { display: none !important; }
}

/* ======================================================
   CATEGORY CARDS (Index)
   ====================================================== */
.category-card{
  border-radius:0;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
  transition:transform .2s ease, box-shadow .2s ease;
  display:flex;
  flex-direction:column;
  height:100%;
}
.category-card img, .category-img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
  transition:transform .25s ease;
}
.category-label{
  background:#FFD200;
  color:#000;
  text-align:center;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
  padding:16px 10px;
  font-size:1rem;
}
.category-card:hover{ transform:translateY(-4px); box-shadow:0 6px 20px rgba(0,0,0,.18); }
.category-card:hover img, .category-card:hover .category-img{ transform:scale(1.03); }
@media (max-width:576px){ .category-card img, .category-img{ height:180px; } }

/* Equal-height/no-gap helpers for Index categories */
.category-grid .row { align-items: stretch; margin-bottom: 0 !important; }
.category-grid [class*="col-"] { display: flex; }
.category-grid .category-card { flex: 1 1 auto; }

.section-categories.category-grid .row { align-items: stretch; }
.section-categories.category-grid .col,
.section-categories.category-grid [class^="col-"],
.section-categories.category-grid [class*=" col-"] { display:flex; }
.section-categories.category-grid a.d-block { display:flex; flex-direction:column; width:100%; }
.section-categories.category-grid .category-card { display:flex; flex-direction:column; height:100%; }
.section-categories.category-grid .category-img { display:block; width:100%; height:220px; object-fit:cover; }
@media (max-width:576px){ .section-categories.category-grid .category-img{ height:180px; } }
.section-categories.category-grid .row:last-child { margin-bottom: 0 !important; }

/* ======================================================
   CATALOG CARDS
   ====================================================== */
.catalog-card{
  position:relative;
  background:#FFD200;
  border-radius:6px;
  box-shadow:0 6px 18px rgba(0,0,0,.12);
  overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease;
}
.catalog-card:hover{ transform:translateY(-4px); box-shadow:0 10px 26px rgba(0,0,0,.18); }
.catalog-thumb{
  aspect-ratio:4/3;
  background:#FFD200 center/90% no-repeat;
}
.catalog-meta{ padding:16px 18px; border-top:4px solid #111; }
.catalog-title{ color:#000; font-weight:700; letter-spacing:.2px; }
.catalog-badge{
  position:absolute; top:14px; right:14px;
  display:grid; place-items:center;
  width:42px; height:42px;
  background:#fff; color:#000;
  border-radius:50%;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
}
@supports not (aspect-ratio:1){ .catalog-thumb{ height:360px; } }
@media (max-width:576px){
  @supports not (aspect-ratio:1){ .catalog-thumb{ height:280px; } }
}

/* Placeholder cover for PDFs */
.catalog-thumb.stanley-cover{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#FFD200;
  color:#000;
  font-weight:800;
  font-size:1.4rem;
  text-transform:uppercase;
  aspect-ratio:4/3;
  border:2px solid #000;
}

/* ======================================================
   ABOUT (image overflow fix)
   ====================================================== */
.about-section{
  padding-top:clamp(16px, 4vh, 40px);
  padding-bottom:clamp(16px, 4vh, 40px);
}
.about-media{ max-width:100%; }
.about-img{
  display:block;
  max-width:100%;
  height:auto;
  max-height:min(48vh, 520px);
  object-fit:contain;
  margin-inline:auto;
}
.about-section p{ line-height:1.6; }
@media (max-width:992px){ .about-img{ max-height:42vh; } }
@media (max-width:576px){ .about-img{ max-height:36vh; } }

/* ======================================================
   MISC
   ====================================================== */
#lang-en { display: none !important; }
