/* ================================================================
   ECOG — DEALS SECTION CSS (Responsive Rewrite)
   ================================================================ */

:root {
  --deals-hero-bg:    #7a5230;
  --deals-hero-warm:  #c9955c;
  --deals-radius:     16px;
  --deals-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position:  1000px 0; }
}

/* ── Wrapper ── */
.deals-wrapper {
  padding: clamp(24px, 4vw, 40px) clamp(16px, 7vw, 100px);
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Header ── */
.deals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.deals-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.deals-title h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  font-family: 'Georgia', serif;
  color: #1a1a1a;
  margin: 0;
}

.deals-nav { display: flex; gap: 8px; }

.nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #8aaa7a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--deals-transition);
}
.nav-btn:hover:not(:disabled) { border-color: #1a1a1a; background: #fff; color: #8aaa7a; }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Tabs ── */
.deals-tabs {
  display: flex;
  gap: 0;
  align-items: flex-end;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}
.deals-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #888;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.22s ease;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: transparent;
  transition: background 0.22s ease;
}
.tab-btn:hover { color: #555; }
.tab-btn.active { color: #4a7c4e; font-weight: 600; }
.tab-btn.active::after { background: #4a7c4e; height: 3px; }

/* ── Grid ── */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ── Hero card ── */
.deal-card--hero {
  height: 414px;
  background: linear-gradient(135deg, var(--deals-hero-bg) 0%, var(--deals-hero-warm) 100%);
  border-radius: var(--deals-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

.hero-content { z-index: 2; }

.hero-text {
  color: white;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 16px;
  font-family: 'Georgia', serif;
}

.hero-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.55);
  background: transparent;
  color: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--deals-transition);
  display: inline-block;
}
.hero-btn:hover { background: rgba(255,255,255,0.1); border-color: white; }

.hero-decoration {
  position: absolute;
  bottom: -10px; right: -10px;
  width: 120px; height: 120px;
  z-index: 1;
}
.leaf-icon { width: 100%; height: 100%; opacity: 0.3; }

/* ── Product Card ── */
.deal-card--product {
  position: relative;
  border-radius: var(--deals-radius);
  background: #F9F9F7;
  border: 1px solid transparent;
  box-sizing: border-box;
  height: 414px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  padding: 0 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.deal-card--product:hover { border-color: #e0e0e0; box-shadow: 0 2px 14px rgba(0,0,0,0.08); }

/* Action buttons */
.deal-card--product .card-actions {
  position: absolute;
  top: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.deal-card--product:hover .card-actions { opacity: 1; }

.action-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.action-btn:hover { background: #4a7c4e; border-color: #4a7c4e; color: #fff; }
.action-btn i { pointer-events: none; }

/* Stars */
.card-stars {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-top: 24px;
  margin-bottom: 6px;
  padding-left: 24px;
}
.star { font-size: 14px; line-height: 1; }
.star--full  { color: #4a7c4e; }
.star--empty { color: #d0d0d0; }
.review-count { font-size: 11px; color: #999; margin-left: 3px; }

/* Image */
.card-img-wrap {
  width: 100%;
  height: 270px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-img {
  width: 78%;
  height: 88%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
  display: block;
}
.deal-card--product:hover .card-img { transform: scale(0.86); }

.badge-discount {
  position: absolute;
  top: 8px; left: 8px;
  background: #d9534f;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  z-index: 5;
}

/* Buy Now */
.btn-add-cart {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 198px;
  height: 34px;
  top: 268px;
  background: #4a7c4e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6;
  white-space: nowrap;
  transition: background 0.18s;
}
.btn-add-cart:hover { background: #3a6340; }
.deal-card--product:hover .btn-add-cart { display: flex; }

/* Text */
.card-category { font-size: 11px; color: #888; padding: 6px 14px 2px; }
.card-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 2px 0;
  line-height: 1.3;
  padding: 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price { display: flex; align-items: center; gap: 6px; padding: 4px 14px 0; }
.price-original { font-size: 12px; color: #aaa; text-decoration: line-through; }
.price-deal { font-size: 13.5px; font-weight: 600; color: #1a1a1a; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--deals-radius);
  height: 414px;
}

/* No deals */
.no-deals-message { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: #999; font-size: 16px; }


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── Laptop ── */
@media (max-width: 1199px) {
  .deals-wrapper { padding: 32px 40px; }
  .deals-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .deals-wrapper { padding: 28px 24px; }
  .deals-header  { flex-direction: column; align-items: flex-start; }
  .deals-tabs    { width: 100%; }
  .deals-grid    { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .deal-card--hero { height: auto; min-height: 240px; }
}

/* ── Mobile Large ── */
@media (max-width: 767px) {
  .deals-wrapper { padding: 20px 12px; }
  .deals-title h2 { font-size: 20px; }
  .deals-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .deal-card--product { height: 340px; }
  .card-img-wrap { height: 195px; }
  .btn-add-cart  { top: 193px; width: 82%; font-size: 12px; height: 30px; }
  .card-stars    { margin-top: 14px; padding-left: 12px; }
  .card-category,
  .card-name,
  .card-price    { padding-left: 12px; padding-right: 12px; }
  .card-actions  { top: 10px; right: 10px; }
  .action-btn    { width: 28px; height: 28px; font-size: 11px; }

  .deal-card--hero { min-height: 180px; padding: 20px 16px; }
  .hero-text { font-size: 16px; }
}

/* ── Mobile Small ── */
@media (max-width: 479px) {
  .deals-wrapper { padding: 16px 10px; }
  .deals-grid    { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .deal-card--product { height: 300px; }
  .card-img-wrap { height: 165px; }
  .btn-add-cart  { top: 163px; width: 82%; font-size: 11px; height: 28px; }
  .card-stars    { margin-top: 10px; padding-left: 10px; }
  .card-name     { font-size: 11px; }
  .card-price    { padding: 2px 10px 0; }
  .price-deal    { font-size: 12px; }

  .tab-btn { padding: 6px 10px; font-size: 11px; }

  .deal-card--hero { display: none; }
  /* On very small screens hide hero card so products get full width */
}

/* ── Single column on XS ── */
@media (max-width: 360px) {
  .deals-grid { grid-template-columns: 1fr; }
  .deal-card--product { height: 380px; }
  .card-img-wrap { height: 250px; }
  .btn-add-cart  { top: 248px; }
}