:root {
  --espresso: #3B2A24;
  --cream: #E9DFC8;
  --caramel: #A8643A;
  --light: #F7F2E8;
  --page-bg: #F7F2E8;
  --content-max: 1320px;
  --page-gutter: clamp(1rem, 2.7vw, 3rem);
  --text: var(--espresso);
  --text-light: var(--caramel);
  --border: var(--cream);
  --shadow: rgba(59, 42, 36, 0.1);
  --card-border: rgba(59, 42, 36, 0.14);
  --card-shadow: 0 14px 28px rgba(59, 42, 36, 0.065);
  --white: var(--light);
  --espresso-soft: var(--espresso);
  --cream-soft: var(--light);
  --caramel-dark: var(--espresso);
  --caramel-soft: var(--caramel);
  --focus: rgba(168, 100, 58, 0.24);

  --card-bg: var(--cream);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-body, Arial, sans-serif);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display, Georgia, serif);
  color: var(--espresso);
  line-height: 1.3;
}

h1 { font-size: clamp(2.1rem, 3.2vw, 3.4rem); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.55rem, 2.1vw, 2.05rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.18rem; margin-bottom: 0.25rem; }

h1, h2 {
  letter-spacing: 0;
}

a {
  color: var(--caramel);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--espresso);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

main,
section,
article,
aside,
div,
form,
table {
  min-width: 0;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

td,
th,
p,
a,
span,
strong,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

p {
  margin-bottom: 0.75rem;
}

.container {
  width: 100%;
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.text-center {
  text-align: center;
  margin-top: 2rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 700px;
  line-height: 1.75;
}

/* Navigation */
.site-header {
  background: rgba(59, 42, 36, 0.97);
  border-bottom: 1px solid rgba(233, 223, 200, 0.18);
  box-shadow: 0 8px 22px rgba(59, 42, 36, 0.18);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav {
  width: 100%;
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.5rem;
  color: var(--cream) !important;
  font-weight: bold;
  letter-spacing: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cream);
  font-size: 0.95rem;
  padding: 0.35rem 0;
  opacity: 0.88;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--light);
  color: var(--caramel);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.nav-links a:hover {
  color: var(--white);
  opacity: 1;
}

.nav-login {
  border: 1px solid rgba(233, 223, 200, 0.7);
  padding: 0.35rem 0.85rem !important;
  border-radius: 999px;
}

/* Hero */
.hero {
  background: var(--cream);
  padding: 5rem var(--page-gutter) 3rem;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  width: min(var(--content-max), 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  color: #3a241c;
}

.hero-text p {
  font-size: 1.2rem;
  color: #6f3f2a;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.hero-image img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  box-shadow: 0 16px 32px rgba(59, 42, 36, 0.1);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.hero + .section .container {
  text-align: center;
}

.hero + .section .container .lead {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-light {
  --card-bg: var(--light);
  background: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.75rem;
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn .hgi-stroke,
.btn-cart .hgi-stroke,
.remove-cart-btn .hgi-stroke,
.back-link .hgi-stroke,
.filter-reset .hgi-stroke {
  font-size: 1.05em;
  flex: 0 0 auto;
}

.btn-primary {
  background: linear-gradient(180deg, var(--caramel-soft), var(--caramel));
  color: var(--light);
  box-shadow: 0 10px 22px rgba(168, 100, 58, 0.22);
}

.btn-primary:hover {
  background: var(--caramel-dark);
  color: var(--light);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(168, 100, 58, 0.28);
}

.btn-secondary {
  background: transparent;
  color: #3a241c;
  border-color: #3a241c;
}

.btn-secondary:hover {
  background: #3a241c;
  color: #f8f1e7;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(59, 42, 36, 0.18);
}

.recommendation .btn-secondary {
  color: var(--espresso);
  border-color: var(--caramel);
  background: transparent;
}

.recommendation .btn-secondary:hover {
  background: var(--caramel);
  color: var(--light);
}

.btn-small {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  background: var(--caramel);
  color: var(--light);
  border-radius: 6px;
}

.btn-small:hover {
  background: var(--caramel-dark);
  color: var(--light);
}

/* Section header with button */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.25rem;
}

.home-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  background: var(--cream);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  border-color: var(--caramel);
  box-shadow: 0 18px 34px rgba(59, 42, 36, 0.1);
  transform: translateY(-3px);
}

.product-card-name {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  color: var(--espresso);
  margin-bottom: 0.45rem;
  display: block;
  text-decoration: none;
  font-weight: bold;
}

.product-card-name:hover {
  color: var(--caramel);
}

.product-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 0.8rem;
  background: var(--cream);
  display: block;
  border: 1px solid var(--card-border);
}

.product-card-image:hover {
  opacity: 0.9;
}

.product-info {
  display: grid;
  gap: 0.34rem;
  margin-bottom: 1rem;
}

.product-info p {
  margin: 0;
  font-size: 0.9rem;
}

.product-detail-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
}

.product-detail-line .hgi-stroke {
  color: var(--caramel);
  font-size: 0.95rem;
  line-height: 1;
}

.product-detail-line span {
  min-width: 0;
}

.product-origin {
  color: var(--caramel);
}

.product-taste {
  color: var(--caramel);
}

.product-meta {
  color: var(--caramel);
  font-size: 0.9rem;
}

.product-card-footer {
  display: grid;
  grid-template-columns: minmax(72px, 25%) minmax(0, 10%) minmax(130px, 65%);
  align-items: stretch;
  margin-top: auto;
  padding-top: 0.95rem;
}

.product-price {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--espresso);
  white-space: nowrap;
}

