/* Aprilia Accessories — Ducati-accessories layout, Aprilia purple */
:root {
  --aprilia-purple: #8b008b;
  --aprilia-purple-dark: #6d006d;
  --light-gray: #F5F5F5;
  --medium-gray: #cccccc;
  --dark-gray: #666666;
  --text-dark: #333333;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background:#f0f0f0; color:var(--text-dark); margin:0; }
a { color: var(--aprilia-purple); text-decoration: none; }
.container { max-width:1400px; margin:0 auto; padding:0 2rem 2rem; }
.breadcrumb { color:var(--dark-gray); font-size:.85rem; display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; padding:.5rem 0 1rem; }
.breadcrumb a { color:var(--aprilia-purple); font-weight:600; }
.breadcrumb a:hover { color:var(--aprilia-purple-dark); }

/* Nav-level cards (families / models) — Ducati .acc-card styling at
   Aprilia parts-landing tile size (5-up, 24px gaps, tall images) */
.acc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 2rem;
}
.acc-grid-models .acc-card-img { height: 160px; border-bottom: 1px solid #eee; }
.acc-card {
    background: var(--white);
    border: 2px solid var(--aprilia-purple);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.acc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(139, 0, 139, 0.2);
    border-color: var(--aprilia-purple-dark);
}
.acc-card-img {
    width: 100%;
    height: 180px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.acc-card-img img { max-width:100%; max-height:100%; object-fit:contain; transition:transform .3s ease; }
.acc-card:hover .acc-card-img img { transform: scale(1.05); }
.acc-card-img-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:2rem; color:var(--medium-gray); background:var(--light-gray); }
.acc-card h3 {
    margin: 0;
    padding: 0.4rem 0.6rem;
    color: var(--aprilia-purple);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}
.acc-card .acc-card-count { font-size:0.85rem; color:var(--dark-gray); padding:0 0.5rem 0.9rem; margin-top:auto; }
.acc-section-title {
    font-size: 1.4rem; font-weight: 700; color: var(--aprilia-purple);
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--aprilia-purple); text-align: center;
}

