/* IM DECOR - Artisanal Luxury Heritage Components System */

/* ================= HERO SECTION ================= */

.hero,
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  min-height: 480px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-hairline);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero::before,
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 35, 21, 0.78) 0%, rgba(16, 58, 40, 0.55) 50%, rgba(0, 0, 0, 0.25) 100%);
  z-index: 1;
}

.hero-content,
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 56px;
  max-width: 620px;
  color: #ffffff;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 194, 120, 0.35);
  color: var(--accent-gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-copy h1 {
  margin: 18px 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
  color: #ffffff;
  font-weight: 600;
}

.hero-content p,
.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-actions .btn-primary {
  background: var(--primary);
  border-color: var(--accent-gold);
  color: #ffffff;
}

.hero-actions .btn-outline-primary {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.hero-actions .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-stat {
  min-width: 140px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--accent-gold-light);
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

/* ================= CATEGORY CARDS ================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(197, 160, 89, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.24s ease-out;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold-bright);
}

.category-card span.category-card-icon,
.category-card > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-gold-light);
  font-size: 20px;
  font-weight: 700;
  border: 1px solid rgba(229, 194, 120, 0.3);
}

.category-card h3 {
  margin: 14px 0 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
}

.category-card p {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.category-card strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold-bright);
}

/* ================= PRODUCT CARDS ================= */

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

.card,
[data-product-card] {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover,
[data-product-card]:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface-low);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-media img,
[data-product-card]:hover .card-media img {
  transform: scale(1.05);
}

.card-media .card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--primary);
  border: 1px solid var(--border-hairline);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-circle:hover {
  background: #ffffff;
  color: var(--primary-dark);
  transform: scale(1.08);
}

.icon-circle.is-active,
.icon-circle.active {
  background: #ffffff;
  color: var(--danger);
  border-color: var(--danger);
}

.card-body {
  padding: 18px 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--rating-star);
}

.card-rating .review-count {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price .new {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.price .old {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.card-footer {
  padding: 12px 20px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-hairline);
  background: var(--surface-cream);
}

.card-footer > div {
  flex: 1;
}

.card-footer .btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
}

/* ================= CATALOG FILTERS & TOOLBAR ================= */

.products-page-shell,
.products-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.products-sidebar-card,
.filters {
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  box-shadow: var(--shadow-sm);
}

.filters-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 16px;
}

.filters-panel-head h2,
.filters-panel-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group {
  padding: 16px 0;
  border-top: 1px solid var(--border-hairline);
}

.filter-group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.filter-group-title,
.filter-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.filter-group-options {
  display: grid;
  gap: 8px;
}

.filter-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.16s ease;
}

.filter-choice:hover,
.filter-choice.is-active {
  background: var(--surface-cream);
  color: var(--primary);
  font-weight: 600;
}

/* Color & Wood finish swatches */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease;
}

.swatch-btn:hover {
  transform: scale(1.15);
}

.swatch-btn.is-active {
  border-color: var(--accent-gold-bright);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-gold-bright);
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.products-toolbar .left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.products-toolbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.products-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.products-header-card h1 {
  margin: 0;
  font-size: 28px;
  color: var(--primary);
}

.select,
.field-select {
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  padding: 0 14px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.select:focus,
.field-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}

/* ================= PRODUCT DETAIL PAGE (PDP) ================= */

.pdp-wrap {
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.pdp-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  background: var(--surface-low);
}

.pdp-gallery-main img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.pdp-thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-low);
  cursor: pointer;
  transition: all 0.18s ease;
}

.pdp-thumb.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-gold);
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pdp-price .new {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.pdp-price .old {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 18px;
}

.pdp-meta {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

.pdp-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.pdp-meta-item i {
  color: var(--accent-gold);
  width: 18px;
}

.pdp-actions {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

/* ================= CART & CHECKOUT ================= */

.cart-table-card,
.checkout-card {
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.cart-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-hairline);
}

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

.cart-item-media {
  width: 100px;
  height: 110px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: var(--surface-low);
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.16s ease;
}

.qty-control button:hover {
  background: var(--surface-cream);
  color: var(--primary);
}

.qty-control span {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.cart-summary {
  background: var(--surface-ivory);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.cart-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-hairline);
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.coupon-box {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.coupon-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent-gold);
  background: var(--surface);
  font-size: 13px;
  text-transform: uppercase;
}

/* ================= STORIES & BLOGS ================= */

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.story-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease-out;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.story-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-card-body h3 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--primary);
}

.story-card-body p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ================= FORMS & CONTROLS ================= */

.field-control,
.field-textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-control:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 58, 40, 0.14);
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
}

.alert {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.5;
}

.alert-danger {
  background: var(--badge-discount-bg);
  border-color: rgba(179, 62, 26, 0.24);
  color: var(--badge-discount-text);
}

.alert-success {
  background: #edf7ed;
  border-color: rgba(27, 94, 32, 0.24);
  color: #1b5e20;
}

.empty-state {
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-hairline);
  color: var(--text-muted);
  font-size: 15px;
}

/* ================= ACCOUNT DROPDOWN ================= */

.account-dropdown {
  position: relative;
}

.account-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 1050;
}

.account-dropdown-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 12px;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.account-dropdown-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.account-user-greeting {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.account-user-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.account-dropdown-links {
  display: grid;
  gap: 6px;
}

.account-dropdown-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.16s ease;
}

.account-dropdown-link:hover,
.account-dropdown-link.is-active {
  background: var(--surface-cream);
  color: var(--primary);
  font-weight: 600;
}
