/*
Theme Name: Cafpheh
Theme URI: https://example.com/cafpheh
Author: Cafpheh
Author URI: https://example.com
Description: Persian (RTL, fa-IR) single-page coffee storefront for Cafpheh (کففه). WooCommerce-powered product carousels, blue product cards, AJAX cart, wishlist, and modals — recreated pixel-perfectly from the Cafpheh v2 design.
Version: 1.18.5
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cafpheh
Tags: e-commerce, one-column, custom-colors, rtl-language-support, translation-ready
WC requires at least: 7.0
*/

/* ====================== Fonts ====================== */
@font-face {
  font-family: "IRNazanin";
  src: url("assets/fonts/IRNazanin.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRNazanin";
  src: url("assets/fonts/IRNazaninBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ====================== Tokens / reset ====================== */
:root {
  --cf-bg: #d3e4ea;
  --cf-card: var(--cf-bg); /* product cards match the page background */
  --cf-brown: #a07a4a;
  --cf-brown-dark: #8a6636;
  --cf-heading: #a3805a;
  --cf-text: #8f6a3d;
  --cf-body2: #9a866a;
  --cf-body3: #a99c82;
  --cf-muted: #b09b7d;
  --cf-light: #eef4f2;
  --cf-light2: #e7ede9;
  --cf-hairline-35: rgba(160, 122, 74, 0.35);
  --cf-hairline-3: rgba(160, 122, 74, 0.3);
  --cf-hairline-4: rgba(160, 122, 74, 0.4);
  --cf-hairline-5: rgba(160, 122, 74, 0.5);
  --cf-hairline-55: rgba(160, 122, 74, 0.55);
  --cf-font: IRNazanin, Tahoma, sans-serif;
  --cf-font-ui: var(--cf-font);
  --cf-item-img: 170px; /* base size of product photos in the carousels (5 fit per row) */
}

@media (max-width: 640px) {
  :root {
    --cf-item-img: 140px;
  } /* keep 3 items fitting on small phones */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cf-bg);
  font-family: var(--cf-font);
  color: var(--cf-text);
}

input,
button,
textarea,
select {
  font-family: inherit;
}

/* One font everywhere: plugin styles (WooCommerce blocks hardcode a
   system-font stack on checkout/cart components) must not override the
   brand font. Icon glyphs are safe — WooCommerce sets those on
   pseudo-elements, which this doesn't reach — and star ratings are
   excluded explicitly. */
.cf-page *:not(.star-rating),
body.cf-embed *:not(.star-rating) {
  font-family: var(--cf-font) !important;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/* ====================== Keyframes (from prototype) ====================== */
@keyframes cf-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes cf-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes cf-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
@keyframes cf-toast {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====================== Page shell ====================== */
.cf-page {
  min-height: 100vh;
  background: var(--cf-bg);
  font-family: var(--cf-font);
  color: var(--cf-text);
  display: flex;
  justify-content: center;
  padding: clamp(10px, 2.4vw, 18px) clamp(10px, 3vw, 16px) 40px;
}

.cf-container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3.4vw, 26px);
}

/* ====================== Header ====================== */
.cf-header {
  position: relative;
  height: clamp(42px, 8vw, 62px);
  background: var(--cf-brown);
  border-radius: clamp(10px, 2.4vw, 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 2.6vw, 20px);
  box-shadow: 0 8px 22px rgba(160, 122, 74, 0.28);
}

/* logo dead-center regardless of the side buttons' widths */
.cf-header-home {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  display: flex;
  align-items: center;
}

.cf-header-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--cf-light);
  display: flex;
  text-decoration: none;
}

.cf-header-logo {
  height: clamp(22px, 5vw, 34px);
  width: auto;
  filter: brightness(0) invert(1) opacity(0.92);
}

.cf-header-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cf-header-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

.cf-cart-btn {
  position: relative;
}

.cf-cart-badge {
  position: absolute;
  top: -2px;
  left: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  background: var(--cf-bg);
  color: var(--cf-brown);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cf-font-ui);
}

.cf-cart-badge.is-empty {
  display: none;
}

/* ====================== Hero ====================== */
.cf-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px 0;
}

.cf-hero-brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.cf-hero-logo {
  height: 110px;
  width: auto;
}

.cf-hero-divider {
  width: 1.5px;
  height: 96px;
  background: var(--cf-hairline-55);
}

.cf-hero-title {
  height: 96px;
  width: auto;
}

@media (max-width: 640px) {
  .cf-hero {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 8px 0 0;
    justify-content: flex-start;
  }
  .cf-hero-brand {
    gap: 0;
  }
  .cf-hero-logo {
    height: 96px;
  }
  .cf-hero-divider {
    display: none;
  }
  .cf-hero-title {
    height: 64px;
  }
}

