﻿.modalDialog {
  max-width: 860px;
  transform: translateY(8px) scale(0.98);
  transition: transform 220ms ease;
}

:global(.modal.show) .modalDialog {
  transform: translateY(0) scale(1);
}

.backdrop:global(.show) {
  opacity: 0.45;
}

.modalContent {
  border-radius: 20px;
  border: 0;
  background: #fffaf7;
  box-shadow: 0 24px 60px rgba(25, 18, 14, 0.2);
  overflow: hidden;
}

.modalHeader {
  border-bottom: 0;
  justify-content: center;
  padding: 28px 28px 12px;
  :global(.btn-close) {
    position: absolute;
    right: 20px;
    top: 20px;
  }
}

.headerContent {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.giftIcon {
  font-size: 26px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #fff1e6;
  color: #8c5a63;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.headerContent h4 {
  font-size: 24px;
  font-weight: 700;
  color: #2d1f24;
  margin: 0;
}

.headerContent p {
  margin: 0;
  color: #5c4a50;
  font-size: 14px;
}

.headerContent small {
  color: #8a7b7f;
  font-size: 12px;
}

.modalBody {
  padding: 0 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 76vh;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #ffe9f1 0%, #fff7ee 100%);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid #f3d9e2;
}

.banner h5 {
  margin: 0 0 6px;
  font-weight: 700;
  color: #2b1b20;
}

.bannerText {
  margin: 0;
  color: #6b5560;
  font-size: 13px;
}

.rulePill {
  background: #2b1b20;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.contentArea {
  overflow-y: auto;
  padding-right: 4px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sectionTitle {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #2f2126;
}

.helper {
  color: #7a6a70;
  margin: 0;
  font-size: 13px;
}

.categoryTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.categoryTab {
  border: 1px solid #ead6dd;
  background: #fff;
  color: #3b2a31;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all 160ms ease;
}

.categoryTab:hover {
  border-color: #d6b7c3;
  background: #fff0f6;
}

.activeTab {
  border-color: #b77f93;
  background: #ffe9f1;
  color: #3a1e27;
  box-shadow: 0 8px 20px rgba(183, 127, 147, 0.2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.productCard {
  border: 1px solid #f0dee5;
  border-radius: 16px;
  background: #fff;
  padding: 0;
  text-align: left;
  transition: all 160ms ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.productCard:hover {
  border-color: #d9bcc6;
  box-shadow: 0 10px 24px rgba(38, 26, 22, 0.12);
  transform: translateY(-2px);
}

.productBody {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.productImage {
  position: relative;
  background: #fff1f5;
  border-radius: 16px 16px 0 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.productImage :global(img) {
  object-fit: cover;
  border-radius: 12px;
}

.productInfo {
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.productInfo h6 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #2b1b20;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  margin: 0;
  color: #9b5f73;
  font-weight: 700;
  font-size: 13px;
}

.discountBadge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: #b76b83;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.selectedBadge {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #2b1b20;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.selected {
  border-color: #b77f93;
  background: #fff2f6;
  box-shadow: 0 12px 28px rgba(183, 127, 147, 0.25);
}

.dimmed {
  opacity: 0.55;
  pointer-events: none;
}

.error {
  color: #c0392b;
  font-size: 12px;
  margin: 0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: #fffaf7;
  border-top: 1px solid #f3e4ea;
}

.actions :global(.btn-primary) {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  background: #2b1b20;
  border: 1px solid #2b1b20;
}

.actions :global(.btn-primary:hover) {
  background: #3b2530;
  border-color: #3b2530;
}

.actions :global(.btn-primary:disabled) {
  background: #d9c8cf;
  border-color: #d9c8cf;
}

.skipButton {
  color: #8a7b7f;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.footerNote {
  margin: 0;
  text-align: center;
  color: #9a8b90;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .modalDialog {
    margin: 0 12px;
  }

  .modalBody {
    max-height: 85vh;
    padding: 0 18px 18px;
  }

  .banner {
    flex-direction: column;
    align-items: flex-start;
  }

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