/* Listing page header — breadcrumb + controls, Ducati style */
.acc-list-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; flex-wrap:wrap; gap:.5rem; }
.acc-list-breadcrumb { color:var(--aprilia-purple); font-weight:600; font-size:.9rem; text-transform:uppercase; flex:1; }
.acc-list-breadcrumb a { color:var(--aprilia-purple); }
.acc-list-breadcrumb a:hover { text-decoration:underline; }
.acc-list-breadcrumb .separator { margin:0 .4rem; color:var(--aprilia-purple); }
.acc-list-controls { display:flex; align-items:center; gap:1rem; flex-shrink:0; }
.acc-instock-btn {
    display:inline-flex; align-items:center; gap:.4rem; padding:.45rem 1rem;
    border:2px solid var(--aprilia-purple); border-radius:6px; font-size:.9rem; font-weight:600;
    color:var(--aprilia-purple); background:var(--white); cursor:pointer; white-space:nowrap; transition:all .2s;
}
.acc-instock-btn:hover { border-color:var(--aprilia-purple-dark); }
.acc-instock-btn.active { background:#28a745; border-color:#28a745; color:#fff; }
.acc-instock-btn input { display:none; }
.acc-sort-select {
    padding:.5rem 1rem; border:2px solid var(--aprilia-purple); border-radius:6px;
    font-size:.9rem; font-weight:600; color:var(--aprilia-purple); background:var(--white); cursor:pointer;
}
.acc-sort-select:hover { border-color:var(--aprilia-purple-dark); }

/* Listing items — name top, image, price+dot footer */
.acc-list { display:grid; grid-template-columns:repeat(4,1fr); gap:1.5rem; margin-bottom:2rem; }
.acc-item {
    background:var(--white); position:relative; border:2px solid var(--aprilia-purple);
    border-radius:8px; overflow:hidden; transition:all .3s ease; cursor:pointer;
    box-shadow:var(--shadow); display:flex; flex-direction:column;
}
.acc-item:hover { border-color:var(--aprilia-purple-dark); transform:translateY(-4px); box-shadow:0 4px 16px rgba(139,0,139,.25); }
.acc-item.in-stock { border-color:#2e7d32; }
.acc-item.in-stock:hover { border-color:#1b5e20; box-shadow:0 4px 16px rgba(46,125,50,.35); }
.acc-item-name {
    font-size:.9rem; font-weight:600; color:var(--text-dark); line-height:1.3;
    text-align:center; padding:1.35rem .75rem .35rem; min-height:2.8em;
    display:flex; align-items:center; justify-content:center;
}
.acc-item-img { width:100%; height:200px; background:var(--white); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.acc-item-img img { max-width:100%; max-height:100%; object-fit:contain; }
.acc-item-img-placeholder { font-size:3rem; color:var(--medium-gray); }
.acc-item-footer { display:flex; justify-content:center; align-items:center; margin-top:auto; padding:.3rem .75rem .6rem; border-top:1px solid var(--light-gray); position:relative; }
.acc-item-price-wrap { display:flex; align-items:center; justify-content:center; gap:.5rem; flex-wrap:wrap; flex:1; }
.acc-item-price { font-size:1rem; font-weight:700; color:var(--aprilia-purple); }
.acc-item-sku { font-size:.8rem; color:var(--dark-gray); font-family:monospace; }
.acc-item-footer .avail-circle { position:absolute; right:.75rem; top:50%; transform:translateY(-50%); }
.avail-circle { display:inline-block; width:12px; height:12px; border-radius:50%; }
.avail-circle.green{background:#2e7d32}.avail-circle.yellow{background:#f3cd33}.avail-circle.red{background:#cc0000}.avail-circle.grey{background:#ccc}
.instock-now{color:#2e7d32;font-size:.68rem;font-weight:700;letter-spacing:.04em;white-space:nowrap}
.acc-item-footer .instock-now{position:absolute;right:1.9rem;top:50%;transform:translateY(-50%)}
.acc-badge { font-size:.65rem; padding:.15rem .5rem; border-radius:3px; font-weight:600; text-transform:uppercase; }
.acc-badge-discontinued { background:#ffe0e0; color:#c00; }

/* ── product modal ── */
.acc-modal { display:none; position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,.7); align-items:center; justify-content:center; }
.acc-modal.open { display:flex; }
.acc-modal-box { background:#fff; border-radius:12px; max-width:860px; width:92%; max-height:86vh; overflow-y:auto; box-shadow:0 8px 30px rgba(0,0,0,.35); }
.acc-m-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:20px 24px 0; }
.acc-m-head h2 { margin:0; font-size:1.25rem; color:var(--aprilia-purple); line-height:1.3; }
.acc-m-close { background:none; border:none; font-size:1.8rem; cursor:pointer; color:#666; line-height:1; }
.acc-m-close:hover { color:var(--aprilia-purple); }
.acc-m-sku { padding:4px 24px 0; font-size:.85rem; color:#888; font-family:monospace; }
.acc-m-body { display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:16px 24px 24px; }
.acc-m-img { display:flex; align-items:flex-start; justify-content:center; }
.acc-m-img img { max-width:100%; max-height:340px; object-fit:contain; }
.acc-m-desc { font-size:.9rem; line-height:1.55; color:#444; margin-bottom:14px; }
.acc-m-price { font-size:1.3rem; font-weight:700; color:var(--aprilia-purple); margin-bottom:12px; }
.acc-variant { display:flex; align-items:center; gap:10px; padding:9px 0; border-top:1px solid #eee; flex-wrap:wrap; }
.acc-variant .v-sku { font-weight:600; font-size:.85rem; font-family:monospace; }
.acc-variant .v-attr { font-size:.8rem; color:#666; background:var(--light-gray); border-radius:4px; padding:2px 8px; }
.acc-variant .v-price { margin-left:auto; font-weight:600; }
.acc-variant .v-tag { font-size:.7rem; font-weight:700; color:#999; border:1px solid #ccc; border-radius:3px; padding:1px 6px; }
.acc-add { background:var(--aprilia-purple); color:#fff; border:none; border-radius:5px; padding:8px 16px; font-size:.85rem; font-weight:600; cursor:pointer; }
.acc-add:hover { background:var(--aprilia-purple-dark); }
.acc-add[disabled] { background:#ccc; cursor:not-allowed; }
.acc-m-atts { margin-top:12px; font-size:.85rem; }
.acc-m-atts a { color:var(--aprilia-purple); }
@media (max-width:1100px){ .acc-list{grid-template-columns:repeat(3,1fr)} .acc-grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:700px){ .acc-m-body{grid-template-columns:1fr} .acc-list{grid-template-columns:repeat(2,1fr)} .acc-grid{grid-template-columns:repeat(2,1fr); gap:16px} }
.acc-m-thumbs { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; justify-content:center; }
.acc-m-thumbs img { width:52px; height:52px; object-fit:contain; border:2px solid var(--medium-gray); border-radius:4px; cursor:pointer; padding:2px; background:#fff; }
.acc-m-thumbs img:hover { border-color:var(--aprilia-purple-dark); }
.acc-m-thumbs img.active { border-color:var(--aprilia-purple); }
