/*
 * BestSelection / Dabotek - Warm Palette & Serif Heading Overrides
 * Loaded after theme.css to catch remaining hardcoded Cartzilla color values
 * Inspired by dinvinhandel.dk design language
 */

/* ============================================
   COLOR OVERRIDES — primary red (#892100)
   ============================================ */

/* Links & interactive elements */
a.product-title:hover,
.widget-list-link:hover,
.nav-link-style:hover,
.breadcrumb-item a:hover,
.text-primary { color: #892100 !important; }

/* Product card accents */
.product-card .product-price,
.widget-product-meta .text-accent,
.text-accent { color: #6e1a00 !important; }

/* Stars / ratings */
.star-rating-icon { color: #efd8a1; }

/* Badge / label overrides */
.badge.bg-primary,
.bg-primary { background-color: #892100 !important; }

.badge.bg-accent,
.bg-accent { background-color: #6e1a00 !important; }

/* Form focus states */
.form-control:focus {
  border-color: #892100;
  box-shadow: 0 0 0 0.2rem rgba(137, 33, 0, 0.25);
}

/* Pagination active */
.page-item.active .page-link {
  background-color: #892100;
  border-color: #892100;
}
.page-link { color: #892100; }
.page-link:hover { color: #6e1a00; }

/* Navbar tool label (cart badge) */
.navbar-tool-label {
  background-color: #892100;
}

/* Topbar — keep dark but warm it slightly */
.topbar-dark.bg-dark {
  background-color: #2b2b2b !important;
}

/* ============================================
   WARM BACKGROUND TONES
   ============================================ */

/* Override any remaining cool grey secondary backgrounds */
.bg-secondary,
.bg-faded-primary { background-color: #f3efe7 !important; }

/* Card and container backgrounds */
.card.bg-secondary,
.modal-content .bg-secondary { background-color: #f3efe7 !important; }

/* Border color warmth */
.border-bottom, .border-top, .border-start, .border-end {
  border-color: #e3ddd4 !important;
}
.card { border-color: #e3ddd4; }

/* ============================================
   TYPOGRAPHY — Playfair Display for headings
   ============================================ */

h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
  font-family: "Playfair Display", Georgia, serif;
  color: #333333;
}

h5, .h5, h6, .h6 {
  font-family: "Playfair Display", Georgia, serif;
  color: #333333;
}

/* Widget & section headings */
.widget-title,
.block-title,
.fs-base.mb-3 {
  font-family: "Playfair Display", Georgia, serif;
}

/* Product titles — serif for elegance */
.product-title {
  font-family: "Playfair Display", Georgia, serif;
  color: #333333;
}

/* Keep nav links in sans-serif for readability */
.navbar-nav .nav-link,
.dropdown-item,
.widget-list-link,
.breadcrumb-item,
.btn {
  font-family: "Inter", sans-serif;
}

/* Breadcrumb divider — replace missing icon font with plain slash */
.breadcrumb-item + .breadcrumb-item::before {
  content: "/" !important;
}

/* ============================================
   MISC POLISH
   ============================================ */

/* Softer card shadows */
.card,
.card-hover:hover {
  box-shadow: 0 0.125rem 0.5rem rgba(55, 55, 55, 0.08);
}

/* Gentle selection color */
::selection {
  background-color: rgba(137, 33, 0, 0.2);
  color: #333333;
}

/* ============================================
   STICKY NAV — only keep the menu bar when stuck
   ============================================ */

@media (min-width: 992px) {
  /* When stuck: hide the logo / search toolbar row */
  .navbar-sticky.navbar-stuck > .navbar:first-child {
    display: none !important;
  }
  /* Always show the main menu when stuck (override theme.css hide) */
  .navbar-sticky.navbar-stuck .navbar-stuck-menu {
    display: block !important;
  }
  /* Hide the hamburger toggler since the menu is always visible */
  .navbar-sticky.navbar-stuck .navbar-stuck-toggler {
    display: none !important;
  }
}

/* ============================================
   SPLIT FOOTER
   ============================================ */

.footer {
  background-color: #faf8f5;
}

.footer-left .widget-list-link {
  color: #666 !important;
}
.footer-left .widget-list-link:hover {
  color: #892100 !important;
}

.footer-right .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  border-color: transparent;
}

/* Ensure right column stretches full height on desktop */
@media (min-width: 992px) {
  .footer .row.g-0 {
    min-height: 300px;
  }
  .footer-right {
    min-height: 100%;
  }
}

/* ============================================
   PRODUCT PAGE — m-product layout
   ============================================ */

.m-product {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Top: back button + breadcrumb --- */
.m-product-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e3ddd4;
  margin-bottom: 1.5rem;
}

.m-product-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
}
.m-product-back:hover { color: #892100; }

.m-breadcrumb { flex: 1; }
.m-breadcrumb-items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: #999;
}
.m-breadcrumb-items li { display: inline-flex; align-items: center; }
.m-breadcrumb-items li + li::before {
  content: "/";
  margin: 0 0.4rem;
  color: #ccc;
}
.m-breadcrumb-items li a {
  color: #666;
  text-decoration: none;
}
.m-breadcrumb-items li a:hover { color: #892100; }
.m-breadcrumb-items li.current a {
  color: #333;
  font-weight: 600;
}

/* --- Main: images + info side by side --- */
.m-product-main { margin-bottom: 2rem; }
.m-product-main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .m-product-main-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Images */
.m-product-images { position: relative; }
.m-product-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
}

.m-product-imagecanvas {
  background: #faf8f5;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.m-product-imagecanvas img,
.m-product-imagecanvas a {
  display: block;
  max-width: 100%;
  height: auto;
}
.m-product-imagecanvas-item-img {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.m-product-imageselector {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}
.m-product-imageselector-item {
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.m-product-imageselector-item.active,
.m-product-imageselector-item:hover {
  border-color: #892100;
}
.m-product-imageselector-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info */
.m-product-info { padding-top: 0.25rem; }

.m-product-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.m-product-location {
  display: block;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.m-product-short-description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.m-product-short-description .btn {
  margin-top: 0.75rem;
}

/* Tags */
.m-product-tags {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.m-product-tags li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: #f3efe7;
  border-radius: 20px;
  color: #555;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: background 0.2s;
}
.m-product-tags li a:hover {
  background: #e8e2d8;
  color: #333;
}
.m-product-tags li a img {
  width: 18px;
  height: 18px;
}

/* --- Buy section --- */
.m-product-buy {
  background: #faf8f5;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.m-product-buy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.m-product-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.m-product-stock-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
  display: inline-block;
}
.m-product-stock-status.out-of-stock { background: #e53935; }
.m-product-stock-status.low-stock { background: #ff9800; }
.m-product-stock-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.m-product-bulk {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #666;
  text-decoration: none;
  font-size: 0.8125rem;
}
.m-product-bulk:hover { color: #892100; }

/* Prices */
.m-product-prices {
  margin: 1rem 0;
}
.m-product-prices-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e3ddd4;
}
.m-product-prices-item:last-of-type {
  border-bottom: none;
}
.m-product-prices-text {
  font-size: 0.875rem;
  color: #666;
}
.m-product-prices-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
}
.m-product-prices-price small {
  font-weight: 400;
  font-size: 0.75rem;
  color: #888;
}
.m-product-prices-savings {
  color: #892100;
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Transaction (qty + add to cart) */
.m-product-transaction {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.m-product-transaction-amount {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 0.75rem;
  gap: 0.3rem;
}
.m-product-transaction-amount input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  padding: 0.5rem 0;
}
.m-product-transaction-amount span {
  font-size: 0.875rem;
  color: #888;
}
.m-product-transaction-submit {
  flex: 1;
  background: #892100;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.m-product-transaction-submit:hover {
  background: #6e1a00;
}

/* --- Bottom: description + facts --- */
.m-product-bottom {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) {
  .m-product-bottom {
    grid-template-columns: 1fr;
  }
}

.m-product-description {
  background: #fff;
}
.m-product-description-content { padding: 1.5rem; }
.m-product-description-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
}
.m-product-description-text h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}
.m-product-description-text h3 {
  font-size: 1.1rem;
  margin-top: 1.25rem;
}
.m-product-description-text p { margin-bottom: 0.75rem; }

/* Facts sidebar */
.m-product-facts {
  background: #2b2b2b;
  color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  align-self: start;
}
.m-product-facts-title {
  font-family: "Playfair Display", Georgia, serif;
  color: #fff !important;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.m-product-facts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.m-product-facts-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
}
.m-product-facts-list li:last-child { border-bottom: none; }
.m-product-facts-list li span:first-child { color: #aaa; }
.m-product-facts-list li span:last-child { color: #fff; }
.m-product-facts-list li a {
  color: #fff;
  text-decoration: none;
}
.m-product-facts-list li a:hover {
  color: #efd8a1;
}

/* USP list */
.w-usp-list { margin: 1rem 0; }
.w-usp-items { display: flex; flex-direction: column; gap: 0.5rem; }
.w-usp-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #555;
  text-decoration: none;
}
.w-usp-item img { width: 20px; height: 20px; }
.w-usp-item:hover { color: #892100; }

/* Product meta (SKU) */
.m-product-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.25rem;
}

/* btn small + primary helpers */
.btn.primary {
  background: #892100;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn.primary:hover { background: #6e1a00; }
.btn.small {
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
}
