.recently-viewed { margin:30px 0; clear:both; min-width:0; }
.recently-viewed[hidden],.rv-controls[hidden] { display:none; }
.rv-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.recently-viewed .rv-title { margin:0; font-size:24px; line-height:1.25; font-weight:600; }
.rv-controls { display:flex; gap:8px; }
.rv-arrow { width:40px; height:40px; border:1px solid #ddd; border-radius:5px; background:#fff; color:#292a2e; font-size:26px; line-height:1; }
.rv-arrow:hover:not(:disabled) { background:#f0f3f8; }
.rv-arrow:disabled { opacity:.35; cursor:default; }
.rv-track { display:flex; gap:0; overflow-x:auto; overscroll-behavior-x:none; scroll-padding-inline-start:2px; scroll-snap-type:x proximity; padding:2px 2px 12px; scrollbar-width:thin; }
.rv-card a:focus-visible { outline:2px solid #007bff; outline-offset:2px; }
@media(max-width:600px) {
 .recently-viewed .rv-title { font-size:20px; }
 .rv-arrow { width:34px; height:34px; }
}
/* Shared catalogue card layout for similar and recently viewed products. */
.recently-viewed .a-main_boxpr.similar_products.rv-track {
 display:flex; flex-wrap:nowrap; gap:0px; margin:0; padding:2px 2px 12px !important;
 white-space:normal; overflow-x:auto; font-size:14px;
}
.recently-viewed .rv-track > .a-col-pr {
 flex:0 0 220px; width:220px; min-width:0; padding:0; scroll-snap-align:start;
 border:0; background:transparent;
}
.recently-viewed .a-col-pr .a-item { margin:5px 0 0; padding:0 4px; height:100%; }
.recently-viewed .a-item_img { height:220px; width:100%; padding:14px; }
.recently-viewed .a-item:hover .a-item_img { padding:5px; }

.recently-viewed .a-item_name { overflow-wrap:anywhere; }

@media(max-width:600px) {
 .recently-viewed .rv-track > .a-col-pr { flex-basis:170px; width:170px; }
 .recently-viewed .a-item_img { height:170px; }
}

@media (any-pointer: coarse) {
 .recently-viewed .rv-track { scroll-snap-type:none; }
}
