:root {
  --stone-50: #fafaf9;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-600: #57534e;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --white: #ffffff;
}

/* Wrapper */
.mi-archive-root { background: var(--stone-50); min-height: 100vh; }
.mi-container { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.mi-archive-header { background: var(--white); border-bottom: 1px solid var(--stone-200); padding: 2rem 0; }
.mi-title { font-size: 1.5rem; font-weight: 700; color: var(--stone-900); margin: 0 0 0.5rem; }
.mi-subtitle { color: var(--stone-600); }

/* Layout */
.mi-main-wrapper { padding-top: 2rem; padding-bottom: 3rem; }
.mi-layout-row { display: flex; flex-direction: column; gap: 2rem; }
@media(min-width: 1024px) {
  .mi-layout-row { flex-direction: row; }
  .mi-sidebar-desktop { width: 16rem; flex-shrink: 0; display: block; }
  .mi-content-col { flex: 1; }
  .lg-hidden { display: none !important; }
}
@media(max-width: 1023px) {
  .mi-sidebar-desktop { display: none; }
  .lg-visible { display: none !important; }
}

@media(max-width: 768px) {
    .mi-title { font-size: 1.2rem; }
    .mi-subtitle { margin: 0 0; }
}

/* Sidebar Desktop */
.mi-filter-card { background: var(--white); padding: 1.5rem; border-radius: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); position: sticky; top: 8rem; }
.mi-filter-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 1rem 0; color: var(--stone-900); }
.mi-input-group { margin-bottom: 1.5rem; font-family: "DM Sans", sans-serif; }
.mi-input-group label { display: block; font-size: 0.875rem; color: var(--stone-900); margin-bottom: 0.5rem; }
.mi-input, .mi-select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--stone-300); border-radius: 0.5rem; font-size: 0.875rem; box-sizing: border-box; font-family: "DM Sans", sans-serif; }
.mi-input:focus, .mi-select:focus { outline: none; border-color: var(--amber-600); box-shadow: 0 0 0 2px var(--amber-100); }

/* Buttons */
.mi-toolbar .mi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s; max-width: 100px; }
.mi-btn-white { background: var(--white); border: 1px solid var(--stone-300); color: var(--stone-900); }
.mi-btn-outline { background: transparent; border: 1px solid var(--amber-700); color: var(--amber-700); }
.mi-btn-outline:hover { background: var(--amber-50); }
.mi-btn-primary { background: var(--amber-700); color: white; border: none; }
.mi-btn-primary:hover { background: var(--amber-600); }
.full-width { width: 100%; }
.flex-1 { flex: 1; }

/* Toolbar */
.mi-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.mi-results-text { color: var(--stone-600); font-size: 0.875rem; }
.mi-view-toggles { display: flex; gap: 0.5rem; }
.mi-icon-btn { padding: 0.5rem; background: var(--white); border: 1px solid transparent; border-radius: 0.5rem; color: var(--stone-600); cursor: pointer; display: flex; align-items: center; }
.mi-icon-btn.active { background: var(--amber-100); color: var(--amber-700); }

/* Active Tags */
.mi-tags-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; min-height: 1px; }
.mi-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.75rem; background: var(--amber-100); color: var(--amber-700); border-radius: 999px; font-size: 0.875rem; }
.mi-tag button { background: none; border: none; cursor: pointer; padding: 0; color: inherit; display: flex; }

/* Grid System */
.mi-grid { display: grid; gap: 1.5rem; }
.view-grid { grid-template-columns: repeat(1, 1fr); }
@media(min-width: 768px) { .view-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1280px) { .view-grid { grid-template-columns: repeat(2, 1fr); } }

/* Card Style */
.mi-card { background: var(--white); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.1); border: 1px solid var(--stone-200); display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.view-grid .mi-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

/* Card Image */
.mi-card-img-wrap { position: relative; height: 12rem; background: #eee; overflow: hidden; }
.mi-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; display: block; }
.mi-card:hover .mi-img { transform: scale(1.05); }

.mi-category-badge { position: absolute; bottom: 1rem; left: 1rem; }
.mi-category-badge span { background: var(--amber-600); color: white; font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 999px; }