/* ====================== Product sections ====================== */
.cf-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.cf-section--bag {
  margin-top: 10px;
}

.cf-badge {
  align-self: flex-start;
  margin-right: 4px;
  background: var(--cf-brown);
  box-shadow: inset 0 0 0 1px var(--cf-brown-dark);
  border-radius: 12px;
  padding: 4px 16px;
  color: #d7e4e2;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .cf-badge {
    align-self: center;
  }
}

/* ---------- Carousel row ---------- */
.cf-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.cf-nav {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cf-brown);
  border: none;
  color: var(--cf-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(160, 122, 74, 0.3);
  padding: 0;
}

@media (max-width: 640px) {
  /* Arrows (not dots), bottom-anchored so they line up with the small
     non-selected items: track padding-bottom 30px + half the side-item
     visual height (140px × 0.45 ≈ 63px) − half the button. */
  .cf-carousel {
    align-items: flex-end;
  }
  .cf-nav {
    width: 22px;
    height: 22px;
    margin-bottom: 50px;
    box-shadow: 0 3px 8px rgba(160, 122, 74, 0.3);
  }
  .cf-nav svg {
    display: block;
    width: 10px;
    height: 10px;
  }
}

/* Both sections share one track: bottom-aligned, RTL, 30px gap above the card.
   Item look is decided by the product (photo vs CSS box), not the section. */
.cf-track {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px; /* true visual gap between products (item margins absorb scaling) */
  min-height: clamp(200px, 46vw, 300px);
  perspective: 780px;
  direction: rtl;
  padding-bottom: 30px;
}

@media (max-width: 640px) {
  .cf-track {
    gap: 10px;
  }
}

.cf-item {
  flex: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transform-origin: center bottom;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
}

.cf-item--box {
  filter: drop-shadow(0 14px 12px rgba(60, 50, 30, 0.22));
  transform-style: preserve-3d;
}

.cf-item--photo img {
  width: var(--cf-item-img);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 12px rgba(60, 50, 30, 0.18));
}

/* ---------- CSS 3D box ---------- */
.cf-box3d {
  position: relative;
  width: 56px;
  height: 92px;
  transform-style: preserve-3d;
}

.cf-box3d-front {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 92px;
  border-radius: 4px;
  transform: translateZ(20px);
}

.cf-box3d-front-frame {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(236, 214, 170, 0.55);
  border-radius: 3px;
}

.cf-box3d-front-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.cf-box3d-front-art img {
  width: 30px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.cf-box3d-line1 {
  width: 22px;
  height: 2px;
  background: rgba(236, 214, 170, 0.6);
  border-radius: 2px;
}
.cf-box3d-line2 {
  width: 14px;
  height: 2px;
  background: rgba(236, 214, 170, 0.45);
  border-radius: 2px;
}

.cf-box3d-side {
  position: absolute;
  top: 0;
  left: 8px;
  width: 40px;
  height: 92px;
  border-radius: 4px;
  transform: rotateY(90deg) translateZ(28px);
}

.cf-box3d-side-frame {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(236, 214, 170, 0.3);
  border-radius: 3px;
}

.cf-box3d-top {
  position: absolute;
  top: 26px;
  left: 0;
  width: 56px;
  height: 40px;
  border-radius: 4px;
  transform: rotateX(90deg) translateZ(46px);
}

.cf-box3d-top-frame {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(236, 214, 170, 0.35);
  border-radius: 3px;
}

/* ---------- Notch ----------
   Line-art peak: two 1px edges clipped to the area above the card border,
   so the diagonals land exactly on the line — no filled square that could
   overshoot or mismatch the background color. ::after opens the card's top
   border between the peak's feet. */
.cf-notch {
  display: block;
  position: relative;
  z-index: 2;
  width: 36px;
  height: 20px;
  margin-bottom: -3px;
  overflow: hidden;
  pointer-events: none;
}

.cf-notch::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translateX(-50%) rotate(45deg);
  border-top: 1px solid var(--cf-hairline-35);
  border-left: 1px solid var(--cf-hairline-35);
}

.cf-notch::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 30px;
  height: 3px;
  transform: translateX(-50%);
  background: var(--cf-card);
}

@media (max-width: 640px) {
  .cf-notch {
    display: none;
  }
  .cf-section.is-open .cf-notch {
    display: block;
  }
}

/* ---------- Blue product card (desktop) ---------- */
.cf-card {
  width: 100%;
  background: var(--cf-card);
  border: 1px solid var(--cf-hairline-35);
  border-radius: 44px;
  padding: 30px 34px;
  display: flex;
  gap: 22px;
  align-items: stretch;
}

.cf-card-info {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: 6px;
}

/* spec lines are injected into a wrapper; let them join the flex column */
.cf-card-info [data-cf-specs] {
  display: contents;
}

