/* Vardagsnuet Shared Styles */
:root {
  --paper: #fdfcfb;
  --bg: #f6f5f3;
  --text: #2d2d2d;
  --muted: #7a7a7a;
  --accent: #8b7355;
  --border: rgba(0,0,0,.08);
}

* { box-sizing: border-box; }

/* =======================
   REMOVE TAP HIGHLIGHT
======================= */
* {
  -webkit-tap-highlight-color: transparent;
}
/* Vardagsnuet Shared Styles */
:root {
  --paper: #fdfcfb;
  --bg: #f6f5f3;
  --text: #2d2d2d;
  --muted: #7a7a7a;
  --accent: #8b7355;
  --border: rgba(0,0,0,.08);
}

/* =======================
   GLOBAL NORMALIZATION
======================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

a,
a:visited,
a:active {
  -webkit-tap-highlight-color: transparent;
}

a.card-link {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* =======================
   PANEL
======================= */
.shop-panel {
  background: var(--paper);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}

.shop-panel::before,
.shop-panel::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--border);
  pointer-events: none;
}

.shop-panel::before {
  top: 24px;
  left: 24px;
  border-right: none;
  border-bottom: none;
  border-radius: 12px 0 0 0;
}

.shop-panel::after {
  bottom: 24px;
  right: 24px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 12px 0;
}

/* =======================
   HEADER
======================= */
.shop-header {
  text-align: center;
  margin-bottom: 32px;
}

.shop-header img {
  max-width: 140px;
  transition: transform 0.3s ease;
}

.shop-header img:hover {
  transform: scale(1.05);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  margin: 24px 0;
  text-align: center;
}

h1::after {
  content: '✦';
  display: block;
  color: var(--accent);
  opacity: 0.3;
  font-size: 14px;
  margin-top: 8px;
}

/* =======================
   PRODUCT GRID
======================= */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
}

/* FULL CARD CLICKABLE OVERLAY */
.product-card .card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  -webkit-tap-highlight-color: transparent;
}

/* Keep buttons above overlay */
.product-card .add-btn,
.product-card .qty,
.product-card .qty * {
  position: relative;
  z-index: 2;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

.product-image {
  height: 240px;
  background: var(--bg);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 24px;
}

.product-info h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 8px;
}

.product-info p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}

.add-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
}

/* =======================
   TEXT SELECTION (SAFE)
======================= */
::selection {
  background: rgba(139,115,85,.25);
  color: var(--text);
}

::-moz-selection {
  background: rgba(139,115,85,.25);
  color: var(--text);
}

/* =======================
   ACCESSIBLE FOCUS
======================= */
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(139,115,85,.6);
  outline-offset: 2px;
}

/* =======================
   MOBILE
======================= */
@media (max-width: 640px) {
  .shop-panel {
    padding: 32px 24px;
  }
}


body {
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Panel with decorative corners */
.shop-panel {
  background: var(--paper);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}

.shop-panel::before,
.shop-panel::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--border);
  pointer-events: none;
}

.shop-panel::before {
  top: 24px;
  left: 24px;
  border-right: none;
  border-bottom: none;
  border-radius: 12px 0 0 0;
}

.shop-panel::after {
  bottom: 24px;
  right: 24px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 12px 0;
}

/* Header */
.shop-header {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.shop-header img {
  max-width: 140px;
  transition: transform 0.3s ease;
}

.shop-header img:hover {
  transform: scale(1.05);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  margin: 24px 0;
  position: relative;
  z-index: 1;
}

h1::after {
  content: '✦';
  display: block;
  text-align: center;
  color: var(--accent);
  opacity: 0.3;
  font-size: 14px;
  margin-top: 8px;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border) 20%, var(--border) 80%, transparent);
  margin: 24px 0 32px;
}

/* Product Grid */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  transition: all .3s ease;
  position: relative;
}

/* ================================
   FULL CARD CLICKABLE OVERLAY
================================ */
.product-card .card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
}

/* Ensure buttons stay clickable */
.product-card .add-btn,
.product-card .qty,
.product-card .qty * {
  position: relative;
  z-index: 2;
}


.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

.product-card:hover::before { opacity: 0.3; }

.product-image {
  height: 240px;
  background: var(--bg);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 24px;
}

.product-info h3 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 8px;
  transition: color 0.3s ease;
}

.product-card:hover .product-info h3 {
  color: var(--accent);
}

.product-info p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}

.add-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.add-btn:hover::before {
  width: 300px;
  height: 300px;
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.add-btn.added {
  background: #5a9367;
  animation: pulse 0.4s ease;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Cart Widget */
.cart-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.cart-widget:not(.open) {
  transform: translateY(calc(100% - 60px));
}

.cart-header {
  padding: 18px 24px;
  background: #efede9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cart-header:hover { background: #e8e6e1; }

.cart-header strong {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
}

.cart-count {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.cart-count.pulse { animation: pulse 0.4s ease; }

.cart-body ul {
  list-style: none;
  padding: 20px 24px;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.cart-body li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-body li:last-child { border-bottom: none; }

.qty {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}


/* =======================
   TEXT SELECTION COLOR
======================= */
::selection {
  background: rgba(139, 115, 85, 0.25); /* accent, soft */
  color: #2d2d2d;
}

::-moz-selection {
  background: rgba(139, 115, 85, 0.25);
  color: #2d2d2d;
}


.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.cart-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--border);
}

.total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 500;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  background: #75614a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 115, 85, 0.3);
}

.empty-cart {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-style: italic;
}

/* Mobile */
@media (max-width: 640px) {
  .shop-panel {
    padding: 32px 24px;
  }
  
  .shop-panel::before,
  .shop-panel::after {
    width: 50px;
    height: 50px;
  }
  
  .cart-widget {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
  }
}