/* ============================================================
   GOGIFTINGS MASTER FIX — gg-master-fix.css
   Fixes all 14 audit issues from GoGiftings UI Audit Report
   Load AFTER styles.min.css and gogiftings-modern.css
   ============================================================ */

/* ── FIX 1 & 2: Kill double-gap: navbar → hero → products ── */
main.page-pad { padding-top: 0 !important; }
body.home-page .page-pad { padding-top: 0 !important; padding-bottom: 40px; }
body.home-page .hero-grid-refined { margin-top: 0 !important; }
body.home-page .stat-strip { margin-top: 14px !important; }
body.home-page section.section:first-of-type { padding-top: 18px !important; }

/* Also fix the container that wraps the stat-strip */
body.home-page > main > .container:has(.stat-strip),
body.home-page > main > .container + .container { margin-top: 0; }

/* ── FIX 3: Stat strip — 4 items not 5 ── */
.stat-strip { grid-template-columns: repeat(4, 1fr) !important; }

/* ── FIX 4: Hero image — cover for hero frame, contain for product images ── */
.hero-image-side .photo-fit,
.hero-image-side img,
.hero-banner-photo,
.hero-accent-photo,
.hero-photo-frame img { object-fit: cover !important; }

/* Products stay contained so there's no cropping of bouquets */
.product-thumb img,
.product-thumb .photo-fit,
.product-thumb .gg-product-img,
.gallery-photo,
.gallery-thumb img,
.main-product-photo,
.variant-photo,
.realistic-product-photo { object-fit: contain !important; }

/* ── FIX 5: Content cropping — hero copy paragraph ── */
.hero-copy-image p,
.hero-copy p { max-width: 100% !important; overflow-wrap: break-word; }
.hero-copy h1,
.hero-copy-image h1 { overflow-wrap: break-word; }