.cf-card-name {
  margin: 0 0 4px;
  font-family: var(--cf-font);
  font-size: 40px;
  font-weight: 700;
  color: var(--cf-heading);
  line-height: 1.2;
}

.cf-card-spec {
  font-size: 13px;
  color: var(--cf-body3);
  line-height: 1.5;
}

.cf-card-divider {
  flex: none;
  width: 1px;
  background: var(--cf-hairline-3);
}

.cf-card-tasting {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.cf-card-tasting-line {
  font-size: 12.5px;
  color: var(--cf-body3);
  line-height: 1.55;
  font-weight: 300;
}

.cf-card-gallery {
  flex: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-galnav {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--cf-hairline-5);
  background: transparent;
  color: var(--cf-brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cf-galframe {
  flex: 1;
  align-self: stretch;
  min-height: 150px;
  border: 1px solid var(--cf-hairline-4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* box swatch inside the gallery frame */
.cf-galbox {
  width: 46px;
  height: 76px;
  transition: transform 0.35s ease;
  border-radius: 5px;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-galbox img {
  width: 26px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.cf-galimg {
  width: 92px;
  height: auto;
  transition: transform 0.35s ease;
}

/* real gallery photos fill the frame (uncropped) instead of the small prototype size */
.cf-galimg--photo {
  width: auto;
  max-width: 92%;
  max-height: 132px;
  object-fit: contain;
}

/* ---------- Price row (desktop) ---------- */
.cf-pricerow {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.cf-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-brown);
}

.cf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-btn-add {
  height: 32px;
  padding: 0 44px;
  border-radius: 8px;
  background: var(--cf-brown);
  box-shadow: inset 0 0 0 1px #af9a7a;
  border: none;
  color: var(--cf-light2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.cf-btn-add:hover {
  filter: brightness(1.08);
}

.cf-btn-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cf-iconbtn {
  width: 38px;
  height: 32px;
  border-radius: 8px;
  background: var(--cf-brown);
  border: none;
  color: var(--cf-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: filter 0.2s ease;
}

.cf-iconbtn:hover {
  filter: brightness(1.08);
}

.cf-iconbtn.is-liked svg {
  fill: currentColor;
}

.cf-stock {
  font-size: 12px;
  color: var(--cf-muted);
  border: 1px solid var(--cf-hairline-4);
  border-radius: 8px;
  padding: 5px 16px;
}

/* Desktop/mobile card switching */
.cf-card-m {
  display: none;
}

@media (max-width: 640px) {
  .cf-card,
  .cf-pricerow {
    display: none;
  }
  .cf-section.is-open .cf-card-m {
    display: flex;
  }
}

/* ---------- Blue product card (mobile) ---------- */
.cf-card-m {
  width: 100%;
  background: var(--cf-card);
  border: 1px solid var(--cf-hairline-35);
  border-radius: 36px;
  padding: 22px 22px 16px;
  flex-direction: column;
  gap: 12px;
  animation: cf-pop 0.3s ease;
}

.cf-card-m-name {
  margin: 0;
  font-family: var(--cf-font);
  font-size: 30px;
  font-weight: 700;
  color: var(--cf-heading);
  line-height: 1.25;
  text-align: right;
}

.cf-card-m-cols {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.cf-card-m-specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.cf-card-m-specs .cf-card-spec {
  font-size: 12px;
}

.cf-card-m-tasting {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cf-card-m-tasting .cf-card-tasting-line {
  font-size: 11px;
  text-align: right;
}

/* the box card left-aligns its tasting column on mobile (bag card keeps right) */
.cf-section--box .cf-card-m-tasting {
  direction: ltr;
  text-align: left;
}
.cf-section--box .cf-card-m-tasting .cf-card-tasting-line {
  direction: rtl;
  text-align: left;
}

.cf-card-m-galrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cf-card-m-galrow .cf-galnav {
  width: 24px;
  height: 24px;
  flex: none;
}

/* thumb strip scrolls horizontally when a product has many gallery images */
.cf-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cf-thumbs::-webkit-scrollbar {
  display: none;
}

.cf-thumb {
  flex: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s ease;
  padding: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  overflow: hidden;
}

.cf-thumb.is-active {
  width: 62px;
  height: 62px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(90, 70, 40, 0.18);
}

.cf-thumb-box {
  width: 20px;
  height: 33px;
  border-radius: 3px;
}

.cf-thumb img {
  width: 70%;
  height: auto;
}

.cf-card-m-pricerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.cf-card-m-pricecol {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cf-card-m-pricelabel {
  font-size: 10px;
  color: var(--cf-muted);
}

.cf-card-m-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--cf-brown);
}

.cf-card-m-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cf-card-m-actions .cf-btn-add {
  height: 30px;
  padding: 0 20px;
  border-radius: 7px;
  font-size: 11.5px;
  box-shadow: none;
}

.cf-card-m-actions .cf-iconbtn {
  width: 32px;
  height: 30px;
  border-radius: 7px;
}

/* ====================== داستان کففه (درباره‌ی ما) ====================== */
.cf-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: clamp(28px, 7vw, 54px);
}

.cf-story .cf-badge {
  align-self: center;
  margin-right: 0;
}

.cf-story-title {
  margin: 6px 0 0;
  font-family: var(--cf-font);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  color: var(--cf-heading);
  text-align: center;
}

.cf-story-text {
  width: min(660px, 92%);
  font-family: var(--cf-font-ui);
  font-size: 13.5px;
  line-height: 2.5;
  color: var(--cf-body2);
  text-align: justify;
}

.cf-story-text p {
  margin: 0 0 10px;
}
.cf-story-text p:last-child {
  margin-bottom: 0;
}

/* ====================== Footer ====================== */
.cf-footer {
  background: var(--cf-brown);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(160, 122, 74, 0.28);
  color: #d3e0e0;
  margin-top: clamp(20px, 6vw, 46px);
  padding: clamp(22px, 4vw, 30px) clamp(20px, 4vw, 32px) 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cf-footer-main {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
}

.cf-footer-brand {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cf-footer-logo {
  height: 46px;
  width: auto;
  filter: brightness(0) invert(1) opacity(0.92);
}

.cf-footer-wordmark {
  font-family: var(--cf-font);
  font-style: italic;
  font-size: 20px;
  color: var(--cf-light);
}

.cf-footer-contact {
  gap: 12px;
}

.cf-footer-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.cf-footer-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cf-light);
}

.cf-footer-value {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

a.cf-footer-value:hover {
  color: #fff;
}

.cf-footer-links {
  gap: 10px;
  justify-content: center;
}

.cf-footer-badge {
  flex: none;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  align-self: center;
}

.cf-footer-badge img {
  max-width: 100%;
  max-height: 100%;
}

.cf-footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-footer-social-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 6px;
}

.cf-footer-social a {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--cf-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.cf-footer-social a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.cf-footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: right;
}

.cf-footer-link,
.cf-footer-line {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.cf-footer-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  text-align: right;
  transition: color 0.2s ease;
}

.cf-footer-link:hover {
  color: #fff;
}

.cf-footer-widgets {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}

.cf-footer-widgets a {
  color: var(--cf-light);
}

.cf-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}

.cf-footer-copy {
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 640px) {
  .cf-footer-main {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .cf-footer-brand,
  .cf-footer-col {
    align-items: center;
    text-align: center;
  }
  .cf-footer-item,
  .cf-footer-link {
    text-align: center;
  }
  .cf-footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* ====================== Modals ====================== */
.cf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 30, 18, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  animation: cf-fade 0.2s ease;
}

.cf-overlay.is-open {
  display: flex;
}

.cf-overlay--cart,
.cf-overlay--search {
  align-items: flex-start;
  padding: 40px 20px;
  overflow: auto;
}

.cf-modal {
  width: 100%;
  max-width: 420px;
  background: #eaf1f0;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  animation: cf-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--cf-font-ui);
}

.cf-modal--product {
  overflow: hidden;
}
.cf-modal--login {
  max-width: 400px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-modal--cart {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cf-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(160, 122, 74, 0.16);
  color: var(--cf-brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cf-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--cf-heading);
}

/* ---------- Product modal ---------- */
.cf-pm-stage {
  position: relative;
  background: var(--cf-bg);
  padding: 30px 24px 22px;
  display: flex;
  justify-content: center;
}

.cf-pm-stage .cf-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
}

.cf-pm-boxwrap {
  perspective: 700px;
}

.cf-pm-box {
  position: relative;
  width: 72px;
  height: 118px;
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(-24deg);
  animation: cf-float 4s ease-in-out infinite;
}

.cf-pm-box-front {
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 118px;
  border-radius: 5px;
  transform: translateZ(26px);
}
.cf-pm-box-front-frame {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(236, 214, 170, 0.55);
  border-radius: 4px;
}
.cf-pm-box-front-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cf-pm-box-front-art img {
  width: 38px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.cf-pm-box-line {
  width: 28px;
  height: 2px;
  background: rgba(236, 214, 170, 0.6);
  border-radius: 2px;
}
.cf-pm-box-side {
  position: absolute;
  top: 0;
  left: 10px;
  width: 52px;
  height: 118px;
  border-radius: 5px;
  transform: rotateY(90deg) translateZ(36px);
}
.cf-pm-box-top {
  position: absolute;
  top: 33px;
  left: 0;
  width: 72px;
  height: 52px;
  border-radius: 5px;
  transform: rotateX(90deg) translateZ(59px);
}

.cf-pm-img {
  width: 150px;
  height: auto;
  animation: cf-float 4s ease-in-out infinite;
}

.cf-pm-body {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 12px;
}

.cf-pm-name {
  margin: 0;
  font-family: var(--cf-font);
  font-size: 32px;
  font-weight: 700;
  color: var(--cf-heading);
  line-height: 1.2;
}

.cf-pm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.cf-pm-chip {
  font-size: 12px;
  color: var(--cf-text);
  background: rgba(160, 122, 74, 0.12);
  border-radius: 20px;
  padding: 4px 12px;
}

.cf-pm-notes {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--cf-body2);
  font-weight: 300;
}

.cf-pm-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.cf-pm-add {
  height: 46px;
  padding: 0 34px;
  border-radius: 12px;
  background: var(--cf-brown);
  border: none;
  color: var(--cf-light);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.cf-pm-add:hover {
  filter: brightness(1.08);
}

.cf-pm-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--cf-brown);
}

/* ---------- Checkout modal (iframe onto the real Woo checkout) ---------- */
.cf-overlay--checkout {
  padding: 28px 16px;
}

.cf-modal--checkout {
  max-width: 560px;
  height: min(86vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cf-checkout-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(160, 122, 74, 0.18);
}

.cf-checkout-frame {
  border: none;
  width: 100%;
  flex: 1;
  background: #eaf1f0;
}

/* ---------- Login modal ---------- */
.cf-login-hint {
  margin: 0;
  font-size: 13px;
  color: var(--cf-muted);
  text-align: right;
}

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  font-size: 13px;
  color: var(--cf-body2);
}

.cf-field input,
.cf-field textarea {
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(160, 122, 74, 0.32);
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  color: #6f5230;
  text-align: right;
  outline: none;
}

.cf-field textarea {
  height: auto;
  padding: 10px 14px;
  resize: none;
}

.cf-field input:focus,
.cf-field textarea:focus {
  border-color: var(--cf-brown);
}

.cf-login-submit,
.cf-checkout-btn {
  height: 48px;
  border-radius: 12px;
  background: var(--cf-brown);
  border: none;
  color: var(--cf-light);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.cf-login-submit {
  margin-top: 4px;
}

.cf-login-submit:hover,
.cf-checkout-btn:hover {
  filter: brightness(1.08);
}

.cf-login-error {
  margin: 0;
  font-size: 12.5px;
  color: #b0503e;
  text-align: right;
  display: none;
}
.cf-login-error.is-visible {
  display: block;
}

/* OTP steps */
.cf-otp-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-otp-step[hidden] {
  display: none;
}

.cf-otp-code {
  direction: ltr;
  text-align: center !important;
  font-size: 22px !important;
  letter-spacing: 10px;
  font-weight: 700;
}

.cf-otp-devhint {
  margin: 0;
  font-size: 12px;
  color: var(--cf-brown);
  background: rgba(160, 122, 74, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: right;
}

.cf-otp-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cf-otp-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--cf-brown);
  text-decoration: underline;
}

.cf-otp-link:disabled {
  color: var(--cf-muted);
  text-decoration: none;
  cursor: default;
}

/* ---------- Auth panel (ورود | ثبت‌نام, per design) ---------- */
.cf-overlay--auth {
  align-items: flex-start;
  padding: 36px 20px;
  overflow: auto;
}

.cf-modal--auth {
  max-width: 720px;
  padding: 18px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cf-modal--auth .cf-modal-head {
  position: relative;
  justify-content: center;
  min-height: 44px;
}

.cf-modal--auth .cf-modal-close {
  position: absolute;
  right: 0;
  top: 0;
}

.cf-auth-logo {
  height: 44px;
  width: auto;
}

.cf-auth {
  position: relative;
  border: 1.5px solid var(--cf-brown);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 30px);
  margin-top: 12px;
}

/* Top notch */
.cf-auth::before {
  content: "";
  position: absolute;
  top: -12px;
  right: 50%;
  transform: translateX(50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid var(--cf-brown);
}

.cf-auth::after {
  content: "";
  position: absolute;
  top: -9.5px;
  right: 50%;
  transform: translateX(50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--cf-auth-bg, #eaf1f0);
}

.cf-auth-cols {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 4vw, 30px);
}

.cf-auth-div {
  flex: none;
  width: 1px;
  background: rgba(160, 122, 74, 0.45);
}

.cf-auth-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-auth-title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
  color: var(--cf-heading);
  text-align: right;
}

.cf-auth-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cf-auth-view[hidden] {
  display: none;
}

.cf-afield input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid rgba(160, 122, 74, 0.55);
  background: transparent;
  padding: 0 14px;
  font-size: 13.5px;
  font-family: inherit;
  color: #6f5230;
  text-align: right;
  outline: none;
  transition: border-color 0.2s ease;
}

.cf-afield input::placeholder {
  color: rgba(160, 122, 74, 0.75);
}

.cf-afield input:focus {
  border-color: var(--cf-brown);
}

.cf-auth-btn {
  height: 48px;
  border-radius: 12px;
  background: var(--cf-brown);
  border: none;
  color: var(--cf-light);
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.cf-auth-btn:hover {
  filter: brightness(1.08);
}

.cf-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cf-auth-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  color: #8a6f4d;
  transition: color 0.2s ease;
}

.cf-auth-link:hover {
  color: var(--cf-brown);
}

.cf-auth-link:disabled {
  color: var(--cf-muted);
  cursor: default;
}

.cf-auth-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--cf-muted);
  text-align: right;
  line-height: 1.8;
}

.cf-auth-error {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #b0503e;
  text-align: right;
  display: none;
}
.cf-auth-error.is-visible {
  display: block;
}

@media (max-width: 640px) {
  .cf-auth-cols {
    flex-direction: column;
  }
  .cf-auth-div {
    width: 100%;
    height: 1px;
  }
}

/* ---------- حساب کاربری (my-account, per design) ---------- */
[data-cf-modal="account"] .cf-modal--checkout {
  max-width: 960px;
}

.cf-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--cf-font-ui);
}

.cf-account-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Full page: generous like the mockup; popup: compact header strip. */
.cf-account-logo {
  height: 150px !important;
  width: auto;
}

.cf-account-wordmark {
  font-family: var(--cf-font);
  font-style: italic;
  font-size: 24px;
  color: var(--cf-brown);
}

body.cf-embed .cf-account {
  gap: 12px;
}
body.cf-embed .cf-account-brand {
  margin-top: 0;
  gap: 2px;
}
body.cf-embed .cf-account-logo {
  height: 40px;
}
body.cf-embed .cf-account-wordmark {
  font-size: 14px;
}
body.cf-embed .cf-account-namepill {
  padding: 7px 20px;
  font-size: 13.5px;
}

.cf-account--login .cf-auth {
  width: 100%;
}

.cf-account-namepill {
  background: var(--cf-brown);
  color: var(--cf-light);
  border-radius: 12px;
  padding: 9px 24px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(160, 122, 74, 0.3);
}

.cf-account-heads {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
  padding: 4px 28px 0;
}

.cf-account-head {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--cf-heading);
}

.cf-account-panel {
  position: relative;
  width: 100%;
  border: 1.5px solid var(--cf-brown);
  border-radius: 28px;
  padding: 22px 26px 26px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  gap: 0 24px;
}

/* Notch under the first (right) column header */
.cf-account-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  right: calc(16.66% - 4px);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid var(--cf-brown);
}

.cf-account-panel::after {
  content: "";
  position: absolute;
  top: -9.5px;
  right: calc(16.66% - 2px);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--cf-auth-bg, #eaf1f0);
}

.cf-account-div {
  width: 1px;
  background: rgba(160, 122, 74, 0.4);
}

.cf-account-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.cf-account-colhead {
  display: none;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--cf-heading);
  text-align: center;
}

