/*
 * AHH Bakes product page redesign — design tokens + components.
 * Loaded after custom.css so it can extend the site's existing
 * accent (#e54357, already used on buttons/nav) rather than replace it.
 */

:root {
  --ahh-paper: #fbefe8;
  --ahh-paper-deep: #f6e2d6;
  --ahh-card: #fffcfa;
  --ahh-cocoa: #2e1d18;
  --ahh-cocoa-soft: #6b5148;
  --ahh-berry: #e54357;
  --ahh-berry-deep: #c22e40;
  --ahh-honey: #c1862f;
  --ahh-honey-soft: #e6c690;
  --ahh-rule: #e8d6c9;
  --ahh-rule-strong: #d9bfae;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ahh-paper: #241512;
    --ahh-paper-deep: #1a0f0d;
    --ahh-card: #2d1c17;
    --ahh-cocoa: #f6e9e2;
    --ahh-cocoa-soft: #cbb3a8;
    --ahh-berry: #ef6377;
    --ahh-berry-deep: #f0899a;
    --ahh-honey: #e0ab5c;
    --ahh-honey-soft: #9c7642;
    --ahh-rule: #4a332c;
    --ahh-rule-strong: #5c4038;
  }
}

:root[data-theme="dark"] {
  --ahh-paper: #241512;
  --ahh-paper-deep: #1a0f0d;
  --ahh-card: #2d1c17;
  --ahh-cocoa: #f6e9e2;
  --ahh-cocoa-soft: #cbb3a8;
  --ahh-berry: #ef6377;
  --ahh-berry-deep: #f0899a;
  --ahh-honey: #e0ab5c;
  --ahh-honey-soft: #9c7642;
  --ahh-rule: #4a332c;
  --ahh-rule-strong: #5c4038;
}

/* ---------- Page background ---------- */

body, #ttr_page {
  background-color: var(--ahh-paper) !important;
}

/* ---------- Flavour / Package dropdown ----------
   VirtueMart replaces the plain <select> with a "Chosen" JS widget at
   runtime (usefancy/jchosen enabled in VM config) — the real visible
   markup is .chosen-container, not .form-select. Styling both so this
   still degrades sanely if Chosen is ever turned off. */

.productdetails-view .form-select {
  background-color: var(--ahh-card) !important;
  border: 1.5px solid var(--ahh-rule-strong) !important;
  border-radius: 10px !important;
  color: var(--ahh-cocoa) !important;
  padding: 10px 14px !important;
}

.productdetails-view .chosen-container {
  width: 100% !important;
}

.productdetails-view .chosen-container .chosen-single {
  background: var(--ahh-card) !important;
  border: 1.5px solid var(--ahh-rule-strong) !important;
  border-radius: 10px !important;
  color: var(--ahh-cocoa) !important;
  height: auto !important;
  line-height: 1.6 !important;
  padding: 10px 14px !important;
  box-shadow: none !important;
}

.productdetails-view .chosen-container.chosen-with-drop .chosen-single {
  border-color: var(--ahh-berry) !important;
  border-radius: 10px 10px 0 0 !important;
}

.productdetails-view .chosen-container .chosen-drop {
  background: var(--ahh-card) !important;
  border: 1.5px solid var(--ahh-berry) !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
}

.productdetails-view .chosen-container .chosen-results li.highlighted {
  background: var(--ahh-berry) !important;
  color: #fffdfb !important;
}

/* ---------- Quantity stepper ----------
   A legacy admin-configured "Custom CSS" block (2022, lives in the
   Joomla template style params, not in this file) loads after this
   stylesheet and sets width:50%/float:right/font-size:150% on
   .quantity-box with higher specificity — !important throughout to
   reliably win against it. */

.productdetails-view .quantity-box {
  border: 1.5px solid var(--ahh-rule-strong) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: var(--ahh-card) !important;
  width: auto !important;
  float: none !important;
  padding: 0 !important;
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: stretch !important;
}

.productdetails-view .quantity-box .quantity-controls {
  color: var(--ahh-cocoa) !important;
  border: none !important;
  text-decoration: none !important;
  background: transparent !important;
  height: 42px !important;
  line-height: 42px !important;
  padding: 0 12px !important;
  font-size: 1.1rem !important;
}

.productdetails-view .quantity-box .quantity-controls:hover {
  background: var(--ahh-paper-deep) !important;
}

.productdetails-view .quantity-box .quantity-input {
  border: none !important;
  border-left: 1.5px solid var(--ahh-rule-strong) !important;
  border-right: 1.5px solid var(--ahh-rule-strong) !important;
  border-radius: 0 !important;
  background: var(--ahh-card) !important;
  color: var(--ahh-cocoa) !important;
  width: 48px !important;
  height: 42px !important;
  line-height: 42px !important;
  font-size: 1rem !important;
  text-align: center !important;
  padding: 0 !important;
}

/* ---------- Photo colour-block (fills space, works with just one photo) ---------- */

.productdetails-view .vm-product-media-container {
  background: linear-gradient(155deg, var(--ahh-honey-soft), var(--ahh-paper-deep));
  border-radius: 18px;
  padding: 28px;
}

.productdetails-view .vm-product-media-container img {
  filter: drop-shadow(0 14px 24px rgba(46, 29, 24, 0.22));
}

