:root{
  --cream:#F9F6F0;--cream2:#F2EDE4;--white:#FFFFFF;
  --gold:#B8962E;--gold-light:#D4AF5A;--gold-pale:#FBF5E6;
  --green:#1B3A2D;--green-mid:#2D5A40;--green-soft:#4A7C59;--green-pale:#EDF4EF;
  --navy:#1a2744;--sage:#8FAF97;
  --text:#1A2820;--text-mid:#4A5C52;--text-light:#8A9E92;
  --border:#DDE8DF;--sidebar-w:272px;
  --shadow:0 2px 16px rgba(27,58,45,0.08);
  --shadow-lg:0 8px 40px rgba(27,58,45,0.14);
  --radius:14px;
  --bg:var(--cream);
  --card-bg:var(--white);
  --topbar-bg:var(--white);
  --input-bg:var(--white);
}
[data-theme="dark"]{
  --cream:#111C17;--cream2:#162015;--white:#1E2E26;
  --text:#E8F0EC;--text-mid:#9DB8A8;--text-light:#5E8070;
  --border:#2A4035;--bg:#111C17;--card-bg:#1E2E26;
  --topbar-bg:#162015;--input-bg:#243020;
  --green-pale:#1A2F23;--gold-pale:#2A2010;
  --shadow:0 2px 20px rgba(0,0,0,0.4);
  --shadow-lg:0 8px 40px rgba(0,0,0,0.5);
}

/* ─── Layout Structure ─── */
.shop-container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 24px;
  animation: fadeUp 0.5s ease both;
}

.shop-main {
  flex: 1;
  min-width: 0;
}

.shop-sidebar {
  width: 380px;
  position: sticky;
  top: 100px;
  flex-shrink: 0;
}

/* ─── Controls & Categories Toolbar ─── */
.shop-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.shop-search-wrap {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 2px 14px;
  width: 280px;
  transition: all 0.3s;
}
.shop-search-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 46, 0.1);
}
.shop-search-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--text-light);
  margin-right: 10px;
}
.shop-search-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  width: 100%;
  color: var(--text);
  padding: 8px 0;
}

/* Scrollable Categories */
.shop-categories-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  max-width: 500px;
}
.shop-categories-container {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  scrollbar-width: none;
}
.shop-categories-container::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.cat-btn:hover {
  background: var(--cream2);
  color: var(--text);
}
.cat-btn.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  box-shadow: 0 4px 12px rgba(27, 58, 45, 0.15);
}

.shop-sort-wrap select {
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.shop-sort-wrap select:focus {
  border-color: var(--gold);
}

/* ─── Product Card Grid ─── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* Product Card */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  animation: cardIn 0.5s ease both;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.prod-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 5;
  color: #fff;
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(184,150,46,0.3);
}

/* Graphic Area (mock image) */
.prod-graphic-wrap {
  height: 170px;
  background: linear-gradient(135deg, var(--green-pale) 0%, rgba(255,255,255,0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.prod-graphic-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(143,175,151,0.1) 0%, transparent 75%);
  transition: transform 0.6s ease;
}
.product-card:hover .prod-graphic-wrap::before {
  transform: scale(1.3);
}

.prod-illustration {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  filter: drop-shadow(0 8px 12px rgba(27,58,45,0.15));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.product-card:hover .prod-illustration {
  transform: scale(1.15) rotate(4deg);
}

/* Product Info */
.prod-details {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.prod-cat {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.06em;
}
.prod-rating {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 2px;
}

.prod-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
  cursor: pointer;
}
.prod-title:hover {
  color: var(--gold);
}

.prod-points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.prod-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.prod-bv {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-soft);
  background: var(--green-pale);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.btn-add-cart {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-add-cart svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-mid);
}
.btn-add-cart:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-add-cart:hover svg {
  stroke: #fff;
}

/* ─── Cart Panel Sidebar ─── */
.cart-panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  overflow: hidden;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cph-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-icon-glow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-soft);
  box-shadow: 0 0 10px rgba(74, 124, 89, 0.15);
}
.cart-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.cart-count-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  background: var(--cream2);
  padding: 3px 9px;
  border-radius: 99px;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 4px;
  scrollbar-width: thin;
}
.cart-items-list::-webkit-scrollbar {
  width: 4px;
}
.cart-items-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

