/*
Theme Name: Bakmart by Bakabozza
Theme URI: https://bakabozza.com/
Author: Bakabozza
Author URI: https://bakabozza.com/
Description: A separate department-store style WooCommerce theme for Bakabozza, designed to run alongside Woodmart so the store can switch themes from Appearance > Themes.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: bakmart
Tags: e-commerce, woocommerce, custom-logo, custom-menu, featured-images
*/

:root {
  --red: #b42025;
  --red-dark: #8e171b;
  --navy: #17253a;
  --ink: #1f2933;
  --muted: #64717e;
  --line: #e1e6eb;
  --soft: #f6f7f8;
  --yellow: #f7c948;
  --green: #0b6b5d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; height: auto; }

.bakmart-promo {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.bakmart-utility {
  background: #f4f6f8;
  border-bottom: 1px solid var(--line);
  color: #4b5865;
  font-size: 13px;
}
.bakmart-utility-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bakmart-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bakmart-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}
.bakmart-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: 0;
  color: var(--red);
}
.bakmart-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}
.bakmart-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  border: 2px solid var(--red);
  border-radius: 3px;
  overflow: hidden;
  min-width: 320px;
}
.bakmart-search select,
.bakmart-search input,
.bakmart-search button {
  border: 0;
  outline: 0;
  min-width: 0;
}
.bakmart-search select {
  background: #f1f3f5;
  color: #3b4752;
  padding: 0 10px;
  border-right: 1px solid var(--line);
}
.bakmart-search input { padding: 12px; }
.bakmart-search button {
  background: var(--red);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}
.bakmart-header-actions {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  align-items: center;
}
.bakmart-cart {
  background: var(--navy);
  color: #fff;
  padding: 9px 12px;
  border-radius: 3px;
}

.bakmart-departments {
  background: var(--navy);
  color: #fff;
}
.bakmart-departments-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 18px;
}
.bakmart-departments a {
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 900;
  border-right: 1px solid rgba(255,255,255,.14);
  white-space: nowrap;
}
.bakmart-departments a:first-child { background: var(--red-dark); }
.bakmart-departments li {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bakmart-departments ul {
  display: flex;
  margin: 0;
  padding: 0;
}

.bakmart-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
}

.bakmart-hero {
  display: grid;
  grid-template-columns: 260px 1fr 290px;
  gap: 16px;
  align-items: stretch;
}
.bakmart-side-menu {
  border: 1px solid var(--line);
  background: #fff;
}
.bakmart-side-menu h2 {
  margin: 0;
  background: var(--red);
  color: #fff;
  font-size: 17px;
  padding: 13px 14px;
}
.bakmart-side-menu a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #eef1f4;
  font-size: 14px;
  font-weight: 800;
}
.bakmart-side-menu span { color: var(--muted); }

.bakmart-hero-main {
  min-height: 410px;
  padding: 34px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(31,41,51,.9), rgba(31,41,51,.25)),
    var(--hero-image) center / cover no-repeat;
  border: 1px solid var(--line);
}
.bakmart-hero-main small {
  color: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.bakmart-hero-main h1 {
  margin: 0;
  max-width: 560px;
  font-size: 43px;
  line-height: 1.08;
  letter-spacing: 0;
}
.bakmart-hero-main p {
  margin: 14px 0 20px;
  max-width: 540px;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
  font-size: 16px;
}
.bakmart-button {
  width: fit-content;
  border: 0;
  background: var(--yellow);
  color: #172026;
  border-radius: 3px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.bakmart-deal-stack {
  display: grid;
  gap: 12px;
}
.bakmart-deal-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 128px;
}
.bakmart-deal-card.red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.bakmart-deal-card.gold {
  background: #fff8df;
  border-color: #f2da8a;
}
.bakmart-deal-card strong {
  font-size: 22px;
  line-height: 1.15;
}
.bakmart-deal-card span {
  margin-top: 7px;
  color: inherit;
  opacity: .82;
  font-size: 14px;
  line-height: 1.4;
}

.bakmart-service-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 18px 0 28px;
}
.bakmart-service-row div {
  background: #fff;
  padding: 15px;
  font-weight: 900;
}
.bakmart-service-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  margin-top: 4px;
}

