/*
Theme Name: iMart Mobiles
Description: CEX-style theme for iMart Mobiles Bangor
Version: 1.0
*/

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

:root {
  --primary:    #e31e26;
  --primary-dk: #b71c1c;
  --dark:       #1a1a2e;
  --dark-mid:   #16213e;
  --dark-light: #0f3460;
  --accent:     #e94560;
  --white:      #ffffff;
  --gray-light: #f4f4f4;
  --gray-mid:   #e0e0e0;
  --gray-dark:  #666666;
  --text:       #222222;
  --shadow:     0 2px 8px rgba(0,0,0,0.12);
  --radius:     6px;
}

body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: #f0f0f0; font-size: 14px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ===== TOP BAR ===== */
.top-bar {
  background: #111;
  color: #aaa;
  font-size: 0.75rem;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #aaa; }
.top-bar a:hover { color: white; }

/* ===== HEADER ===== */
.site-header {
  background: var(--dark);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  font-style: italic;
}
.logo-text {
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--primary); }

/* Search */
.header-search {
  flex: 1;
  display: flex;
  max-width: 600px;
}
.header-search input {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
}
.header-search button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
}
.header-search button:hover { background: var(--primary-dk); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.header-actions a {
  color: white;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.header-actions a:hover { color: var(--accent); }
.header-actions .icon { font-size: 1.3rem; }
.cart-count {
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -6px;
  font-weight: 700;
}
.cart-wrapper { position: relative; }

/* ===== NAV BAR ===== */
.nav-bar {
  background: var(--dark-mid);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.nav-bar ul {
  display: flex;
  align-items: center;
}
.nav-bar ul li a {
  display: block;
  color: #ccc;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.nav-bar ul li a:hover,
.nav-bar ul li.current-menu-item a {
  color: white;
  border-bottom-color: var(--primary);
  background: rgba(255,255,255,0.05);
}
.nav-bar .sell-link a {
  color: var(--primary) !important;
}
.nav-bar .sell-link a:hover {
  background: var(--primary) !important;
  color: white !important;
}

/* ===== HERO SEARCH ===== */
.hero-search {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  padding: 48px 0;
  text-align: center;
}
.hero-search h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 8px;
}
.hero-search p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.hero-search-bar {
  display: flex;
  max-width: 600px;
  margin: 0 auto 16px;
}
.hero-search-bar input {
  flex: 1;
  padding: 14px 20px;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
}
.hero-search-bar button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hero-search-bar button:hover { background: var(--primary-dk); }
.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-tags a {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-tags a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== CATEGORY TILES ===== */
.categories-section {
  background: white;
  padding: 40px 0;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--gray-mid);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--gray-light);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: block;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.category-icon { font-size: 3rem; margin-bottom: 12px; }
.category-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.category-count { font-size: 0.78rem; color: var(--gray-dark); }

/* ===== PRODUCT GRID ===== */
.products-section {
  padding: 32px 0;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-mid);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.product-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grade-badges { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.grade-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid;
}
.grade-A { background: #e8f5e9; color: #2e7d32; border-color: #2e7d32; }
.grade-B { background: #fff3e0; color: #e65100; border-color: #e65100; }
.grade-C { background: #fce4ec; color: #c62828; border-color: #c62828; }
.product-prices { margin-top: auto; }
.sell-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
}
.buy-price {
  font-size: 0.75rem;
  color: var(--gray-dark);
}
.buy-price span { color: var(--primary); font-weight: 700; }
.product-card .add-btn {
  display: block;
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  width: 100%;
}
.product-card .add-btn:hover { background: var(--primary-dk); }

/* ===== TRUST BADGES ===== */
.trust-section {
  background: var(--dark);
  padding: 28px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.trust-item { color: white; }
.trust-icon { font-size: 2rem; margin-bottom: 8px; }
.trust-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.trust-desc { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

/* ===== SHOP PAGE ===== */
.shop-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 24px 0;
}
.shop-sidebar {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  border: 1px solid var(--gray-mid);
}
.filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.filter-group { margin-bottom: 20px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 0.85rem; }
.filter-option input { accent-color: var(--primary); }
.shop-main { }
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-mid);
}
.shop-count { font-size: 0.85rem; color: var(--gray-dark); }
.sort-select {
  padding: 6px 12px;
  border: 1px solid var(--gray-mid);
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ===== SINGLE PRODUCT PAGE ===== */
.single-product-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 32px 0;
}
.product-gallery {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-mid);
}
.product-gallery .main-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 20px;
}
.product-gallery .main-image img { max-height: 300px; object-fit: contain; }

.product-details {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-mid);
}
.product-details h1 { font-size: 1.3rem; color: var(--dark); margin-bottom: 16px; }

.grade-selector { margin-bottom: 20px; }
.grade-selector-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.grade-options { display: flex; gap: 8px; }
.grade-option {
  border: 2px solid var(--gray-mid);
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
  flex: 1;
  transition: all 0.2s;
}
.grade-option:hover, .grade-option.active {
  border-color: var(--primary);
  background: #fff5f5;
}
.grade-option .grade-label { font-size: 1rem; font-weight: 800; color: var(--dark); }
.grade-option .grade-desc { font-size: 0.7rem; color: var(--gray-dark); }
.grade-option .grade-price { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-top: 4px; }

.price-block {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.we-sell { margin-bottom: 10px; }
.we-sell .label { font-size: 0.78rem; color: var(--gray-dark); font-weight: 600; text-transform: uppercase; }
.we-sell .price { font-size: 2rem; font-weight: 900; color: var(--dark); }
.we-buy { display: flex; align-items: center; gap: 8px; }
.we-buy .label { font-size: 0.78rem; color: var(--gray-dark); font-weight: 600; text-transform: uppercase; }
.we-buy .price { font-size: 1rem; font-weight: 700; color: var(--primary); }
.we-buy .info { font-size: 0.72rem; color: var(--gray-dark); }

.add-to-cart-btn {
  display: block;
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 10px;
  text-align: center;
}
.add-to-cart-btn:hover { background: var(--primary-dk); }
.visit-store-btn {
  display: block;
  width: 100%;
  background: white;
  color: var(--dark);
  border: 2px solid var(--dark);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
}

/* Condition descriptions */
.condition-desc {
  background: #f8f8f8;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--gray-dark);
}

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.specs-table tr:nth-child(even) { background: var(--gray-light); }
.specs-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-mid); }
.specs-table td:first-child { font-weight: 600; color: var(--dark); width: 40%; }

