/* =========================================================
  MODULE       : Product Listing – Wide Screen CSS (Corrected)
  FILE         : product-listing-widescreen.css
  PROJECT      : Mama Community Shop
  PURPOSE      : Fix icon overlap, maintain hover swap, improve layering
  AUTHOR       : Oluwasegun Dayo Ogunsola
  VERSION      : 1.1.0
  CREATED      : 2025-10-XX
  ========================================================= */

/* ---------------- DESIGN TOKENS ---------------- */
:root {
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  --radius-sm: 4px;
  --radius-md: 8px;

  --brand-primary: #0B6E60;
  --brand-secondary: #F29E4C;
  --brand-accent: #E85A4F;
  --surface: #FFFFFF;
  --text: #081018;
  --muted: #5A5A5A;
}

/* ---------------- STRUCTURE & GRID ---------------- */
.product-section {
  padding: var(--space-xl) var(--space-lg);
  background: var(--surface);
}

.product-section-header {
  margin-bottom: var(--space-lg);
}
.product-section-header h2 {
  font-size: 2rem;
  color: var(--brand-primary);
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin: 0 auto;
  max-width: 1200px;
}

/* ---------------- PRODUCT CARD ---------------- */
.product-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ---------------- MEDIA WRAPPER ---------------- */
.product-media {
  position: relative;
  width: 100%;
  padding-top: 66.66%; /* 3:2 ratio */
  overflow: hidden;
  z-index: 1;
}
.product-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 300ms ease;
}
.product-media img:nth-child(2) {
  opacity: 0;
}
.product-card:hover .product-media img:nth-child(1) {
  opacity: 0;
}
.product-card:hover .product-media img:nth-child(2) {
  opacity: 1;
}

/* ---------------- FLAGS & BADGES ---------------- */
.product-flag {
  position: absolute;
  top: var(--space-sm);
  z-index: 2;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.product-flag.new { background: var(--brand-secondary); left: var(--space-sm); }
.product-flag.sale { background: var(--brand-accent); left: var(--space-sm); }
.product-flag.seasonal { background: var(--brand-primary); left: var(--space-sm); }
.product-flag.limited { background: var(--brand-accent); right: var(--space-sm); }
.product-flag.bundle { background: var(--brand-primary); right: var(--space-sm); }

.product-badges {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  display: flex;
  gap: var(--space-xs);
}
.wish-toggle,
.watch-toggle {
  background: var(--surface);
  border: 1px solid var(--brand-primary);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.wish-toggle:hover,
.watch-toggle:hover {
  background: var(--brand-primary);
  color: var(--surface);
}

/* ---------------- DETAILS & ACTIONS ---------------- */
.product-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
  z-index: 1;
}
.product-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--text);
}
.product-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin: 0;
}
.price-old {
  text-decoration: line-through;
  color: var(--muted);
  margin-right: var(--space-sm);
}

/* ---------------- ACTION BUTTONS ---------------- */
/* ============================================================================
FILE NAME   : buttons.css
MODULE      : Unified Button Styles for Forms & Product Actions
AUTHOR      : Oluwasegun Dayo Ogunsola
VERSION     : 2.0.0
UPDATED     : 2025-10-11
============================================================================ */

/* ---------------- BASE BUTTON ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------------- PRIMARY BUTTON ---------------- */
.btn.primary,
.btn-add {
  background-color: var(--brand-accent);
  color: var(--surface);
  border: none;
}

.btn.primary:hover,
.btn-add:hover {
  filter: brightness(0.9);
}

/* ---------------- SECONDARY BUTTON ---------------- */
.btn.secondary,
.btn-details {
  background-color: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
}

.btn.secondary:hover,
.btn-details:hover {
  background-color: var(--brand-primary);
  color: var(--surface);
}

/* ---------------- FORM BUTTON SIZING ---------------- */
.form-column .btn {
  width: fit-content;
  min-width: 180px;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
}

@media (max-width: 768px) {
  .form-column .btn {
    width: 100%;
    text-align: center;
  }
}

/* ---------------- PRODUCT ACTIONS ---------------- */
.product-actions {
  margin-top: auto;
  display: flex;
  gap: var(--space-sm);
}

.product-actions .btn {
  flex: 1;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal.hidden {
  display: none;
}
.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.modal-content {
  position: relative;
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.product-gallery img {
  max-width: 100%;
  margin: 0.5rem;
  border-radius: 4px;
}
.product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}