@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --tbm-primary: #0067b8;       /* Brand Blue */
  --tbm-primary-hover: #005a9e;
  --tbm-accent: #e60012;        /* Lego Red */
  --tbm-accent-yellow: #ffcc00; /* Lego Yellow */
  --tbm-bg: #f5f7f9;
  --tbm-card-bg: #ffffff;
  --tbm-text: #27272a;
  --tbm-text-muted: #71717a;
  --tbm-border: #e4e4e7;
  --tbm-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --tbm-radius: 12px;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--tbm-bg);
  background-image: url('../../image/catalog/tbm_lego_pattern.png');
  background-repeat: repeat;
  background-size: 180px 180px;
  color: var(--tbm-text);
  line-height: 1.5;
  width: 100%;
  height: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--tbm-text);
}

legend {
  padding: 7px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--tbm-border);
  font-weight: 600;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--tbm-text);
}

button:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgb(var(--bs-primary-rgb), 0.25) !important;
}

/* container */
#container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* content */
#content, #column-left, #column-right {
  padding-bottom: 40px;
}

@media (min-width: 576px) {
  #content, #column-left, #column-right {
    padding-bottom: 40px;
  }
}

#alert {
  z-index: 9999;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 350px;
}

#alert .alert {
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* top bar */
#top {
  background-color: var(--tbm-primary);
  border-bottom: none;
  padding: 6px 0;
  margin-bottom: 0px;
}

#top ul.list-inline {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

#top .dropdown-toggle, #top .list-inline-item > a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95) !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  line-height: 30px;
  vertical-align: middle;
  padding: 5px 0;
  display: inline-block;
}

#top .dropdown-toggle:hover, #top .list-inline-item > a:hover {
  color: var(--tbm-accent-yellow) !important;
}

#top .list-inline-item i {
  color: #ffffff;
}

#top .dropdown-menu {
  border-radius: 8px;
  border: 1px solid var(--tbm-border);
  box-shadow: var(--tbm-shadow);
}

#top .dropdown-menu .dropdown-item {
  color: var(--tbm-text) !important;
  font-size: 0.9rem;
  padding: 8px 16px;
}

#top .dropdown-menu .dropdown-item:hover {
  background-color: var(--tbm-bg);
  color: var(--tbm-primary) !important;
}

/* logo */
#logo {
  text-align: center;
  margin: 15px 0;
}

#logo img {
  max-width: 180px;
  height: auto;
}

@media (min-width: 768px) {
  #logo {
    text-align: left;
  }
}

/* search */
#search {
  margin: 15px 0;
}

#search .form-control-lg {
  height: 46px;
  font-size: 0.9rem;
  border-radius: 23px 0 0 23px;
  border: 1px solid var(--tbm-border);
  border-right: none;
  padding-left: 20px;
  background-color: #ffffff;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

#search .form-control-lg:focus {
  border-color: var(--tbm-primary);
}

#search .btn-lg {
  height: 46px;
  background-color: var(--tbm-primary);
  border: 1px solid var(--tbm-primary);
  color: #ffffff;
  border-radius: 0 23px 23px 0;
  padding: 0 25px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#search .btn-lg:hover {
  background-color: var(--tbm-primary-hover);
  border-color: var(--tbm-primary-hover);
}

/* cart */
#cart {
  margin: 15px 0;
}

#cart .btn-lg {
  height: 46px;
  background-color: #ffffff;
  border: 1px solid var(--tbm-border);
  border-radius: 23px;
  color: var(--tbm-text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  transition: all 0.2s ease;
  width: 100%;
}

#cart .btn-lg:hover {
  background-color: var(--tbm-bg);
  border-color: var(--tbm-primary);
  color: var(--tbm-primary);
}

#cart .dropdown-menu {
  border-radius: var(--tbm-radius);
  border: 1px solid var(--tbm-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 12px;
  background-color: #ffffff;
  min-width: 320px;
}

/* menu */
#menu {
  background-color: var(--tbm-primary);
  background-image: none;
  border: none;
  border-radius: 8px;
  padding: 0 15px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 103, 184, 0.15);
  min-height: auto;
}

#menu .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  margin: 8px 0;
}

#menu .navbar-toggler i {
  color: #ffffff;
}

#menu .navbar-nav > li > a {
  color: #ffffff;
  text-shadow: none;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  background-color: transparent;
}

#menu .navbar-nav > li > a:hover, #menu .navbar-nav > li.show > a {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--tbm-accent-yellow);
  border-bottom: 3px solid var(--tbm-accent-yellow);
}

#menu .dropdown-menu {
  border-radius: var(--tbm-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid var(--tbm-border);
  padding: 15px;
}

#menu .dropdown-inner {
  display: flex;
  gap: 20px;
}

#menu .dropdown-inner ul {
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: 180px;
}

#menu .dropdown-inner ul li a {
  padding: 6px 12px;
  color: var(--tbm-text-muted);
  font-size: 0.9rem;
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 6px;
  border-bottom: none;
}

