/* Phone Accessories Marketplace — distinct from device cards */

.acc-page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #312e81 100%);
    padding: var(--space-6) var(--space-4) var(--space-5);
    margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4);
    border-radius: 0 0 24px 24px;
}
.acc-page-hero__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}
.acc-page-hero__sub {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.acc-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-4);
    align-items: start;
}
@media (max-width: 768px) {
    .acc-layout { grid-template-columns: 1fr; }
    .acc-filters { order: 2; }
}

.acc-filters {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 16px;
    padding: var(--space-4);
    position: sticky;
    top: 80px;
}
.acc-filters__block { margin-bottom: var(--space-3); }
.acc-filters__label { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; display: block; }
.acc-filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc-filters__check { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; margin-bottom: 8px; cursor: pointer; }
.acc-filters__submit { width: 100%; margin-top: 4px; }
.acc-filters__parts { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid rgba(15,23,42,0.06); }
.acc-filters__part-link { display: block; font-size: 0.75rem; padding: 6px 0; color: var(--accent-purple); text-decoration: none; }

.acc-main__bar { font-size: 0.75rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.acc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 2.5vw, var(--space-3));
  width: 100%;
  max-width: 100%;
}
.acc-grid--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .acc-grid, .acc-grid--page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .acc-grid, .acc-grid--page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .acc-grid, .acc-grid--page { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1536px) {
  .acc-grid, .acc-grid--page { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.acc-pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); font-size: 0.8125rem; }

@media (max-width: 430px) {
  .acc-card__title { font-size: 0.75rem; }
  .acc-card__price { font-size: 0.875rem; }
  .acc-card__actions { padding: 0 6px 6px; gap: 3px; }
  .acc-card__btn { font-size: 0.5625rem; padding: 5px 6px; }
  .acc-card__btn--wish { padding: 5px 6px; flex-shrink: 0; }
}

