/* ============================================
   WEWOW EGY — MOBILE PRETTY + MISSING STYLES
   ============================================ */

:root {
  --primary: #ff4757;
  --primary-light: #ff6b6b;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --border: #eeeeee;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
  --space: 16px;
  --header-h: 64px;
}

/* -------------------------------------------------
   1. BASE & ACCESSIBILITY
   ------------------------------------------------- */
html {
  scroll-behavior: smooth;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* -------------------------------------------------
   2. TOP BAR
   ------------------------------------------------- */
.top-bar {
  background: #1a1a1a;
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top-bar .contact-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.top-bar .contact-info span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.top-bar i {
  color: var(--primary);
  font-size: 12px;
}
@media (max-width: 600px) {
  .top-bar {
    font-size: 11px;
    padding: 6px 0;
  }
  .top-bar .contact-info {
    gap: 10px;
    width: 100%;
    justify-content: center;
  }
  .top-bar .container {
    justify-content: center;
  }
}

/* -------------------------------------------------
   3. HEADER (search + actions)
   ------------------------------------------------- */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 44px 0 16px;
  font-family: inherit;
  font-size: 14px;
  background: #f8f8f8;
  transition: 0.2s;
}
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,71,87,0.1);
}
.header-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[dir="ltr"] .header-search button {
  right: auto;
  left: 6px;
}

@media (max-width: 768px) {
  header .container {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .brand h1 {
    font-size: 18px;
  }
  .brand .mark {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 10px;
  }
  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 4px;
  }
  .header-search input {
    height: 42px;
    font-size: 16px; /* prevent iOS zoom on focus */
  }
  .header-actions {
    gap: 6px;
  }
  .customer-service-btn {
    padding: 6px 12px;
    font-size: 12px;
    height: 36px;
    min-height: 36px;
  }
  .lang-switch {
    font-size: 12px;
  }
  .lang-switch .lang-btn {
    padding: 4px 8px;
  }
}

/* -------------------------------------------------
   4. CATEGORY CIRCLES — smooth horizontal scroll
   ------------------------------------------------- */
.cat-circles-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0 12px;
}
.cat-text-nav-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 12px;
  padding: 0 12px;
}
.cat-text-nav-wrap::-webkit-scrollbar {
  display: none;
}
.cat-text-nav {
  display: flex;
  gap: 8px;
  min-width: max-content;
}
.cat-text-nav a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  background: #f5f5f5;
  white-space: nowrap;
  transition: 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.cat-text-nav a:hover,
.cat-text-nav a.active {
  background: var(--primary);
  color: #fff;
}

.cat-marquee {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 12px;
  touch-action: pan-x;
}
.cat-marquee::-webkit-scrollbar {
  display: none;
}
.cat-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
}
.cat-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  scroll-snap-align: start;
  min-width: 72px;
}
.cat-circle-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: 0.2s;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-circle-item:hover .cat-circle-img,
.cat-circle-item.active .cat-circle-img {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255,71,87,0.2);
  transform: scale(1.05);
}
.cat-circle-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-circle-label {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .cat-circle-img {
    width: 56px;
    height: 56px;
  }
  .cat-circle-label {
    font-size: 10px;
    max-width: 64px;
  }
  .cat-marquee-track {
    gap: 10px;
  }
}

/* -------------------------------------------------
   5. HERO
   ------------------------------------------------- */
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,71,87,0.35);
  transition: 0.3s;
  min-height: 48px;
  min-width: 140px;
  text-decoration: none;
  border: none;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,71,87,0.5);
}
.hero-cta.secondary {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}
@media (max-width: 600px) {
  .hero {
    padding: 24px 0 20px;
  }
  .hero-head h2 {
    font-size: 24px !important;
    line-height: 1.3;
  }
  .hero-head p {
    font-size: 14px !important;
    margin-bottom: 10px;
  }
  .hero-cta {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 44px;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
  }
}

/* -------------------------------------------------
   6. FEATURES BAR (was unstyled)
   ------------------------------------------------- */
.features-maj {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.features-maj .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: #fafafa;
  border: 1px solid var(--border);
  transition: 0.3s;
}
.feature-item:hover {
  border-color: #ffc9c9;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-item i {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}
.feature-item h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}
.feature-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
@media (max-width: 768px) {
  .features-maj .container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .feature-item {
    padding: 14px 10px;
  }
  .feature-item i {
    font-size: 24px;
  }
  .feature-item h4 {
    font-size: 14px;
  }
  .feature-item p {
    font-size: 12px;
  }
}

/* -------------------------------------------------
   7. OFFERS SLIDER — tighter mobile overlay
   ------------------------------------------------- */