/* ویرایش اطلاعات */
.cf-acc-namerow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-acc-nameinput {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--cf-brown);
  text-align: right;
  outline: none;
}

.cf-acc-nameinput:not([readonly]) {
  border-bottom-color: rgba(160, 122, 74, 0.5);
}

.cf-acc-pencil {
  flex: none;
  background: none;
  border: none;
  color: var(--cf-brown);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.cf-acc-pencil:hover {
  opacity: 1;
}

.cf-acc-label {
  font-size: 12.5px;
  color: var(--cf-body2);
  text-align: right;
  margin-top: 2px;
}

.cf-acc-field {
  position: relative;
  display: flex;
}

.cf-acc-field input {
  width: 100%;
  height: 44px;
  border: 1.5px solid rgba(160, 122, 74, 0.55);
  border-radius: 12px;
  background: transparent;
  padding: 0 14px 0 36px;
  font-size: 13px;
  font-family: inherit;
  color: #6f5230;
  text-align: right;
  outline: none;
  transition: border-color 0.2s ease;
}

.cf-acc-field input:focus {
  border-color: var(--cf-brown);
}

.cf-acc-field input[readonly] {
  color: #8a6f4d;
}

.cf-acc-field .cf-acc-pencil {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.cf-acc-otprow {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cf-acc-otprow[hidden] {
  display: none;
}

.cf-acc-save {
  margin-top: 4px;
  height: 44px;
}
.cf-acc-save[hidden] {
  display: none;
}

.cf-acc-msg {
  margin: 0;
  font-size: 12.5px;
  text-align: right;
  color: var(--cf-brown);
  min-height: 1.2em;
}
.cf-acc-msg.is-error {
  color: #b0503e;
}

/* سفارش‌ها */
.cf-acc-ordergroup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
}

.cf-acc-orderhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--cf-brown);
  padding: 0;
}