/* Cart Item Row */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  animation: itemIn 0.3s ease both;
}
@keyframes itemIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.ci-icon {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.ci-details {
  flex: 1;
  min-width: 0;
}
.ci-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ci-price-bv {
  font-size: 10px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ci-bv-pts {
  color: var(--green-soft);
  font-weight: 600;
}

.ci-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.ci-qty-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  height: 22px;
  width: min-content;
}
.ci-qty-wrap button {
  width: 20px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
}
.ci-qty-wrap button:hover {
  background: var(--border);
  color: var(--text);
}
.ci-qty-val {
  width: 20px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  border: none;
  background: transparent;
}
.ci-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #e74c3c;
  padding: 2px;
  border-radius: 4px;
  display: flex;
}
.ci-remove svg {
  width: 13px;
  height: 13px;
}
.ci-remove:hover {
  background: rgba(231, 76, 60, 0.08);
}

/* Empty Basket State */
.cart-empty-state {
  text-align: center;
  padding: 42px 10px;
}
.empty-cart-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}
.empty-txt {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.empty-sub {
  font-size: 10.5px;
  color: var(--text-light);
  line-height: 1.4;
  display: block;
}

/* Cart Calculations */
.cart-calc-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.calc-bv {
  color: var(--green-soft);
  font-weight: 700;
}
.total-row {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.grand-total {
  font-size: 18px;
  color: var(--text);
.php
}

.btn-checkout {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(27, 58, 45, 0.2);
}
.btn-checkout:hover:not(:disabled) {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 58, 45, 0.3);
}
.btn-checkout:disabled {
  background: var(--border);
  color: var(--text-light);
  box-shadow: none;
  cursor: not-allowed;
}

/* ─── Modal Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show {
  display: flex;
}

.product-modal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  max-width: 780px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.modal-close-btn:hover {
  background: var(--border);
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.modal-graphic-side {
  background: linear-gradient(135deg, var(--green-pale) 0%, rgba(255,255,255,0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  position: relative;
  min-height: 320px;
}
.modal-graphic-side::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(143,175,151,0.15) 0%, transparent 70%);
}

.modal-info-side {
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.modal-badge {
  background: var(--gold);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 12px;
}

.modal-product-title {
.php
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 14px;
}
.star-rating-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  margin-left: 6px;
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.modal-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.modal-bv-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-soft);
  background: var(--green-pale);
  padding: 4px 12px;
  border-radius: 99px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 18px;
}

.modal-benefits {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-bottom: 24px;
}
.modal-benefits h5 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.modal-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.modal-benefits li {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-benefits li::before {
  content: '✓';
  color: var(--green-soft);
  font-weight: 700;
}

.modal-footer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 40px;
  background: var(--bg);
}
.qty-stepper button {
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-mid);
  transition: background 0.2s;
}
.qty-stepper button:hover {
  background: var(--border);
}
.qty-stepper input {
  width: 32px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}

.btn-add-modal {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-modal:hover {
  background: var(--green-mid);
  box-shadow: 0 4px 14px rgba(27, 58, 45, 0.2);
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 992px) {
  .shop-container {
    flex-direction: column;
  }
  .shop-sidebar {
    width: 100%;
    position: static;
  }
  .cart-panel-card {
    max-height: unset;
  }
}

@media (max-width: 768px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
  }
  .modal-graphic-side {
    min-height: 180px;
    font-size: 64px;
  }
  .shop-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .shop-search-wrap {
    width: 100%;
  }
  .shop-categories-wrapper {
    max-width: 100%;
  }
}