#menu .dropdown-inner ul li a:hover {
  background-color: var(--tbm-bg);
  color: var(--tbm-primary);
}

/* default boostrap overrides */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--tbm-border);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--tbm-primary);
  box-shadow: 0 0 0 3px rgb(var(--bs-primary-rgb), 0.1);
}

.btn-primary {
  background-color: var(--tbm-primary);
  border-color: var(--tbm-primary);
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--tbm-primary-hover);
  border-color: var(--tbm-primary-hover);
}

.btn-light {
  background-color: #ffffff;
  border: 1px solid var(--tbm-border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-light:hover {
  background-color: var(--tbm-bg);
  border-color: var(--tbm-text-muted);
}

/* footer */
footer {
  border: none;
  border-top: 5px solid var(--tbm-primary) !important;
  position: static;
  margin-top: auto;
  width: 100%;
  padding: 50px 0 30px 0;
  background-color: #09090b; /* modern dark zinc */
  background-image: linear-gradient(rgba(9, 9, 11, 0.96), rgba(9, 9, 11, 0.96)), url('../../image/catalog/tbm_lego_pattern.png');
  background-repeat: repeat;
  background-size: 180px 180px;
  color: #a1a1aa;
}

footer hr {
  border-top: none;
  border-bottom: 1px solid #27272a;
  margin: 30px 0 20px 0;
}

footer a {
  color: #a1a1aa;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

footer h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* breadcrumb */
.breadcrumb {
  margin: 0 0 30px 0;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: var(--tbm-shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb > li.breadcrumb-item {
  padding: 0;
  font-size: 0.9rem;
  color: var(--tbm-text-muted);
  text-shadow: none;
}

.breadcrumb > li.breadcrumb-item a {
  color: var(--tbm-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb > li.breadcrumb-item a:hover {
  color: var(--tbm-primary-hover);
  text-decoration: underline;
}

.breadcrumb > li.breadcrumb-item:after {
  display: none;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--tbm-text-muted);
  padding-right: 8px;
}

/* product layout cards */
.product-thumb {
  background-color: var(--tbm-card-bg);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius);
  padding: 16px;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--tbm-primary);
}

.product-thumb .image {
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
}

.product-thumb .image img {
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-thumb:hover .image img {
  transform: scale(1.06);
}

.product-thumb .content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0;
}

.product-thumb .description {
  padding: 0;
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-thumb .description h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-thumb .description h4 a {
  color: var(--tbm-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-thumb .description h4 a:hover {
  color: var(--tbm-primary);
}

.product-thumb .description p {
  display: none;
}

.product-thumb .price {
  margin-top: 10px;
  font-size: 1.1rem;
}

.product-thumb .price-new {
  font-weight: 700;
  color: var(--tbm-primary);
}

.product-thumb .price-old {
  font-size: 0.9rem;
  color: var(--tbm-text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.product-thumb .price-tax {
  font-size: 0.75rem;
  color: var(--tbm-text-muted);
  margin-top: 2px;
}

.product-thumb .rating {
  margin-top: 8px;
}

.product-thumb .rating .fa-star {
  color: var(--tbm-accent-yellow);
  font-size: 0.85rem;
}

.product-thumb .button {
  display: flex;
  gap: 8px;
  position: static;
  width: 100%;
  margin-top: auto;
  padding: 0;
  border: none;
}

.product-thumb .button button {
  border: 1px solid var(--tbm-border);
  background-color: #ffffff;
  color: var(--tbm-text-muted);
  border-radius: 8px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 40px;
  line-height: normal;
}

.product-thumb .button button[type="submit"] {
  flex-grow: 1;
  background-color: var(--tbm-primary);
  border-color: var(--tbm-primary);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  width: auto;
}

.product-thumb .button button[type="submit"]:hover {
  background-color: var(--tbm-primary-hover);
  border-color: var(--tbm-primary-hover);
}

.product-thumb .button button:not([type="submit"]):hover {
  background-color: var(--tbm-bg);
  color: var(--tbm-primary);
  border-color: var(--tbm-primary);
}

.product-thumb .button button + button {
  border-left: 1px solid var(--tbm-border);
}

@media (min-width: 960px) {
  .product-list .product-thumb {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
  .product-list .product-thumb .image {
    width: 200px;
    margin-bottom: 0px;
    flex-shrink: 0;
  }
  .product-list .product-thumb .content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    width: 100%;
  }
  .product-list .product-thumb .description {
    margin-bottom: 0px;
  }
  .product-list .product-thumb .button {
    width: 250px;
    margin-top: 0px;
    flex-shrink: 0;
  }
}

/* cookie policy alert bar */
#cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  padding: 20px 0;
  z-index: 9999;
  color: #ecf0f1;
  background: #18181b;
  border-top: 1px solid #27272a;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

#cookie div {
  font-size: 0.95rem;
  color: #FFFFFF;
}