.cf-acc-chevron {
  transition: transform 0.25s ease;
}

.cf-acc-ordergroup.is-open .cf-acc-chevron {
  transform: rotate(-90deg);
}

.cf-acc-ordersum {
  margin: 0;
  font-size: 12.5px;
  color: var(--cf-body2);
  text-align: right;
}

.cf-acc-orderlist {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cf-acc-orderlist[hidden] {
  display: none;
}

.cf-acc-orderlist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #6f5230;
  text-decoration: none;
  background: rgba(160, 122, 74, 0.08);
  border-radius: 8px;
  padding: 6px 10px;
  transition: background 0.2s ease;
}

.cf-acc-orderlist a:hover {
  background: rgba(160, 122, 74, 0.18);
}

/* مورد علاقه‌ها */
.cf-acc-favtitle {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cf-brown);
  text-align: center;
}

.cf-acc-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.cf-acc-favarrow {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cf-brown);
  color: var(--cf-light);
  border: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  transition: filter 0.2s ease;
}

.cf-acc-favarrow:hover {
  filter: brightness(1.1);
}

.cf-acc-favstage {
  flex: none;
}

.cf-acc-favitem {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cf-acc-favitem[hidden] {
  display: none;
}

.cf-acc-favvisual {
  width: 118px;
  height: 118px;
  border: 1.5px solid rgba(160, 122, 74, 0.55);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-acc-favvisual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cf-acc-favitem figcaption {
  font-size: 12px;
  color: var(--cf-body2);
  text-align: center;
}

.cf-acc-favempty {
  margin: auto 0;
  font-size: 12.5px;
  color: var(--cf-muted);
  text-align: center;
}

.cf-account-logout {
  font-size: 12.5px;
  color: #b0503e;
}

.cf-account-back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--cf-brown);
}