.product-card-footer .btn-cart {
  grid-column: 3;
  width: 100%;
  min-height: 44px;
}

.product-card-footer .product-unavailable {
  grid-column: 3;
  align-self: center;
  justify-self: stretch;
  text-align: center;
}

.btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.9rem;
  font-size: 0.8rem;
  background: var(--caramel);
  color: var(--light);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(168, 100, 58, 0.18);
  white-space: nowrap;
}

.btn-cart:hover {
  background: var(--caramel-dark);
  color: var(--light);
  transform: translateY(-1px);
}

.product-available {
  color: var(--caramel);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-unavailable {
  color: var(--espresso);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Product detail */
.product-detail-section {
  padding-top: 2rem;
  background: transparent;
}

.product-detail-container {
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 1rem;
}

.product-detail-commerce {
  grid-template-columns: minmax(380px, 0.95fr) minmax(500px, 1.05fr) minmax(310px, 0.62fr);
  gap: clamp(1.7rem, 3vw, 3.6rem);
  align-items: start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  color: var(--caramel);
  font-size: 0.95rem;
  font-weight: 600;
}

.product-gallery {
  min-width: 0;
}

.product-detail-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 18px 38px rgba(59, 42, 36, 0.1);
}

.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.product-thumbnail {
  width: 100%;
  aspect-ratio: 1.28 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.product-thumbnail.is-active {
  border-color: var(--caramel);
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-detail-info {
  min-width: 0;
  padding-top: 0.15rem;
}

.product-detail-origin {
  color: var(--caramel);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.product-detail-info h1 {
  font-size: clamp(2.4rem, 3.2vw, 3.35rem);
  line-height: 1.08;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

.product-detail-info h2 {
  font-size: 1.38rem;
  margin-top: 2.2rem;
  margin-bottom: 0.65rem;
}

.product-tagline {
  color: var(--caramel);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.product-description {
  color: var(--espresso);
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 1.7rem;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.product-table {
  background: transparent;
  border: 0;
}

.product-table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(59, 42, 36, 0.13);
}

.product-table td:first-child {
  font-weight: 600;
  color: var(--espresso);
  width: 48%;
}

.product-table tbody tr:hover {
  background: transparent;
}

.coffee-profile {
  margin: 1.6rem 0 0;
}

.coffee-profile h2 {
  margin-bottom: 1.05rem;
}

.profile-row {
  display: grid;
  grid-template-columns: 22px 86px minmax(0, 1fr) 42px;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.85rem;
  color: var(--espresso);
}

.profile-row:last-child {
  margin-bottom: 0;
}

.profile-label,
.profile-value {
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-icon {
  width: 20px;
  color: var(--espresso);
  font-size: 1rem;
  text-align: center;
  line-height: 1;
}

.profile-icon .hgi-stroke {
  font-size: 1rem;
}

.profile-track {
  height: 8px;
  background: rgba(233, 223, 200, 0.72);
  border-radius: 999px;
  overflow: hidden;
}

.profile-fill {
  display: block;
  height: 100%;
  background: var(--caramel);
  border-radius: inherit;
}

.preparation-note p {
  line-height: 1.75;
  margin-bottom: 0;
}

.purchase-box {
  position: sticky;
  top: 6rem;
  background: rgba(247, 242, 232, 0.72);
  border: 1px solid rgba(59, 42, 36, 0.14);
  border-radius: 8px;
  padding: 2.15rem 1.8rem 1.45rem;
  box-shadow: 0 18px 36px rgba(59, 42, 36, 0.06);
  backdrop-filter: blur(4px);
}

.purchase-price {
  color: var(--espresso);
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(2.2rem, 3.8vw, 3.05rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.purchase-tax {
  color: var(--espresso);
  font-size: 0.9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(59, 42, 36, 0.12);
}

.delivery-info {
  display: grid;
  gap: 0.45rem;
  margin: 1.25rem 0;
  padding: 1.25rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(59, 42, 36, 0.12);
  border-radius: 0;
  color: var(--espresso);
  font-size: 0.9rem;
}

.delivery-info strong {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.delivery-info strong span {
  padding-left: 0;
}

.delivery-info > span {
  padding-left: 1.45rem;
}

.purchase-box .product-available,
.purchase-box .product-unavailable {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0;
  margin: 0;
  border-bottom: 1px solid rgba(59, 42, 36, 0.12);
  font-size: 0.95rem;
}

.purchase-box .product-available {
  color: var(--caramel);
}

.purchase-box .product-unavailable {
  color: var(--espresso);
}

.purchase-box .add-to-cart {
  display: grid;
  align-items: stretch;
  gap: 0.7rem;
  margin-top: 1.3rem;
  width: 100%;
}

.purchase-box .add-to-cart label {
  font-size: 0.82rem;
  font-weight: 800;
}

.purchase-actions {
  display: grid;
  grid-template-columns: minmax(106px, 30%) minmax(0, 70%);
  gap: 0.55rem;
  align-items: center;
  width: 100%;
}

.quantity-control {
  display: grid;
  grid-template-columns: 28px minmax(42px, 1fr) 28px;
  align-items: center;
  height: 44px;
  border: 1px solid rgba(59, 42, 36, 0.16);
  border-radius: 7px;
  background: rgba(247, 242, 232, 0.72);
  overflow: hidden;
  max-width: none;
}

.quantity-step {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
  font-size: 1rem;
}

.quantity-step:hover {
  color: var(--caramel);
}

.quantity-control .qty-input {
  width: 100%;
  min-width: 42px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--espresso);
  font-size: 0.92rem;
  text-align: center;
  appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.purchase-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.7rem 0.5rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.product-add-btn {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-link-after-add {
  display: none;
  width: 100%;
  margin-top: 0.15rem;
}

.add-to-cart.is-added .cart-link-after-add {
  display: inline-flex;
}

.quantity-notice {
  display: none;
  color: var(--caramel);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.15rem 0 0;
}

.quantity-notice.is-visible {
  display: block;
}

.secure-payment {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.7rem 0 0;
  color: rgba(59, 42, 36, 0.74);
  font-size: 0.84rem;
}

.btn-outline {
  background: transparent;
  border-color: var(--caramel);
  color: var(--espresso);
}

.btn-outline:hover {
  background: var(--espresso);
  color: var(--light);
}

/* Filter form */
.filter-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--card-bg);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 26px var(--shadow);
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.filter-group select,
.filter-group input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: rgba(247, 242, 232, 0.88);
  min-width: 140px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.shop-sidebar {
  position: sticky;
  top: 6rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.shop-sidebar h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.filter-form-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.filter-form-sidebar .filter-group {
  width: 100%;
}

.filter-form-sidebar select,
.filter-form-sidebar input {
  width: 100%;
  min-width: 0;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(168, 100, 58, 0.58);
  border-radius: 7px;
  background: rgba(247, 242, 232, 0.58);
  color: var(--espresso);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.filter-reset:hover {
  background: var(--espresso);
  color: var(--cream);
}

.shop-sidebar h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.shop-products {
  min-width: 0;
}

.shop-results-bar {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--espresso);
  box-shadow: none;
}

.shop-results-bar strong {
  color: var(--caramel);
  font-size: 1.4rem;
}

.shop-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  justify-content: start;
  align-items: start;
}

.empty-state {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Blog */
.blog-section {
  padding-top: 3rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.8rem;
  max-width: 100%;
}

.blog-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(168, 100, 58, 0.36);
  border-radius: 999px;
  color: var(--espresso);
  font-weight: 700;
  background: rgba(247, 242, 232, 0.82);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.blog-filters a:hover,
.blog-filters a.is-active {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--light);
}

.blog-filters a:hover {
  transform: translateY(-1px);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.home-blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.blog-card-full {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-card-full:hover {
  transform: translateY(-3px);
  border-color: var(--caramel);
  box-shadow: 0 18px 34px rgba(59, 42, 36, 0.1);
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.3rem;
  width: 100%;
}

.blog-card-image-link {
  display: block;
  overflow: hidden;
  background: var(--espresso);
}

.blog-card-image {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.blog-card-full:hover .blog-card-image {
  transform: scale(1.03);
}

.blog-card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: 1.1rem 1.15rem 1.25rem;
}

.blog-card-full h2 {
  font-size: clamp(1.2rem, 1.45vw, 1.45rem);
  margin-bottom: 0.65rem;
  line-height: 1.18;
}

.blog-card-full h2 a {
  color: var(--espresso);
}

.blog-card-full h2 a:hover {
  color: var(--caramel);
}

.blog-excerpt {
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.article-meta {
  color: var(--caramel);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-style: normal;
}

.article-meta span {
  margin: 0 0.35rem;
}

.blog-read-link {
  align-self: end;
  color: var(--caramel);
  font-weight: 800;
  font-size: 0.92rem;
}

.blog-read-link:hover {
  color: var(--espresso);
}

.blog-empty-state {
  margin-top: 2rem;
}

.article-coffee-info {
  background: rgba(247, 242, 232, 0.62);
  border-left: 3px solid var(--caramel);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.article-content p {
  line-height: 1.8;
}

.article-detail {
  max-width: 780px;
  margin: 0 auto;
}

.article-detail-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 1.75rem;
  box-shadow: var(--card-shadow);
}

.article-detail h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 0.75rem;
}

.article-detail .article-content {
  margin-top: 1.5rem;
}

/* Coffee Finder */
.finder-section {
  padding-top: 3rem;
}

.finder-container {
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
}

.finder-intro {
  max-width: 620px;
}

.finder-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem 1rem;
  width: 100%;
  margin: 0 0 1.45rem;
  color: var(--espresso);
  font-size: 0.9rem;
  font-weight: 700;
}

.finder-progress strong {
  color: var(--caramel);
}

.finder-progress-track {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  background: var(--cream);
  border-radius: 999px;
}

.finder-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--caramel);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.finder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(1.6rem, 3vw, 3.2rem);
  align-items: start;
  margin-top: 1.9rem;
}

.coffee-finder-form {
  max-width: none;
  margin: 0;
}

.finder-steps {
  display: grid;
  gap: 0.2rem;
}

.finder-question {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.finder-question summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 0.75rem;
  align-items: center;
  min-height: 62px;
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
}

.finder-question summary::-webkit-details-marker {
  display: none;
}

.finder-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--espresso);
  font-weight: 800;
}

.finder-question[open] .finder-step-number {
  background: var(--caramel);
  color: var(--light);
}

.finder-question summary h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
}

.finder-question summary > .hgi-stroke {
  color: var(--caramel);
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.finder-question[open] summary > .hgi-stroke {
  transform: rotate(180deg);
}

.finder-options {
  padding: 0 0 1.1rem 3.1rem;
}

.finder-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.finder-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.finder-choice {
  position: relative;
  cursor: pointer;
}

.finder-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: transparent;
  color: var(--espresso);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.finder-choice input:checked + span {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--light);
}

.finder-actions {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  padding-top: 1.15rem;
}

.finder-actions .btn {
  width: min(340px, 100%);
}

.finder-actions p {
  color: rgba(59, 42, 36, 0.68);
  font-size: 0.85rem;
}

.finder-side-panel {
  position: sticky;
  top: 6rem;
  min-height: 360px;
  padding: 0.4rem 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.finder-side-image {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 8px;
  border: 0;
  margin-bottom: 1.25rem;
}

.finder-product-card {
  margin-top: 1rem;
}

.finder-product-link {
  text-decoration: none;
}

.finder-retry-link {
  width: 100%;
  margin-top: 0.85rem;
  background: transparent;
  border-color: var(--caramel);
  color: var(--espresso);
}

.finder-retry-link:hover {
  background: var(--espresso);
  color: var(--cream);
}

.finder-placeholder {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(168, 100, 58, 0.28);
}

.finder-placeholder .hgi-stroke {
  font-size: clamp(4rem, 8vw, 6rem);
}

.finder-side-panel h2 {
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  margin-bottom: 0.45rem;
}

.finder-side-panel h3 {
  font-size: 1.3rem;
  margin: 0.8rem 0 0.4rem;
}

.finder-panel-accent {
  width: 52px;
  height: 2px;
  margin: 0.7rem 0 1.2rem;
  background: var(--caramel);
}

.finder-benefits {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
}

.finder-benefits > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.finder-benefits .hgi-stroke {
  color: var(--caramel);
  font-size: 1.5rem;
}

.recommendation-card {
  max-width: 350px;
  margin: 1.5rem auto;
  box-shadow: 0 4px 16px var(--shadow);
  background: var(--card-bg);
}

/* Login */
.login-form {
  max-width: 400px;
  margin: 2rem auto;
  background: var(--card-bg);
  padding: 2rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px var(--shadow);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: rgba(247, 242, 232, 0.88);
}

.form-group input:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 2px rgba(168, 100, 58, 0.15);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-align: center;
}

.alert-error {
  background: var(--cream);
  color: var(--espresso);
  border: 1px solid var(--caramel);
}

.demo-hint {
  max-width: 400px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

.demo-hint code {
  background: var(--card-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.demo-accounts {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
}

.demo-accounts p {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.demo-table {
  margin: 1rem auto;
  border-collapse: collapse;
}

.demo-table th,
.demo-table td {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.demo-table th {
  background: var(--card-bg);
  color: var(--espresso);
}

/* Role cards */
.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.role-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 26px var(--shadow);
  text-align: center;
}

.role-card h4 {
  color: var(--caramel);
  margin-bottom: 0.5rem;
}

.role-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Admin */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.75rem 2rem;
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--caramel);
  margin-bottom: 0.2rem;
}

.stat-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-card-header h2 {
  margin: 0;
}

.admin-table-wrapper {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table th {
  background: transparent;
  color: var(--espresso);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table th:last-child {
  width: 1%;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-table td:last-child {
  white-space: nowrap;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: rgba(233, 223, 200, 0.35);
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  line-height: 1.4;
  min-width: 80px;
}

.admin-action-btn-edit {
  background: transparent;
  color: var(--caramel);
  border-color: var(--caramel);
}

.admin-action-btn-edit:hover {
  background: var(--caramel);
  color: var(--light);
}

.admin-action-btn-delete {
  background: #b8453a;
  color: var(--light);
  border-color: #b8453a;
}

.admin-action-btn-delete:hover {
  background: #9a352b;
  border-color: #9a352b;
}

.admin-action-btn-status {
  background: transparent;
  color: var(--espresso);
  border-color: var(--espresso);
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  min-width: auto;
}

.admin-action-btn-status:hover {
  background: var(--espresso);
  color: var(--light);
}

.admin-section-title {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Add to cart */
.add-to-cart {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.qty-input {
  width: 60px;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
  background: rgba(247, 242, 232, 0.88);
}

.qty-input:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 2px rgba(168, 100, 58, 0.15);
}

/* Cart summary */
.cart-summary {
  margin-bottom: 2rem;
}

.cart-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 2rem;
  align-items: start;
  margin-top: 0.5rem;
}

.cart-items-panel,
.order-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.cart-panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.cart-panel-heading h1,
.order-summary h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  margin-bottom: 0;
}

.cart-panel-heading span {
  color: var(--caramel);
  font-weight: 800;
  white-space: nowrap;
}

.cart-items {
  display: grid;
  gap: 0.55rem;
}

.cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(150px, 1fr) 126px 102px 108px;
  gap: 0.9rem;
  align-items: start;
  min-height: 128px;
  background: rgba(247, 242, 232, 0.82);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.9rem 3.25rem 0.9rem 0.9rem;
  box-shadow: 0 14px 28px rgba(59, 42, 36, 0.06);
}

.cart-item-image {
  width: 112px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(59, 42, 36, 0.12);
}

.cart-item-info h3 {
  font-size: 1.18rem;
  margin-bottom: 0.45rem;
}

.cart-item-info p {
  color: rgba(59, 42, 36, 0.82);
  font-size: 0.92rem;
  margin-bottom: 0.28rem;
}

.cart-item-info p + p {
  color: var(--caramel);
}

.cart-quantity-cell,
.cart-price-cell,
.cart-total-cell {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding-top: 0.1rem;
}

.cart-cell-label {
  color: rgba(59, 42, 36, 0.86);
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.88rem;
  font-weight: 700;
}

.cart-item-quantity {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 116px;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(59, 42, 36, 0.16);
  border-radius: 8px;
  background: var(--light);
  box-shadow: 0 12px 22px rgba(59, 42, 36, 0.07);
}

.cart-item-quantity button {
  min-width: 34px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.cart-item-quantity button:hover:not(:disabled) {
  background: var(--cream);
  color: var(--caramel);
}

.cart-item-quantity button:disabled {
  color: rgba(59, 42, 36, 0.3);
  cursor: not-allowed;
}

.cart-item-quantity span {
  min-width: 2ch;
  color: var(--espresso);
  font-weight: 700;
  text-align: center;
}

.cart-price-cell {
  color: rgba(59, 42, 36, 0.78);
  font-size: 0.86rem;
  white-space: nowrap;
}

.cart-total-cell strong {
  color: var(--caramel);
  font-size: 1.24rem;
}

.cart-remove-form {
  position: absolute;
  top: 0.95rem;
  right: 0.75rem;
}

.remove-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  background: var(--light);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--caramel);
  cursor: pointer;
  font-family: var(--font-body, Arial, sans-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(59, 42, 36, 0.08);
}

.remove-cart-btn:hover {
  background: rgba(168, 100, 58, 0.12);
  color: var(--caramel);
}

.cart-continue-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.15rem;
  color: var(--caramel);
  font-weight: 700;
}

.cart-continue-link:hover {
  color: var(--espresso);
}

.order-summary {
  position: sticky;
  top: 6rem;
  display: block;
  align-self: start;
  margin-top: 4.1rem;
  border: 0;
  padding: 0;
  background: transparent;
}

.summary-card {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.2rem;
  background: var(--cream);
  box-shadow: 0 14px 28px rgba(59, 42, 36, 0.055);
}

.summary-card h2,
.order-summary .checkout-form h2 {
  font-size: 1.6rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(59, 42, 36, 0.14);
  color: var(--espresso);
}

.summary-total {
  margin-top: 0.3rem;
  border-bottom: 0;
  font-size: 1.15rem;
  padding-bottom: 0;
}

.summary-total strong {
  color: var(--caramel);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px var(--shadow);
  margin-top: 1rem;
}

.cart-table th {
  background: var(--espresso);
  color: var(--cream);
  padding: 0.75rem 1rem;
  text-align: left;
}

.cart-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-table tfoot td {
  font-size: 1.1rem;
  border-top: 2px solid var(--caramel);
}

.cart-table tbody tr:hover {
  background: var(--light);
}

/* Checkout */
.checkout-form {
  max-width: 600px;
  margin: 2rem 0;
  background: var(--card-bg);
  padding: 2rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px var(--shadow);
}

.order-summary .checkout-form {
  max-width: none;
  margin: 1rem 0 0;
  padding: 1.2rem;
  background: var(--cream);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(59, 42, 36, 0.055);
}

.order-summary .checkout-form h2 {
  margin-bottom: 1rem;
}

.checkout-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkout-form .form-group {
  margin-bottom: 0.9rem;
}

.checkout-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.checkout-form input {
  width: 100%;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: rgba(247, 242, 232, 0.88);
}

.checkout-form input:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 2px rgba(168, 100, 58, 0.15);
}

.checkout-success {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px var(--shadow);
}

.checkout-success h1 {
  color: var(--caramel);
}

.cart-summary h2 {
  margin-bottom: 0;
}

.btn-full {
  width: 100%;
}

/* Not found */
.not-found-section {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.not-found {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.not-found .lead {
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  background: var(--espresso);
  color: var(--cream);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(233, 223, 200, 0.16);
}

.footer-content {
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-column h2,
.footer-column h3 {
  color: var(--cream);
  margin-bottom: 0.55rem;
}

.footer-column h2 {
  font-size: 1.55rem;
}

.footer-column h3 {
  font-size: 1.05rem;
}

.footer-column a {
  color: var(--cream);
  opacity: 0.86;
}

.footer-column a:hover {
  color: var(--caramel);
  opacity: 1;
}

.footer-content p {
  font-size: 0.9rem;
  color: var(--light);
  opacity: 0.86;
  margin-bottom: 0.25rem;
}

.footer-bottom {
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
  margin: 2rem auto 0;
  padding: 1rem var(--page-gutter) 0;
  border-top: 1px solid rgba(233, 223, 200, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: var(--light);
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
  .product-detail-commerce {
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  }

  .purchase-box {
    grid-column: 1 / -1;
    position: static;
    max-width: 520px;
    justify-self: center;
  }
}

@media (max-width: 1400px) {
  .purchase-actions .btn {
    white-space: normal;
  }
}

@media (max-width: 1100px) {
  .home-product-grid,
  .home-blog-grid,
  .blog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html { font-size: 14px; }

  .nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links {
    justify-content: center;
    gap: 1rem;
  }

  .hero {
    padding: 3rem var(--page-gutter);
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image img {
    height: 320px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .shop-layout,
  .cart-page,
  .product-detail-commerce,
  .finder-layout,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .finder-progress {
    width: 100%;
  }

  .shop-sidebar,
  .purchase-box,
  .finder-side-panel,
  .order-summary {
    position: static;
    margin-top: 2rem;
  }

  .cart-item {
    grid-template-columns: 96px minmax(0, 1fr) 132px;
    gap: 0.85rem;
    min-height: auto;
    padding: 0.9rem 2.45rem 0.9rem 0.9rem;
  }

  .cart-item-image {
    width: 96px;
  }

  .cart-item-quantity {
    width: 126px;
  }

  .cart-quantity-cell {
    grid-column: 3;
    grid-row: 1;
  }

  .cart-price-cell {
    grid-column: 2;
    grid-row: 2;
    justify-items: start;
  }

  .cart-total-cell {
    grid-column: 3;
    grid-row: 2;
  }

  .cart-remove-form {
    top: 0.45rem;
    right: 0.45rem;
  }

  .order-summary {
    position: static;
  }

  .purchase-box {
    width: 100%;
    max-width: none;
  }

  .role-cards {
    grid-template-columns: 1fr;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .home-blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-filters {
    gap: 0.45rem;
  }

  .checkout-form .form-row {
    grid-template-columns: 1fr;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* Admin Forms */
.admin-form {
  max-width: 900px;
}

.admin-form fieldset {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  min-width: 0;
}

.admin-form fieldset:last-of-type {
  margin-bottom: 0;
}

.admin-form legend {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--espresso);
  padding: 0 0.4rem;
  margin-bottom: 0.65rem;
}

.admin-form .form-group {
  margin-bottom: 1rem;
}

.admin-form .form-group:last-child {
  margin-bottom: 0;
}

.admin-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 0.92rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.68rem 0.8rem;
  border: 1px solid rgba(59, 42, 36, 0.18);
  border-radius: 6px;
  font-size: 0.95rem;
  background: rgba(247, 242, 232, 0.88);
  color: var(--espresso);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 2px rgba(168, 100, 58, 0.15);
}

.admin-form textarea {
  resize: vertical;
  line-height: 1.6;
  background: rgba(247, 242, 232, 0.72);
}

.admin-form select {
  cursor: pointer;
  appearance: auto;
}

.admin-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-form .form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.admin-form .form-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

.admin-form .images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.admin-form .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.admin-form .form-actions .btn {
  min-height: 46px;
}

/* Admin action button spacing */
.admin-action-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.admin-action-group .admin-action-btn {
  min-height: 34px;
}

@media (max-width: 768px) {
  .admin-form .form-row,
  .admin-form .form-row-3,
  .admin-form .form-row-4,
  .admin-form .images-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }

  .hero-image img {
    height: 220px;
  }

  .finder-question summary {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
  }

  .finder-options {
    padding: 0 1rem 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .home-product-grid {
    grid-template-columns: 1fr;
  }

  .shop-product-grid {
    grid-template-columns: 1fr;
  }

  .product-card-footer {
    grid-template-columns: max-content minmax(130px, 1fr);
    gap: 0.65rem;
    align-items: center;
  }

  .product-card-footer .btn-cart {
    grid-column: 2;
  }

  .product-card-footer .product-unavailable {
    grid-column: 2;
  }

  .cart-item {
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: start;
    padding-right: 2.3rem;
  }

  .cart-item-image {
    width: 78px;
  }

  .cart-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .cart-item-quantity {
    width: 104px;
    min-height: 36px;
  }

  .cart-item-quantity button {
    min-width: 30px;
    height: 36px;
    font-size: 1.15rem;
  }

  .cart-quantity-cell {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-items: start;
  }

  .cart-price-cell,
  .cart-total-cell {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-items: start;
    white-space: normal;
  }

  .cart-remove-form {
    top: 0.4rem;
    right: 0.4rem;
  }

  .remove-cart-btn {
    width: 28px;
  }

  .order-summary {
    grid-template-columns: 1fr;
  }

  .profile-row {
    grid-template-columns: 20px 72px minmax(0, 1fr) 38px;
    gap: 0.5rem;
  }

  .purchase-actions {
    grid-template-columns: minmax(118px, 0.42fr) minmax(0, 0.58fr);
  }
}

@media (max-width: 900px) {
  :root {
    --page-gutter: clamp(1rem, 4vw, 2rem);
  }

  .nav {
    justify-content: center;
  }

  .nav-logo {
    text-align: center;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    row-gap: 0.45rem;
    column-gap: 0.9rem;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 0.32rem 0;
  }

  .hero-text h1 {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .section {
    padding: 3rem 0;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: static;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(59, 42, 36, 0.12);
  }

  .filter-form-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .filter-form-sidebar .btn,
  .filter-form-sidebar .filter-reset {
    width: 100%;
  }

  .product-detail-commerce {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-description {
    max-width: none;
  }

  .purchase-box {
    width: 100%;
    max-width: none;
  }

  .cart-page {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
    margin-top: 1.5rem;
  }

  .finder-layout {
    grid-template-columns: 1fr;
  }

  .finder-side-panel {
    position: static;
    min-height: 0;
  }

  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .home-product-grid,
  .shop-product-grid,
  .home-blog-grid,
  .blog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .site-header {
    padding: 0.65rem 0;
  }

  .nav {
    align-items: stretch;
    gap: 0.55rem;
  }

  .nav-logo {
    width: 100%;
    font-size: clamp(1.2rem, 6vw, 1.45rem);
    line-height: 1.2;
  }

  .nav-links {
    column-gap: 0.55rem;
    row-gap: 0.35rem;
  }

  .nav-links li {
    display: flex;
  }

  .nav-links a {
    min-height: 34px;
    padding: 0.28rem 0.35rem;
    font-size: 0.84rem;
    line-height: 1.15;
  }

  .nav-login {
    padding: 0.32rem 0.65rem !important;
  }

  .cart-count {
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.7rem;
  }

  .container {
    padding: 0 var(--page-gutter);
  }

  .lead {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
  }

  .not-found-section {
    min-height: calc(100svh - 128px);
    padding: 2.5rem 0;
  }

  .not-found .btn {
    width: min(260px, 100%);
  }

  .hero {
    padding: 2.3rem var(--page-gutter);
  }

  .hero-text {
    gap: 0.9rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .section-header,
  .admin-form .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-header .btn,
  .admin-form .form-actions .btn {
    width: 100%;
  }

  .hero-buttons {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-buttons .btn {
    width: 100%;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .product-grid,
  .home-product-grid,
  .shop-product-grid,
  .blog-grid,
  .home-blog-grid,
  .blog-list {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem 0.65rem;
  }

  .stat-card h3 {
    font-size: 2rem;
  }

  .stat-card p {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .shop-product-grid {
    justify-content: stretch;
  }

  .filter-form-sidebar {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 1rem;
  }

  .product-card-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .product-card-footer {
    grid-template-columns: max-content minmax(130px, 1fr);
    gap: 0.65rem;
    align-items: center;
  }

  .product-card-footer .btn-cart,
  .product-card-footer .product-unavailable {
    grid-column: 2;
  }

  .btn-cart {
    width: 100%;
    white-space: normal;
  }

  .product-detail-info h1 {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }

  .product-thumbnails {
    gap: 0.55rem;
  }

  .profile-row {
    grid-template-columns: 20px minmax(62px, auto) minmax(0, 1fr) 36px;
    gap: 0.45rem;
  }

  .purchase-box {
    padding: 1.35rem 1rem;
  }

  .purchase-actions {
    grid-template-columns: minmax(118px, 0.42fr) minmax(0, 0.58fr);
  }

  .quantity-control {
    width: 100%;
  }

  .purchase-actions .btn {
    white-space: normal;
  }

  .blog-filters {
    gap: 0.4rem;
  }

  .blog-filters a {
    min-height: 36px;
    padding: 0.42rem 0.72rem;
    font-size: 0.86rem;
  }

  .blog-card-body {
    padding: 1rem;
  }

  .article-detail-image {
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
  }

  .finder-progress {
    grid-template-columns: 1fr;
  }

  .finder-progress strong {
    justify-self: start;
  }

  .finder-question summary {
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    gap: 0.55rem;
    min-height: 56px;
  }

  .finder-options {
    padding-left: 2.55rem;
  }

  .finder-chip-grid {
    gap: 0.45rem;
  }

  .finder-choice span {
    min-height: 34px;
    padding: 0.38rem 0.7rem;
    font-size: 0.9rem;
  }

  .finder-actions {
    justify-items: stretch;
  }

  .finder-actions .btn,
  .finder-retry-link {
    width: 100%;
  }

  .cart-item {
    grid-template-columns: minmax(120px, auto) minmax(80px, 1fr) minmax(72px, max-content);
    gap: 0.75rem;
    padding: 0.85rem 2.4rem 0.85rem 0.85rem;
  }

  .cart-item-image {
    width: 82px;
  }

  .cart-item-quantity {
    width: 104px;
    min-height: 36px;
  }

  .cart-item-quantity button {
    min-width: 30px;
    height: 36px;
    font-size: 1.15rem;
  }

  .cart-item-info {
    grid-column: 2 / -1;
    padding-right: 1rem;
  }

  .cart-quantity-cell {
    grid-column: 1;
    grid-row: 2;
    justify-items: start;
  }

  .cart-price-cell {
    grid-column: 2;
    grid-row: 2;
    justify-items: start;
  }

  .cart-total-cell {
    grid-column: 3;
    grid-row: 2;
    justify-items: end;
    text-align: right;
  }

  .summary-row {
    align-items: baseline;
  }

  .checkout-form,
  .order-summary .checkout-form,
  .summary-card,
  .login-form,
  .checkout-success {
    padding: 1.15rem;
  }

  .checkout-form .form-row {
    grid-template-columns: 1fr;
  }

  .admin-table-wrapper {
    margin-left: calc(var(--page-gutter) * -1);
    margin-right: calc(var(--page-gutter) * -1);
    padding: 0 var(--page-gutter);
  }

  .admin-table {
    min-width: 680px;
  }

  .admin-action-group {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .admin-action-group .admin-action-btn {
    min-width: 68px;
    padding: 0.32rem 0.55rem;
    font-size: 0.78rem;
  }

  h2 + div[style*="display:flex"] {
    flex-direction: column;
    align-items: stretch !important;
  }

  h2 + div[style*="display:flex"] .btn {
    width: 100%;
  }

  .admin-form fieldset {
    padding: 1rem;
  }

  .admin-form .form-row,
  .admin-form .form-row-3,
  .admin-form .form-row-4,
  .admin-form .images-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .admin-form .form-row:last-child,
  .admin-form .form-row-3:last-child,
  .admin-form .form-row-4:last-child,
  .admin-form .images-grid:last-child {
    margin-bottom: 0;
  }

  .admin-form .form-row .form-group,
  .admin-form .form-row-3 .form-group,
  .admin-form .form-row-4 .form-group,
  .admin-form .images-grid .form-group {
    margin-bottom: 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
}