.acc-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}
.acc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15,23,42,0.1);
}
.acc-card__link { text-decoration: none; color: inherit; flex: 1; display: flex; flex-direction: column; }
.acc-card__media {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.acc-card__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.acc-card__placeholder { color: #cbd5e1; display: flex; align-items: center; justify-content: center; }
.acc-card__badge { position: absolute; top: 8px; left: 8px; font-size: 0.625rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.acc-card__badge--sale { background: #ef4444; color: #fff; }
.acc-card__badge--hot { background: linear-gradient(135deg, #f472b6, #a855f7); color: #fff; }
.acc-card__badge--part { top: auto; bottom: 8px; left: 8px; background: #0f172a; color: #fff; }
.acc-card__body { padding: 10px 12px 12px; flex: 1; }
.acc-card__brand { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-purple); }
.acc-card__title { font-size: 0.8125rem; font-weight: 600; line-height: 1.35; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-primary); }
.acc-card__rating { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.acc-card__star { font-size: 0.6875rem; color: #e2e8f0; }
.acc-card__star.is-filled { color: #f59e0b; }
.acc-card__rating-val { font-size: 0.625rem; color: var(--text-muted); margin-left: 4px; }
.acc-card__price-row { display: flex; align-items: baseline; gap: 6px; }
.acc-card__price { font-size: 0.9375rem; font-weight: 800; color: var(--text-primary); }
.acc-card__price-old { font-size: 0.6875rem; color: var(--text-muted); text-decoration: line-through; }
.acc-card__meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.acc-card__stock { font-size: 0.625rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.acc-card__stock--in { background: #dcfce7; color: #15803d; }
.acc-card__stock--out { background: #fee2e2; color: #b91c1c; }
.acc-card__cat { font-size: 0.625rem; color: var(--text-muted); }
.acc-card__actions { display: flex; flex-wrap: nowrap; gap: 4px; padding: 0 8px 8px; margin-top: auto; }
.acc-card__btn { border: none; cursor: pointer; border-radius: 8px; font-size: 0.625rem; font-weight: 700; padding: 6px 8px; transition: background 0.15s, color 0.15s, transform 0.15s; min-width: 0; }
.acc-card__btn--wish { background: #f1f5f9; color: #64748b; padding: 6px 8px; display: flex; align-items: center; justify-content: center; }
.acc-card__btn--wish .acc-heart-icon { fill: none; stroke: currentColor; stroke-width: 2; transition: fill 0.2s, stroke 0.2s, transform 0.2s; }
.acc-card__btn--wish.is-active { background: #fef2f2; color: #ef4444; }
.acc-card__btn--wish.is-active .acc-heart-icon { fill: #ef4444; stroke: #ef4444; transform: scale(1.08); }
.acc-card__btn--cart { flex: 1; min-width: 72px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.acc-card__btn--cart.is-in-cart { background: #dcfce7; color: #15803d; }
.acc-card__btn--buy { flex: 1; min-width: 64px; background: #0f172a; color: #fff; }
.acc-card__btn--buy:hover { filter: brightness(1.12); }
.acc-card__btn--cart:hover { filter: brightness(1.08); }

.acc-section { margin: var(--space-5) 0; }
.acc-section__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-3); padding: 0 var(--space-1); }
.acc-section__title { font-size: 1.125rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.acc-section__sub { font-size: 0.75rem; color: var(--text-muted); margin: 2px 0 0; }
.acc-section__link { font-size: 0.75rem; font-weight: 600; color: var(--accent-purple); text-decoration: none; }
.acc-scroll { display: flex; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.acc-scroll::-webkit-scrollbar { display: none; }
.acc-scroll .acc-card { min-width: 160px; max-width: 170px; scroll-snap-align: start; flex-shrink: 0; }

.acc-detail__crumb { font-size: 0.75rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.acc-detail__crumb a { color: var(--accent-purple); }
.acc-detail__hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-bottom: var(--space-6); }
@media (max-width: 768px) { .acc-detail__hero { grid-template-columns: 1fr; } }
.acc-detail__main-img-wrap { position: relative; background: #f8fafc; border-radius: 16px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.acc-detail__main-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.acc-detail__sale-tag { position: absolute; top: 12px; left: 12px; background: #ef4444; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 8px; }
.acc-detail__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.acc-detail__thumb { width: 56px; height: 56px; border: 2px solid transparent; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; background: #f1f5f9; flex-shrink: 0; }
.acc-detail__thumb.is-active { border-color: var(--accent-purple); }
.acc-detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.acc-detail__video { margin-top: 12px; border-radius: 12px; overflow: hidden; }
.acc-detail__video-el { width: 100%; max-height: 200px; display: block; background: #000; }
.acc-detail__brand { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-purple); }
.acc-detail__title { font-size: 1.375rem; font-weight: 800; margin: 4px 0 8px; letter-spacing: -0.02em; }
.acc-detail__rating { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 12px; }
.acc-detail__price-block { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.acc-detail__price { font-size: 1.75rem; font-weight: 800; }
.acc-detail__price-old { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; }
.acc-detail__stock { font-size: 0.8125rem; font-weight: 600; margin-bottom: 8px; }
.acc-detail__stock--in { color: #15803d; }
.acc-detail__stock--out { color: #b91c1c; }
.acc-detail__sku { font-size: 0.75rem; color: var(--text-muted); }
.acc-detail__warranty { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; font-size: 0.8125rem; margin: 12px 0; }
.acc-detail__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; align-items: center; }
.acc-detail__btn { flex: 1; min-width: 120px; }
.acc-detail__btn-wish { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: auto; flex: 0 0 auto; }
.acc-detail__btn-wish .acc-heart-icon { fill: none; stroke: currentColor; stroke-width: 2; width: 18px; height: 18px; transition: fill 0.2s, stroke 0.2s; }
.acc-detail__btn-wish.is-active { color: #ef4444; border-color: #fecaca; background: #fef2f2; }
.acc-detail__btn-wish.is-active .acc-heart-icon { fill: #ef4444; stroke: #ef4444; }
.acc-detail__qty { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 4px; }
.acc-detail__qty label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.acc-detail__qty input { width: 72px; padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: 8px; font-size: 0.875rem; }
.acc-detail__btn.is-in-cart { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.acc-detail__desc, .acc-detail__specs { margin-top: var(--space-4); }
.acc-detail__desc h3, .acc-detail__specs h3, .acc-detail__related h2 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 8px; }
.acc-detail__specs dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 0.8125rem; }
.acc-detail__specs dt { color: var(--text-muted); font-weight: 600; }
.acc-detail__related { margin-top: var(--space-6); }

/* Mobile filter FAB + bottom sheet */
.acc-page-hero--compact { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: var(--space-4); }
.acc-filter-fab {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25); color: #fff;
    padding: 10px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; cursor: pointer;
}
.acc-toolbar { display: flex; gap: 8px; margin-bottom: var(--space-3); }
.acc-toolbar__search { flex: 1; }
.acc-toolbar__sort { max-width: 140px; }
.acc-filter-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 200; opacity: 0; transition: opacity 0.25s; }
.acc-filter-backdrop.is-visible { opacity: 1; }
.acc-filter-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
    background: #fff; border-radius: 20px 20px 0 0; max-height: 85vh;
    transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -12px 40px rgba(15,23,42,0.15); display: flex; flex-direction: column;
}
.acc-filter-sheet.is-open { transform: translateY(0); }
.acc-filter-sheet__handle { width: 40px; height: 4px; background: #e2e8f0; border-radius: 99px; margin: 10px auto 0; }
.acc-filter-sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.acc-filter-sheet__head h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.acc-filter-sheet__close { border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #64748b; }
.acc-filter-sheet__body { padding: 16px; overflow-y: auto; flex: 1; }
.acc-filter-sheet__apply { margin-top: 12px; }
body.acc-filter-open { overflow: hidden; }
.acc-thumb { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.acc-thumb--placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #cbd5e1; background: #f8fafc; border-radius: 8px; }
.cart-item--accessory .acc-thumb, .acc-checkout-item .acc-thumb { width: 72px; height: 72px; flex-shrink: 0; }
.cart-item__qty-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item__qty-select { max-width: 72px; padding: 4px 8px; font-size: 0.75rem; }
@media (min-width: 769px) {
    .acc-filter-fab { display: none; }
    .acc-filter-sheet, .acc-filter-backdrop { display: none; }
}