@media (max-width: 700px) {
  .cf-account-heads {
    display: none;
  }
  .cf-account-colhead {
    display: block;
  }
  .cf-account-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }
  .cf-account-panel::before {
    right: calc(50% - 12px);
  }
  .cf-account-panel::after {
    right: calc(50% - 10px);
  }
  .cf-account-div {
    width: 100%;
    height: 1px;
  }
}

/* ---------- Image lightbox (above every modal) ---------- */
.cf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(25, 18, 8, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  animation: cf-fade 0.2s ease;
}

.cf-lightbox.is-open {
  display: flex;
}

.cf-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

.cf-lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: cf-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Enlarged CSS 3D box for products without photos */
.cf-lightbox-box {
  width: 56px;
  height: 92px;
  transform: scale(3);
  animation: cf-pop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-lightbox-box .cf-box3d {
  animation: cf-float 4s ease-in-out infinite;
}

.cf-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Clickable detail visuals hint the zoom */
.cf-galimg,
.cf-galbox,
.cf-pm-img,
.cf-pm-boxwrap {
  cursor: zoom-in;
}

/* ---------- Menu drawer ---------- */
@keyframes cf-drawer {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}

.cf-overlay--menu {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
}

.cf-drawer {
  width: min(300px, 84vw);
  background: var(--cf-brown);
  color: var(--cf-light);
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  box-shadow: -18px 0 44px rgba(0, 0, 0, 0.28);
  animation: cf-drawer 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 8px;
}

.cf-drawer-logo {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1) opacity(0.92);
}