/* ── FIX 6 & 14: Product cards — elevated, consistent, breathing ── */
.product-card {
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform .22s ease, box-shadow .22s ease !important;
  position: relative;
}
.product-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 18px 42px rgba(246,39,128,.14) !important;
}
.product-card h4 {
  min-height: 44px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 10px 0 6px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .quick-add {
  margin-top: auto !important;
  width: 100% !important;
  padding: 10px 0 !important;
  font-weight: 800;
  font-size: 13px;
}
.product-card .meta { font-size: 11px; }

/* Color-coded product tag badges */
.tag {
  font-size: 11px !important;
  font-weight: 900 !important;
  border-radius: 8px !important;
  padding: 5px 10px !important;
  letter-spacing: .02em;
}
/* default tag = pink brand */
.thumb-wrap .tag { background: linear-gradient(90deg,#f62780,#d00464) !important; color:#fff !important; }
/* NEW = green */
.thumb-wrap .tag[data-tag="NEW"] { background: #0f9f6e !important; color: #fff !important; }
/* TRENDING = gold */
.thumb-wrap .tag[data-tag="TRENDING"] { background: linear-gradient(90deg,#d79a2b,#b87c12) !important; color: #fff !important; }
/* BEST SELLER = pink-purple */
.thumb-wrap .tag[data-tag="BEST SELLER"] { background: linear-gradient(90deg,#f62780,#5a1a93) !important; color: #fff !important; }

/* ── FIX 7: Banner content — no text overflow ── */
.banner h3 {
  font-size: 16px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner p {
  font-size: 13px !important;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── FIX 8: Section head responsive text ── */
.section-head h2 { font-size: clamp(20px, 3vw, 28px) !important; }

/* ── FIX 9: Product row — 4 columns featured, 5 standard ── */
.featured-bouquets-row { grid-template-columns: repeat(4, 1fr) !important; }
@media (min-width: 1100px) {
  .product-row:not(.featured-bouquets-row) { grid-template-columns: repeat(5, 1fr); }
}

/* ── FIX 10: Mobile navbar sticky offset ── */
@media (max-width: 768px) { .navbar { top: 110px !important; } }
@media (max-width: 520px) { .navbar { top: 104px !important; } }

/* ── FIX 12 (Events): search panel overlap on tablet ── */
@media (max-width: 960px) {
  .event-search-panel { margin-top: 16px !important; }
  .event-search-card { grid-template-columns: 1fr 1fr !important; }
  .event-search-card .gg-btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .event-search-card { grid-template-columns: 1fr !important; }
}

/* ── FIX 13 (Events): hero card responsive scaling ── */
@media (max-width: 960px) {
  .hero-media { min-height: 320px !important; }
  .hero-card.one { width: 68%; height: 240px !important; }
  .hero-card.two { width: 50%; height: 185px !important; }
  .hero-card.three { right: 28px; width: 32%; height: 130px !important; }
}
@media (max-width: 768px) {
  .events-hero-grid { grid-template-columns: 1fr !important; }
  .hero-media { min-height: 260px !important; margin-top: 24px; }
  .hero-card.one { width: 70%; height: 200px !important; right: 0; top: 0; }
  .hero-card.two { width: 48%; height: 160px !important; left: 0; bottom: 0; }
  .hero-card.three { display: none; }
  .events-layout { grid-template-columns: 1fr !important; }
  .filter-card { position: static !important; }
}

/* ── EVENTS: Elegant card redesign ── */
.event-card {
  border-radius: 26px !important;
  box-shadow: 0 8px 28px rgba(44,18,35,.07) !important;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease !important;
  overflow: hidden !important;
}
.event-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 28px 60px rgba(44,18,35,.16) !important;
}
.event-card-img { height: 220px !important; position: relative; }
.event-card-img::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(to top, rgba(20,8,18,.55), transparent);
  pointer-events: none;
}
.event-card:nth-child(1) { animation: cardReveal .5s .05s ease both; }
.event-card:nth-child(2) { animation: cardReveal .5s .10s ease both; }
.event-card:nth-child(3) { animation: cardReveal .5s .15s ease both; }
.event-card:nth-child(4) { animation: cardReveal .5s .20s ease both; }
.event-card:nth-child(5) { animation: cardReveal .5s .25s ease both; }
.event-card:nth-child(6) { animation: cardReveal .5s .30s ease both; }

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

.hero-card {
  animation: heroCardIn .7s cubic-bezier(.34,1.56,.64,1) both;
  border-radius: 26px !important;
  border: 6px solid rgba(255,255,255,.9) !important;
}
.hero-card.one { animation-delay: .1s; }
.hero-card.two { animation-delay: .25s; }
.hero-card.three { animation-delay: .4s; }

@keyframes heroCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.price-line strong {
  background: linear-gradient(90deg,#f62780,#5a1a93);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 20px !important;
}

.event-tab {
  border-radius: 14px !important;
  padding: 11px 20px !important;
  font-size: 14px !important;
  transition: all .22s ease !important;
}
.event-tab.active {
  box-shadow: 0 14px 30px rgba(246,39,128,.28) !important;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .events-grid { grid-template-columns: 1fr !important; }
  .event-card-img { height: 200px !important; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .events-grid { grid-template-columns: repeat(2,1fr) !important; }
}

/* ── EVENTS: Richer hero gradient ── */
.events-hero {
  padding: 80px 0 60px !important;
  background:
    radial-gradient(ellipse at 10% 30%, rgba(246,39,128,.18), transparent 38%),
    radial-gradient(ellipse at 85% 10%, rgba(215,154,43,.14), transparent 30%),
    radial-gradient(ellipse at 60% 90%, rgba(90,26,147,.10), transparent 32%),
    linear-gradient(160deg, #fff 0%, #fff5fb 50%, #fff 100%) !important;
}
.events-hero h1 {
  font-size: clamp(38px, 5.5vw, 72px) !important;
  letter-spacing: -.05em !important;
  line-height: 1 !important;
}

/* ── CUSTOMIZATION PANELS — Cakes / Mugs / Cushions / Photo Products ── */
.custom-panel {
  background: linear-gradient(135deg, #fff8fc, #fff0f7);
  border: 1px solid #f0cedd;
  border-radius: 20px;
  padding: 20px 22px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.custom-panel-title {
  font-size: 15px;
  font-weight: 900;
  color: #3a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.custom-panel-title span { font-size: 18px; }

.custom-field-wrap { display: flex; flex-direction: column; gap: 6px; }
.custom-field-label {
  font-size: 12px;
  font-weight: 800;
  color: #f62780;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.custom-field-input,
.custom-field-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #f0cedd;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #2b1a24;
  background: #fff;
  outline: none;
  transition: border-color .18s;
  resize: none;
}
.custom-field-input:focus,
.custom-field-textarea:focus {
  border-color: #f62780;
  box-shadow: 0 0 0 3px rgba(246,39,128,.10);
}
.custom-field-textarea { min-height: 72px; max-height: 120px; }
.custom-char-count {
  font-size: 11px;
  color: #9b8499;
  text-align: right;
  margin-top: 2px;
}
.custom-char-count.warn { color: #e84b0e; }

.custom-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #f0cedd;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #5a1a93;
  min-height: 38px;
}
.custom-preview-pill em { font-style: italic; color: #f62780; }

.custom-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.custom-suggestion-pill {
  border: 1px solid #f0cedd;
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  color: #6b3060;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.custom-suggestion-pill:hover,
.custom-suggestion-pill.active {
  background: #f62780;
  color: #fff;
  border-color: #f62780;
}

/* Photo upload zone */
.photo-upload-zone {
  border: 2px dashed #f0cedd;
  border-radius: 18px;
  background: #fff;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.photo-upload-zone:hover,
.photo-upload-zone.drag-over { border-color: #f62780; background: #fff6fa; }
.photo-upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.photo-upload-icon { font-size: 32px; line-height: 1; }
.photo-upload-label { font-size: 13px; font-weight: 800; color: #5a1a93; text-align: center; }
.photo-upload-hint { font-size: 11px; color: #9b8499; text-align: center; }
.photo-upload-preview {
  display: none;
  position: relative;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  align-items: center;
  gap: 14px;
}
.photo-upload-preview.has-file { display: flex; }
.photo-upload-thumb {
  width: 72px; height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid #f0cedd;
  flex-shrink: 0;
}
.photo-upload-info { flex: 1; min-width: 0; }
.photo-upload-filename {
  font-size: 13px; font-weight: 800; color: #2b1a24;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-upload-filesize { font-size: 11px; color: #9b8499; margin-top: 2px; }
.photo-upload-remove {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid #f0cedd;
  background: #fff;
  color: #e84b0e;
  font-size: 16px;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: background .15s;
}
.photo-upload-remove:hover { background: #ffe6e0; }
.photo-upload-zone.has-file .photo-upload-empty { display: none; }
.photo-upload-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; }