@media (max-width: 768px) {
  .offers-slider .slide-image {
    height: 380px;
  }
  .offers-slider .slide-overlay {
    padding: 24px 20px;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  }
  .offers-slider .slide h2 {
    font-size: 26px;
    margin-bottom: 8px;
  }
  .offers-slider .slide p {
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
  }
  .offers-slider .slide-discount {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .offers-slider .slide-discount span {
    font-size: 24px;
    padding: 2px 12px;
  }
  .offers-slider .slide-badge {
    font-size: 12px;
    padding: 4px 14px;
    margin-bottom: 10px;
  }
  .offers-slider .slide-cta {
    padding: 10px 24px;
    font-size: 14px;
  }
  .offers-slider .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}
@media (max-width: 480px) {
  .offers-slider .slide-image {
    height: 320px;
  }
  .offers-slider .slide h2 {
    font-size: 22px;
  }
  .offers-slider .slide p {
    font-size: 13px;
  }
  .offers-slider .slide-discount {
    font-size: 13px;
  }
  .offers-slider .slide-discount span {
    font-size: 20px;
  }
  .offers-slider .slider-btn {
    width: 32px;
    height: 32px;
  }
  .offers-slider .slider-dots {
    bottom: 8px;
    gap: 6px;
  }
  .offers-slider .slider-dots .dot {
    width: 8px;
    height: 8px;
  }
  .offers-slider .slider-dots .dot.active {
    width: 24px;
  }
}

/* -------------------------------------------------
   8. OFFERS GRID (4 cards → 2 → tight)
   ------------------------------------------------- */
@media (max-width: 600px) {
  .offers-section {
    padding: 20px 0;
  }
  .offers-header h2 {
    font-size: 18px;
  }
  .offer-card {
    padding: 16px 14px;
    min-height: auto;
    border-radius: 14px;
  }
  .offer-card .offer-icon {
    font-size: 28px;
  }
  .offer-card h3 {
    font-size: 18px;
  }
  .offer-card h3 span {
    font-size: 24px;
  }
  .offer-card p {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .offer-card .offer-cta {
    font-size: 11px;
    padding: 4px 12px;
  }
  .offer-card .offer-badge {
    font-size: 12px;
    padding: 3px 10px;
    top: 8px;
    left: 8px;
  }
}

/* -------------------------------------------------
   9. SECTION HEADERS
   ------------------------------------------------- */
@media (max-width: 480px) {
  .section-header-box {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
  }
  .header-box-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .header-box-content h3 {
    font-size: 16px;
  }
  .header-box-content p {
    font-size: 12px;
  }
}

/* -------------------------------------------------
   10. POPULAR & NEW PRODUCTS
   ------------------------------------------------- */
@media (max-width: 480px) {
  #popularSection .home-row,
  #newSection .home-row,
  .home-row {
    gap: 10px;
  }
  .hcard {
    border-radius: 12px;
  }
  .hcard .pic {
    height: 140px;
    padding: 6px;
  }
  .hcard .body {
    padding: 8px 10px 10px;
  }
  .hcard .code {
    font-size: 11px;
  }
  .hcard .name {
    font-size: 12px;
    min-height: 30px;
    margin: 2px 0 4px;
  }
  .hcard .price {
    font-size: 13px;
  }
  .hcard .old {
    font-size: 11px;
  }
  .rank-badge, .new-badge, .dbadge {
    font-size: 10px;
    padding: 2px 8px;
    top: 6px;
    right: 6px;
  }
  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
}

/* -------------------------------------------------
   11. TOOLBAR & PRODUCT GRID
   ------------------------------------------------- */
@media (max-width: 600px) {
  .toolbar {
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
  }
  .toolbar .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .toolbar input,
  .toolbar select {
    width: 100%;
    min-width: 0;
    height: 44px;
    font-size: 14px;
    border-radius: 10px;
  }
  .toolbar input[type="search"] {
    grid-column: 1 / -1;
    font-size: 16px !important;
  }
  .toolbar .count {
    grid-column: 1 / -1;
    font-size: 13px;
  }
  .mobile-search-btn {
    grid-column: 1 / -1;
    height: 44px;
    font-size: 14px;
    border-radius: 10px;
    min-height: 44px;
  }
  .grid {
    gap: 10px;
    padding: 10px 0 30px;
  }
  .card {
    border-radius: 12px;
  }
  .card .pic {
    height: 160px;
    padding: 6px;
  }
  .card .body {
    padding: 8px 10px 10px;
  }
  .card .code {
    font-size: 12px;
  }
  .card .name {
    font-size: 12px;
    min-height: 32px;
    margin: 2px 0 6px;
  }
  .card .price-line {
    font-size: 14px;
  }
  .card .meta {
    font-size: 10px;
    margin-bottom: 8px;
  }
  .card .actions a {
    padding: 8px;
    font-size: 12px;
    border-radius: 8px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* -------------------------------------------------
   12. PAGINATION
   ------------------------------------------------- */
.pagination {
  padding: 0 0 30px;
  gap: 4px;
}
.pagination button {
  min-width: 36px;
  height: 36px;
  font-size: 13px;
  border-radius: 8px;
}
@media (max-width: 480px) {
  .pagination button {
    min-width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* -------------------------------------------------
   13. FOOTER
   ------------------------------------------------- */
@media (max-width: 560px) {
  .main-footer .footer-inner {
    padding: 30px 16px 16px;
    gap: 24px;
  }
  .main-footer h5 {
    font-size: 15px;
    margin-bottom: 10px;
  }
  .main-footer ul li {
    margin-bottom: 8px;
    font-size: 13px;
  }
  .main-footer .wewow {
    font-size: 20px;
  }
  .main-footer .brand-blurb {
    font-size: 13px;
  }
  .main-footer .copyright {
    font-size: 12px;
    padding-top: 14px;
    margin-top: 6px;
  }
  .main-footer .contact-list li {
    gap: 8px;
  }
}

/* -------------------------------------------------
   14. GENERAL MOBILE UTILITIES
   ------------------------------------------------- */
@media (max-width: 768px) {
  .section-divider {
    margin: 20px 0;
  }
  .home-section {
    padding: 16px 0;
  }
  .section-label h3 {
    font-size: 16px;
  }
  .container {
    padding: 0 12px;
  }
}