.cf-drawer-close {
  background: rgba(255, 255, 255, 0.14);
  color: var(--cf-light);
}

.cf-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.cf-menu-list a,
.cf-menu-list button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cf-light);
  font-family: inherit;
  font-size: 15px;
  text-align: right;
  text-decoration: none;
  padding: 13px 4px;
  cursor: pointer;
  transition:
    padding 0.2s ease,
    color 0.2s ease;
}

.cf-menu-list a:hover,
.cf-menu-list button:hover {
  color: #fff;
  padding-right: 10px;
}

.cf-menu-list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 14px 0 0;
}

.cf-drawer-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}

.cf-drawer-phone {
  color: var(--cf-light);
  text-decoration: none;
  font-size: 14px;
  text-align: right;
}

.cf-drawer-tagline {
  line-height: 1.8;
}

/* ---------- Search modal ---------- */
.cf-modal--search {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cf-search-input {
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(160, 122, 74, 0.32);
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  color: #6f5230;
  text-align: right;
  outline: none;
  width: 100%;
}

.cf-search-input:focus {
  border-color: var(--cf-brown);
}

.cf-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh;
  overflow: auto;
}

.cf-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.cf-search-item:hover {
  box-shadow: 0 6px 16px rgba(90, 70, 40, 0.14);
  transform: translateY(-1px);
}

.cf-search-visual {
  flex: none;
  width: 32px;
  height: 42px;
  border-radius: 5px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.cf-search-info {
  flex: 1;
}

.cf-search-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cf-text);
}