/* ---------- Ingredients / description (clean flow, no boxed card — matches approved mockup) ---------- */

.productdetails-view .product-description {
  color: var(--ahh-cocoa-soft);
}

.productdetails-view .product-description p {
  color: var(--ahh-cocoa-soft);
}

/* Section headings shared by Description / Reviews / Related Products */

.productdetails-view .vm-section-title {
  font-family: Rockwell, "Roboto Slab", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ahh-cocoa) !important;
  border-bottom-color: var(--ahh-rule) !important;
}

.productdetails-view .product-description details {
  border-top: 1px solid var(--ahh-rule);
  padding: 4px 0;
}

.productdetails-view .product-description details:first-of-type {
  border-top: none;
}

.productdetails-view .product-description details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ahh-cocoa);
}

.productdetails-view .product-description details summary::-webkit-details-marker {
  display: none;
}

.productdetails-view .product-description details summary::after {
  content: "▾";
  color: var(--ahh-berry);
  transition: transform 0.15s ease;
}

.productdetails-view .product-description details[open] summary::after {
  transform: rotate(180deg);
}

.productdetails-view .product-description .spec-line {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--ahh-rule);
  margin: 0;
}

.productdetails-view .product-description .spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.productdetails-view .product-description .spec-item dt {
  font-weight: 700;
  color: var(--ahh-cocoa-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.productdetails-view .product-description .spec-item dd {
  margin: 0;
  color: var(--ahh-cocoa);
}

.productdetails-view .product-description details .accordion-panel {
  padding-bottom: 16px;
  color: var(--ahh-cocoa-soft);
  line-height: 1.6;
}

.productdetails-view .allergen-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.productdetails-view .allergen-chip {
  background: var(--ahh-paper-deep);
  border: 1px solid var(--ahh-rule-strong);
  color: var(--ahh-cocoa);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
}

/* ---------- Buy box polish ---------- */

.productdetails-view .product-neighbours {
  position: absolute;
  top: 4px;
  right: 0;
  gap: 2px;
}

.productdetails-view .product-neighbours .btn {
  color: var(--ahh-cocoa-soft);
}

.productdetails-view .product-neighbours .btn:hover {
  color: var(--ahh-berry);
}

.productdetails-view .vm-page-title {
  font-family: Rockwell, "Roboto Slab", Georgia, serif;
  font-weight: 700;
  color: var(--ahh-cocoa) !important;
  border-bottom-color: var(--ahh-rule) !important;
}

.productdetails-view .addtocart-button.btn-primary,
.productdetails-view .addtocart-button.btn-primary:hover,
.productdetails-view .addtocart-button.btn-primary:focus {
  background-color: var(--ahh-berry) !important;
  border-color: var(--ahh-berry) !important;
  font-weight: 700;
}

.productdetails-view .addtocart-button.btn-primary:hover {
  background-color: var(--ahh-berry-deep) !important;
  border-color: var(--ahh-berry-deep) !important;
}

.productdetails-view .PricesalesPrice {
  color: var(--ahh-berry) !important;
  font-weight: 700;
}

/* ---------- Trust ribbon (site-wide notice) ---------- */

.ahh-trust-ribbon {
  background: var(--ahh-honey);
  color: var(--ahh-cocoa);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
}

/* ---------- Short description (under title) ---------- */

.productdetails-view .ahh-short-desc {
  font-size: 0.98rem;
  color: var(--ahh-cocoa-soft);
  margin: 2px 0 10px;
}

/* ---------- Review line (rating widget + honest prompt, one line) ---------- */

.productdetails-view .ahh-review-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.productdetails-view .ahh-review-line .ratingbox {
  margin: 0 !important;
}

.ahh-review-prompt {
  font-size: 0.88rem;
  color: var(--ahh-cocoa-soft);
}

/* ---------- Breadcrumb (reconnected module) ---------- */

.ttr_topcolumn_widget_container,
.contenttopcolumn0,
.contenttopcolumn0 .cell1,
.contenttopcolumn0 .cell1 > div {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
}

.topcolumn1 .ttr_block_header {
  display: none;
}

.topcolumn1 .ttr_block_content {
  padding: 0 !important;
  margin: 0 !important;
}

.topcolumn1 .ttr_block {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  min-height: 0 !important;
}

.topcolumn1 .breadcrumb {
  background: none;
  padding: 14px 0 0;
  margin: 0 0 -10px;
  font-size: 0.85rem;
  color: var(--ahh-cocoa-soft);
}

.topcolumn1 .breadcrumb li:first-child {
  display: none !important;
}

.topcolumn1 .breadcrumb .showHere {
  display: none !important;
}

.topcolumn1 .breadcrumb a.pathway {
  color: var(--ahh-cocoa-soft);
  text-decoration: none;
}

.topcolumn1 .breadcrumb a.pathway:hover {
  color: var(--ahh-berry);
  text-decoration: underline;
}

.topcolumn1 .breadcrumb li {
  display: inline;
}

.topcolumn1 .breadcrumb li:nth-child(n+3)::before {
  content: "/";
  padding: 0 6px;
  color: var(--ahh-rule-strong);
}

/* Defensive: force no separator/marker before "Home" regardless of source */
.topcolumn1 .breadcrumb li:nth-child(2)::before,
.topcolumn1 .breadcrumb li:nth-child(2)::marker {
  content: none !important;
  display: none !important;
}
