/* ==========================================================================
   Panda Store - Responsive Layout & Grid Engine
   Rule: Smallest screens MUST have minimum 2 cards per row!
   ========================================================================== */

.store-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 480px) {
  .store-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Header Layout */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.header-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Compact Hero / Announcement */
.store-hero {
  padding: 24px 0 16px;
}

.hero-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent-green-subtle);
  filter: blur(30px);
  pointer-events: none;
}

html[dir="rtl"] .hero-banner::after {
  right: auto;
  left: -40px;
}

/* Sections */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-badge {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-weight: 700;
}

/* ==========================================================================
   THE CORE RESPONSIVE GRIDS (Categories & Products)
   Mobile: EXACTLY 2 COLUMNS (Strict Rule)
   Tablet: 3 COLUMNS
   Desktop: 4-6 COLUMNS
   ========================================================================== */

.categories-grid,
.products-grid {
  display: grid;
  width: 100%;
  margin-bottom: 32px;
}

/* 1. Mobile Default (Up to 480px) -> Exactly 2 Columns */
@media (max-width: 480px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

/* 2. Small Tablet (481px to 768px) -> 3 Columns */
@media (min-width: 481px) and (max-width: 768px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

/* 3. Medium Screen / Tablet (769px to 1024px) -> 4 Columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

/* 4. Desktop (1025px to 1280px) -> 5 Columns */
@media (min-width: 1025px) and (max-width: 1280px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }
}

/* 5. Large Desktop (1281px and above) -> 6 Columns */
@media (min-width: 1281px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Footer */
.store-footer {
  margin-top: 50px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  padding: 36px 0 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