.bakmart-section {
  margin: 34px 0;
}
.bakmart-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
}
.bakmart-section h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}
.bakmart-section-head a {
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}

.bakmart-category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.bakmart-category {
  border: 1px solid var(--line);
  background: #fff;
  padding: 13px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.98)),
    var(--tile);
}
.bakmart-category strong {
  font-size: 18px;
  line-height: 1.2;
}
.bakmart-category span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
  line-height: 1.35;
}

.bakmart-product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 13px;
}
.bakmart-product-grid .woocommerce,
.bakmart-product-grid ul.products {
  grid-column: 1 / -1;
}
.bakmart-product-grid ul.products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 13px;
}
.bakmart-product-grid ul.products::before,
.bakmart-product-grid ul.products::after {
  display: none;
}
.bakmart-product {
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.bakmart-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  border-radius: 2px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  z-index: 1;
}
.bakmart-product-img {
  height: 150px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,255,255,0)),
    var(--product);
  margin-bottom: 12px;
}
.bakmart-product-img.photo {
  background: var(--product-image) center / cover no-repeat;
}
.bakmart-product small {
  color: var(--green);
  font-weight: 900;
  margin-bottom: 5px;
}
.bakmart-product h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}
.bakmart-product p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}
.bakmart-price {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
}
.bakmart-price button {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 8px 9px;
  font-weight: 900;
  cursor: pointer;
}

.bakmart-department-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.bakmart-department-box {
  border: 1px solid var(--line);
  background: #fff;
}
.bakmart-department-box h3 {
  margin: 0;
  background: #f4f6f8;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--navy);
}
.bakmart-department-box ul {
  list-style: none;
  padding: 10px 12px 14px;
  margin: 0;
  line-height: 1.9;
  color: #3d4a55;
  font-size: 14px;
}

.bakmart-local-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  margin-top: 34px;
}
.bakmart-local-panel > div {
  padding: 24px;
}
.bakmart-local-panel > div:first-child {
  background: var(--navy);
  color: #fff;
}
.bakmart-local-panel h2,
.bakmart-local-panel h3 {
  margin: 0 0 9px;
}
.bakmart-local-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}
.bakmart-local-panel > div:first-child p { color: rgba(255,255,255,.84); }
.bakmart-local-panel ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.bakmart-footer {
  background: #172026;
  color: #d7dee6;
  margin-top: 38px;
}
.bakmart-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 18px;
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  gap: 18px;
  font-size: 14px;
}
.bakmart-footer h3,
.bakmart-footer h4 {
  color: #fff;
  margin: 0 0 10px;
}
.bakmart-footer p {
  color: #b8c2cc;
  margin: 0;
  line-height: 1.5;
}
.bakmart-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bakmart-footer li { padding: 4px 0; }

.woocommerce .bakmart-page,
.woocommerce-page .bakmart-page {
  max-width: 1240px;
}

@media (max-width: 1100px) {
  .bakmart-header-inner, .bakmart-hero, .bakmart-local-panel { grid-template-columns: 1fr; }
  .bakmart-header-actions { justify-content: space-between; }
  .bakmart-category-grid { grid-template-columns: repeat(3, 1fr); }
  .bakmart-product-grid { grid-template-columns: repeat(3, 1fr); }
  .bakmart-department-layout, .bakmart-service-row, .bakmart-footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .bakmart-page { padding: 12px; }
  .bakmart-search { grid-template-columns: 1fr auto; min-width: 0; }
  .bakmart-search select { display: none; }
  .bakmart-hero-main { min-height: 330px; padding: 24px; }
  .bakmart-hero-main h1 { font-size: 32px; }
  .bakmart-category-grid, .bakmart-product-grid, .bakmart-department-layout, .bakmart-service-row, .bakmart-footer-inner { grid-template-columns: 1fr; }
  .bakmart-section-head { align-items: start; flex-direction: column; }
}