/* ===== SELL PAGE ===== */
.sell-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  padding: 48px 0;
  text-align: center;
  color: white;
}
.sell-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.sell-hero p { color: rgba(255,255,255,0.75); margin-bottom: 24px; }
.sell-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.sell-step {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--gray-mid);
}
.sell-step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 12px;
}
.sell-step h3 { font-size: 0.95rem; color: var(--dark); margin-bottom: 6px; }
.sell-step p { font-size: 0.82rem; color: var(--gray-dark); }

.grade-explain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.grade-explain-card {
  border-radius: var(--radius);
  padding: 20px;
  border: 2px solid;
}
.grade-explain-card.grade-A { border-color: #2e7d32; background: #f1f8e9; }
.grade-explain-card.grade-B { border-color: #e65100; background: #fff8f1; }
.grade-explain-card.grade-C { border-color: #c62828; background: #fff0f0; }
.grade-explain-title { font-size: 1.2rem; font-weight: 900; margin-bottom: 8px; }
.grade-explain-card.grade-A .grade-explain-title { color: #2e7d32; }
.grade-explain-card.grade-B .grade-explain-title { color: #e65100; }
.grade-explain-card.grade-C .grade-explain-title { color: #c62828; }
.grade-explain-subtitle { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.grade-explain-card ul { padding-left: 16px; list-style: disc; font-size: 0.82rem; color: var(--gray-dark); }
.grade-explain-card ul li { margin-bottom: 4px; line-height: 1.4; }

/* Sell form */
.sell-form-wrap {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--gray-mid);
  max-width: 640px;
  margin: 0 auto;
}
.sell-form-wrap h2 { font-size: 1.2rem; margin-bottom: 20px; color: var(--dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-mid);
  border-radius: 4px;
  font-size: 0.88rem;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(227,30,38,0.1);
}
.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 13px 32px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
}
.submit-btn:hover { background: var(--primary-dk); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.footer-col ul li a:hover { color: white; }
.footer-about p { font-size: 0.82rem; line-height: 1.7; margin-bottom: 12px; }
.footer-bottom {
  background: #111;
  padding: 16px 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  background: white;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-mid);
  font-size: 0.8rem;
  color: var(--gray-dark);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span::before { content: ' › '; }

/* ===== WOOCOMMERCE OVERRIDES ===== */
.woocommerce .price { color: var(--dark) !important; font-weight: 800 !important; }
.woocommerce .button, .woocommerce button.button {
  background: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
}
.woocommerce .button:hover { background: var(--primary-dk) !important; }
.woocommerce-message { border-top-color: var(--primary) !important; }

/* ===== PAGINATION ===== */
.pagination-wrap { text-align: center; padding: 32px 0; }
.page-numbers {
  display: inline-flex;
  gap: 4px;
}
.page-numbers a, .page-numbers span {
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--gray-mid);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--dark);
}
.page-numbers .current { background: var(--primary); color: white; border-color: var(--primary); }
.page-numbers a:hover { border-color: var(--primary); color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .single-product-wrapper { grid-template-columns: 1fr; }
  .shop-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; flex: 0 0 100%; }
  .category-grid { grid-template-columns: 1fr; }
  .grade-explain { grid-template-columns: 1fr; }
  .sell-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-search h1 { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-options { flex-direction: column; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== CEX-STYLE CAROUSEL SECTIONS ===== */
.cex-section {
  background: #f5f5f5;
  padding: 28px 0;
  border-bottom: 1px solid #e8e8e8;
}
.cex-section:nth-child(even) {
  background: white;
}
.cex-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.cex-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
}
.cex-see-all {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.cex-see-all:hover { text-decoration: underline; }

/* Carousel wrapper */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-btn {
  background: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.2s;
  color: var(--dark);
  z-index: 2;
  line-height: 1;
}
.carousel-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== CEX-STYLE PRODUCT CARD ===== */
.cex-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  width: 188px;
  min-width: 188px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cex-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.14);
  transform: translateY(-3px);
  border-color: #ccc;
}

/* Card image area */
.cex-card-image {
  position: relative;
  background: #f8f8f8;
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.cex-card-image img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  transition: transform 0.3s;
}
.cex-card:hover .cex-card-image img {
  transform: scale(1.05);
}

/* Grade badge ON the image - top left */
.cex-grade-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 2;
}

/* Wishlist button - top right */
.cex-wishlist-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: #999;
  padding: 0;
  transition: all 0.2s;
}
.cex-wishlist-btn:hover,
.cex-wishlist-btn.wishlisted {
  color: var(--primary);
  border-color: var(--primary);
}
.cex-wishlist-btn.wishlisted svg {
  fill: var(--primary);
  stroke: var(--primary);
}

/* Card body */
.cex-card-body {
  padding: 10px 12px 32px;
  flex: 1;
}
.cex-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cex-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.cex-stars {
  font-size: 0.7rem;
  color: #f5a623;
  letter-spacing: -1px;
}
.cex-rating-num {
  font-size: 0.7rem;
  color: #888;
}
.cex-sell-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.cex-buy-price {
  font-size: 0.68rem;
  color: #888;
  margin-top: 2px;
}
.cex-buy-price span { color: var(--primary); font-weight: 600; }
.cex-card-grades {
  display: flex;
  gap: 3px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cex-grade-pill {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Add to cart button - bottom right, red circle */
.cex-add-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.3rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 6px rgba(227,30,38,0.4);
}
.cex-add-btn:hover {
  background: var(--primary-dk);
  transform: scale(1.1);
}

/* Override old product-card styles on homepage - not needed there anymore */
.cex-section .product-card { display: none; }

/* Responsive carousels */
@media (max-width: 768px) {
  .cex-card { width: 160px; min-width: 160px; }
  .carousel-btn { display: none; }
}

/* CEX card grid for shop/category pages */
.cex-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.cex-cards-grid .cex-card {
  width: 100%;
  min-width: 0;
}
@media (max-width: 600px) {
  .cex-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