/* Card Content */
.mi-card-content { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.mi-card-title { font-size: 1.125rem; margin: 0 0 0.5rem 0; }
.mi-card-title a { text-decoration: none; color: var(--stone-900); }
.mi-card-title a:hover { color: var(--amber-700); }

.mi-card-meta { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; color: var(--stone-600); margin-bottom: 0.75rem; }
.mi-card-desc { font-size: 0.875rem; color: var(--stone-600); margin: 0 0 1rem 0; flex-grow: 1; line-height: 1.5; }

/* Footer */
.mi-card-footer { border-top: 1px solid var(--stone-200); padding-top: 1rem; margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mi-rating-block { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; }
.mi-rating-val { font-weight: 600; color: var(--stone-900); }
.mi-review-cnt { color: var(--stone-500); }
.mi-price { font-size: 0.875rem; color: var(--stone-600); }
.no-rating { color: #666; font-weight: 400;  }

/* List View Specifics */
.view-list { grid-template-columns: 1fr; }
.view-list .mi-card { flex-direction: row; }
.view-list .mi-card-img-wrap { width: 16rem; height: auto; flex-shrink: 0; }
.mi-list-extras { display: none; font-size: 0.875rem; color: var(--stone-600); gap: 1rem; margin-bottom: 1rem; }
.view-list .mi-list-extras { display: flex; }
/*.view-list .mi-card-footer { display: none;  }*/
@media(max-width: 640px) {
  .view-list .mi-card { flex-direction: column; }
  .view-list .mi-card-img-wrap { width: 100%; height: 12rem; }
}

/* Pagination & No Results */
.mi-pagination { margin-top: 2rem; display: flex; justify-content: center; gap: 0.5rem; }
.mi-pagination .page-numbers { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; border: 1px solid var(--stone-300); text-decoration: none; color: var(--stone-600); }
.mi-pagination .current { background: var(--amber-100); color: var(--amber-700); border-color: var(--amber-100); }
.mi-no-results { text-align: center; padding: 4rem 0; color: var(--stone-600); width: 100%; }

/* Mobile Modal */
.hidden { display: none !important; }
.mi-modal-root { position: fixed; inset: 0; z-index: 9999; }
.mi-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.mi-modal-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 20rem; background: var(--white); display: flex; flex-direction: column; z-index: 10000; box-shadow: -4px 0 15px rgba(0,0,0,0.1); }
.mi-modal-header { padding: 1rem; border-bottom: 1px solid var(--stone-200); display: flex; justify-content: space-between; align-items: center; }
.mi-modal-header h3 { margin: 0; font-size: 1.125rem; }
.mi-modal-header button { background: none; border: none; cursor: pointer; color: var(--stone-600); }
.mi-modal-body { flex: 1; padding: 1.5rem; overflow-y: auto; }
.mi-modal-footer { padding: 1rem; border-top: 1px solid var(--stone-200); display: flex; gap: 0.75rem; background: var(--white); }

/* Toast */
#mi-toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 10000; display: flex; flex-direction: column; gap: 0.5rem; }
.mi-toast { background: white; padding: 0.75rem 1rem; border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 0.75rem; border-left: 4px solid #333; animation: slideIn 0.3s ease; }
.mi-toast.success { border-left-color: #22c55e; }
.mi-toast.error { border-left-color: #ef4444; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Card Badges/Buttons (Updated Section) */
.mi-card-actions { 
    position: absolute; 
    top: 1rem; 
    right: 1rem; 
    display: flex; 
    gap: 0.5rem; 
    z-index: 2; 
}

.mi-card-actions button {
    background: rgba(255,255,255,0.9); 
    border: none; 
    padding: 0.5rem; 
    border-radius: 0.5rem; 
    cursor: pointer; 
    color: var(--stone-600); 
    transition: all 0.2s; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.mi-card-actions button:hover { 
    background: white; 
    color: var(--stone-900);
}

.mi-bookmark-btn.active { 
    color: var(--amber-700); 
}
.mi-bookmark-btn.active svg { 
    fill: currentColor; 
}

.archive .hero-action .icon1 {
    width: 16px;
    height: 16px;
}