.cf-search-meta {
  font-size: 11.5px;
  color: var(--cf-muted);
}

.cf-search-price {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--cf-brown);
}

.cf-search-empty {
  margin: 0;
  text-align: center;
  padding: 18px 0;
  color: var(--cf-muted);
  font-size: 14px;
}

/* ---------- Cart modal ---------- */
.cf-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}

.cf-cart-remove {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: rgba(160, 122, 74, 0.12);
  color: var(--cf-brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cf-cart-line-info {
  flex: 1;
  text-align: right;
}

.cf-cart-line-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cf-text);
}

.cf-cart-line-qty {
  font-size: 12px;
  color: var(--cf-muted);
}

.cf-cart-swatch {
  flex: none;
  width: 32px;
  height: 42px;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
}

.cf-cart-totalrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(160, 122, 74, 0.2);
  padding-top: 14px;
}

.cf-cart-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--cf-brown);
}

.cf-cart-totallabel {
  font-size: 14px;
  color: var(--cf-body2);
}

.cf-cart-address {
  background: rgba(160, 122, 74, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: right;
  font-size: 12px;
  color: var(--cf-body2);
  line-height: 1.7;
}

.cf-cart-empty {
  text-align: center;
  padding: 30px 0;
  color: var(--cf-muted);
  font-size: 14px;
}

.cf-cart-full,
.cf-cart-address {
  display: none;
}
.cf-cart-modal.has-items .cf-cart-full {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-cart-modal.has-items .cf-cart-empty {
  display: none;
}
.cf-cart-modal.has-address .cf-cart-address {
  display: block;
}

/* ====================== Toast ====================== */
.cf-toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cf-brown);
  color: var(--cf-light);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--cf-font-ui);
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  z-index: 70;
  animation: cf-toast 0.3s ease;
  display: none;
}

.cf-toast.is-visible {
  display: block;
}

/* ====================== Inner pages (cart / checkout / my account / blog) ====================== */
.cf-content {
  width: 100%;
  background: #eaf1f0;
  border-radius: 26px;
  padding: clamp(20px, 4vw, 34px);
  font-family: var(--cf-font-ui);
  color: #6f5230;
  box-shadow: 0 18px 44px rgba(90, 70, 40, 0.12);
}

.cf-content h1,
.cf-content h2,
.cf-content h3 {
  font-family: var(--cf-font);
  color: var(--cf-heading);
}

.cf-content a {
  color: var(--cf-brown);
}

.cf-content .button,
.cf-content button[type="submit"],
.cf-content .wc-block-components-button {
  background: var(--cf-brown);
  color: var(--cf-light);
  border: none;
  border-radius: 12px;
}

.cf-content input[type="text"],
.cf-content input[type="email"],
.cf-content input[type="tel"],
.cf-content input[type="password"],
.cf-content textarea,
.cf-content select {
  border: 1px solid rgba(160, 122, 74, 0.32);
  border-radius: 12px;
  background: #fff;
  color: #6f5230;
}

.cf-content table {
  width: 100%;
  border-collapse: collapse;
}

.cf-content th,
.cf-content td {
  padding: 8px;
  border-bottom: 1px solid rgba(160, 122, 74, 0.2);
}

.cf-entry + .cf-entry {
  margin-top: 20px;
}

/* Bare page rendered inside the checkout/account modal iframes */
body.cf-embed {
  background: #eaf1f0;
  padding: 4px 0 12px;
}

.cf-content--embed {
  box-shadow: none;
  border-radius: 0;
  padding: 14px 20px;
  font-size: 15.5px;
  line-height: 2;
}

/* Comfortable type in the popup checkout/cart forms */
.cf-content--embed h3 {
  font-size: 21px;
}

.cf-content--embed label {
  font-size: 15px;
}

.cf-content--embed input[type="text"],
.cf-content--embed input[type="tel"],
.cf-content--embed input[type="email"],
.cf-content--embed input[type="password"],
.cf-content--embed input[type="number"],
.cf-content--embed select,
.cf-content--embed textarea {
  font-size: 15px;
  padding: 8px 12px;
}

.cf-content--embed table,
.cf-content--embed .woocommerce-checkout-review-order {
  font-size: 15px;
}

.cf-content--embed .button,
.cf-content--embed button[type="submit"] {
  font-size: 15.5px;
  padding: 10px 22px;
}

.cf-content--embed .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cf-content--embed .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 6px 14px;
  background: rgba(160, 122, 74, 0.1);
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
}

.cf-content--embed .woocommerce-MyAccount-navigation .is-active a {
  background: var(--cf-brown);
  color: var(--cf-light);
}

.cf-content--embed .woocommerce-MyAccount-content {
  font-size: 13.5px;
  line-height: 1.9;
}

.cf-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-family: var(--cf-font-ui);
}
