/* ============================================
   GLOBAL RESET
============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Noto Sans Ethiopic', Arial, sans-serif;
    background: #f8f9fa;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* SVG & Images */
.icon svg {
    width: 24px;
    height: 24px;
    display: inline-block;
}

img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.product-card {
    will-change: transform;
}
/* ============================================
   CONTAINER SYSTEM
============================================ */
.container, .shop-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1400px) { .container { max-width: 1550px; } }
@media (min-width: 1600px) { .shop-container { max-width: 1700px; } }
@media (min-width: 1800px) { .container { max-width: 1700px; } }

/* ============================================
   TOP BAR
============================================ */
.top-bar {
    position: relative;
    z-index: 2000;
    background: #f8f9fa;
}

/* ============================================
   HERO SECTION
============================================ */
.market-banner {
    position: relative;
    min-height: 380px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b5e42, #0a3b2c);
}

.banner-overlay-modern {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(25,135,84,0.92), rgba(13,110,63,0.88), rgba(10,59,44,0.85));
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 40px;
}

.hero-text-container { max-width: 600px; }

.hero-headline-modern {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.hero-subtitle-modern {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.6;
    margin-bottom: 1.8rem;
    max-width: 500px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons-modern {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn-hero-primary,
.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-hero-primary {
    background: #fff;
    color: #198754;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-hero-primary:hover { transform: translateY(-2px); }

.btn-hero-outline {
    border: 2px solid #fff;
    color: #fff;
}

.btn-hero-outline:hover {
    background: #fff;
    color: #198754;
}

/* ============================================
   PROMO BOX
============================================ */
.promo-box {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.promo-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ============================================
   SIDEBAR
============================================ */
.market-sidebar {
    position: sticky;
    top: 90px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 0 8px 0;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    transform: translateX(0);
}

.sidebar-link:hover {
    transform: translateX(6px);
    color: #0d6efd;
}

@media (min-width: 992px) {
    .market-sidebar .category-modern-card .category-modern-icon,
    .market-sidebar .sidebar-link .icon-wrapper {
        width: 24px;
        height: 24px;
    }

    .market-sidebar .sidebar-link { font-size: 0.85rem; }

    .market-sidebar .sidebar-link .icon-wrapper svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   PRODUCT CARD
============================================ */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card-wrapper:hover .product-card {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.18);
}

.product-card img { height: 200px; object-fit: cover; }

/* ============================================
   CATEGORY GRID
============================================ */
.categories-slider-wrapper {
    position: relative;
    width: 100%;
    padding: 0 60px;
    box-sizing: border-box;
}

.category-modern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-modern-card {
    flex: 1 1 100px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    color: #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-modern-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.category-modern-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.category-modern-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor; /* icon takes text color */
    color: #fff;        /* white icon on colored bg */
}

.category-modern-name {
    font-size: 0.9rem;
    font-weight: 500;
}
/* Product wrapper */
.product-card-wrapper {
  position: relative;
}

/* SOLD badge */
.sold-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff3b30;      /* Brighter red for visibility */
  color: #ffffff;
  font-size: 12px;           /* Slightly bigger */
  font-weight: 900;          /* Extra bold */
  text-transform: uppercase; /* Makes text all caps */
  padding: 6px 10px;         /* Bigger padding */
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); /* Optional: slight shadow */
  animation: glow 1.5s infinite alternate;
}

/* Dim image for sold products */
.product-card.sold img {
  opacity: 0.5;
  transition: opacity 0.3s ease-in-out;
}
@keyframes glow {
  from { box-shadow: 0 0 4px #ff3b30; }
  to { box-shadow: 0 0 12px #ff3b30; }
}
/* ============================================
   MOBILE FILTER PANEL
============================================ */
.mobile-filter-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: #fff;
    transition: right 0.3s;
    z-index: 2000;
}

.mobile-filter-panel.active { right: 0; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

.skeleton {
    background: linear-gradient(90deg, #eee 25%, #ddd 37%, #eee 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */
@media (max-width: 991px) {
    .container { padding: 0 15px; }
    .hero-content-wrapper { padding: 30px; }
    .hero-headline-modern { font-size: 2rem; }
}

@media (max-width: 768px) {
    .shop-container { padding: 0 15px; }
    .hero-content-wrapper { text-align: center; padding: 30px 20px; }
    .hero-headline-modern { font-size: 1.6rem; }
}

@media (max-width: 575px) {
    .container { padding: 0 12px; }
    .hero-headline-modern { font-size: 1.3rem; }
}

/* ============================================
   DARK MODE
============================================ */
body.dark-mode {
    background: #121212;
    color: #e1e1e1;
}

body.dark-mode .promo-box,
body.dark-mode .product-card,
body.dark-mode .market-sidebar {
    background: #1f1f1f;
}

/* ============================================
   UTILITIES
============================================ */
.text-gradient {
    background: linear-gradient(135deg,#198754,#0d6e3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    padding: 1rem;
}

.product-card-wrapper:hover .overlay { opacity: 1; }

/* Slider buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.slider-prev { left: 15px; }
.slider-next { right: 15px; }

/* Flash products */
.flash-product img { max-height: 150px; object-fit: cover; }

.active-cat-modern {
    box-shadow: 0 0 0 2px #2563eb inset;
    background: #f0f7ff;
}

.flash-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-behavior: smooth;
}

.flash-product {
    width: 200px;
    display: flex;
    flex-direction: column;
    height: 100%; /* equal height */
    min-height: 260px;
}

/* FIX IMAGE SIZE */
.flash-img {
    width: 100%;
    height: 150px;             /* 🔥 FIXED HEIGHT */
    object-fit: cover;
    display: block;
    background: #f2f2f2;       /* prevents blink */
}

/* TITLE LIMIT */
.flash-product small.text-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;     /* max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}