/*
 * Project overrides for the Partsix theme.
 * Loaded AFTER assets/css/style.css. Never edit the vendor stylesheet directly.
 */

/* ---------------------------------------------------------------- Header  */

.header__bottom--text {
    padding: 12px 0 12px 24px;
    font-size: 14px;
    line-height: 1.4;
}

.dropdown__categories--menu .categories__menu--link {
    display: block;
    padding: 10px 20px;
}

/* The theme's newsletter button is position:absolute inside the subscribe form.
   This CTA is a standalone link, so it uses primary__btn instead. */
.newsletter__cta--btn {
    white-space: nowrap;
}

/* ------------------------------------------------------------------ Hero  */
.hero__cta--link {
    transition: gap 0.25s ease, transform 0.25s ease;
}

.hero__cta--link:hover .hero__cta--icon,
.hero__cta--link:focus-visible .hero__cta--icon {
    transform: translateX(4px);
}

.hero__cta--icon {
    display: block;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
/* Opening slide. The theme ships background classes for its own slide styles
   only, so this one follows the same shape as .slider4__items--bg1. The image is
   a finished photograph, so it carries no cut-out layer. */
.home__hero--slide__photo {
    background: url(../img/slider/home5-slider-thumb.webp);
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    position: relative;
}

/* Narrow viewports crop that photograph to its middle, putting the wheel and
   the disc directly behind the copy, and `cover` gives no way to steer the crop
   off them. A scrim keeps the text readable without dropping the image; the
   theme already gives .slider__content z-index 9, so the copy stays on top. */
@media only screen and (max-width: 991px) {
    .home__hero--slide__photo::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.78);
    }
}

/* The vehicle search rides over the hero's bottom edge, as in the theme's
   home-5 layout, but stays in normal flow so it can never be pushed off-screen
   or hidden behind the slider. The z-index is required: Swiper puts z-index:1
   on its container, which otherwise paints the slides over this. */
.home__hero--search {
    position: relative;
    z-index: 2;
}

@media only screen and (min-width: 992px) {
    .home__hero--search {
        margin-top: -9rem;
    }
}

/* ---------------------------------------------------------------- Product  */

/* Two of the three hover actions post, so they are <button>s while "view" is a
   link. Without this they carry the UA border and padding, and the theme's
   line-height centring — tuned for an inline anchor — leaves their icon off
   centre. Flex centring works for both element types, so all three match. */
.product__card--action__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    appearance: none;
}

/* Already compared or saved: the filled state the theme gives these on hover. */
.product__card--action__btn.is-active {
    background: var(--secondary-color);
    color: var(--text-white-color);
}

.product__card--action__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* "Featured" is an editorial pick, not a price cut, so it does not borrow the
   theme's red discount circle — that circle is also 4rem wide and mangles a
   word this long. A dark pill in the opposite corner reads as a different kind
   of mark and leaves the discount badge free to appear alongside it. */
.product__badge--featured {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 5px 10px;
    border-radius: 3px;
    background: var(--primary-color);
    color: var(--text-white-color);
    font-family: var(--inter-fonts);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product__badge--featured svg {
    width: 11px;
    height: 11px;
}

.product__card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product__card--content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.product__card--footer {
    margin-top: auto;
}

/* Reserve the image box so cards do not shift while thumbnails decode. */
.product__card--thumbnail__link {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product__card--thumbnail__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product__card--meta {
    gap: 6px;
    margin-bottom: 8px;
    padding: 0;
    list-style: none;
}

.product__card--meta__item {
    padding: 2px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    color: #666;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.product__card--title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.6em;
}

.product__card--stock,
.product__details--stock {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}

.product__card--stock.is-in-stock,
.product__details--stock.is-in-stock {
    color: #1a8245;
}

.product__card--stock.is-out-of-stock,
.product__details--stock.is-out-of-stock {
    color: #c0392b;
}

/* Single-image products keep the thumbnail swiper in the DOM but hidden, so
   adding a product_images relation later needs no markup change. */
.product__media--nav.is-hidden {
    display: none;
}

.product__media--preview__items--img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Hover magnifier. The frame clips, the image scales inside it, and the JS
   moves the transform origin to the pointer. The cursor advertises it, since a
   zoom with no affordance is a zoom nobody finds. */
.product__media--preview__items--link[data-product-zoom] {
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

.product__media--preview__items--link[data-product-zoom] .product__media--preview__items--img {
    transition: transform 0.35s ease-out;
}

.product__media--preview__items--link[data-product-zoom].is-zooming .product__media--preview__items--img {
    transform: scale(2);
    /* Short, so the image tracks the pointer instead of lagging behind it. */
    transition: transform 0.12s linear;
}

/* The zoom itself is the point, so it stays; only the easing goes. */
@media (prefers-reduced-motion: reduce) {
    .product__media--preview__items--link[data-product-zoom] .product__media--preview__items--img,
    .product__media--preview__items--link[data-product-zoom].is-zooming .product__media--preview__items--img {
        transition: none;
    }
}

.product__details--actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

.product__details--actions__link {
    width: 100%;
    color: #666;
    font-size: 14px;
}

.secondary__btn {
    display: inline-block;
    padding: 14px 28px;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    color: #222;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.secondary__btn:hover,
.secondary__btn:focus-visible {
    border-color: #222;
    background-color: #222;
    color: #fff;
}

/* -------------------------------------------------------------- Wishlist  */

.wishlist__clear--btn {
    padding: 0;
    border: 0;
    background: none;
    color: #666;
    font-size: 1.4rem;
    text-decoration: underline;
}

.wishlist__clear--btn:hover {
    color: var(--secondary-color);
}

.wishlist__footnote {
    margin-top: 30px;
    color: #666;
}

/* ------------------------------------------------------------------ Shop  */

.shop__filters--form .widget__search--input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

/* The theme fully styles .widget__form--check__list / --label / --checkmark.
   Only the product count and the focus ring are ours — do not restyle the
   label, or the bordered pill and its checkmark circle collapse. */
.widget__form--count {
    margin-left: 4px;
    color: #999;
}

/* The real input is opacity:0 and sits over the circle, so move the focus ring
   onto the checkmark to keep keyboard navigation visible. */
.widget__form--check__input:focus-visible {
    outline: none;
}

.widget__form--check__input:focus-visible ~ .widget__form--checkmark {
    outline: 2px solid #ff2d37;
    outline-offset: 2px;
}

/* Highlight the whole row for the active filter, not just the circle.
   The theme already fills the checkmark via :checked ~ .widget__form--checkmark. */
.widget__form--check__list:has(.widget__form--check__input:checked) .widget__form--check__label {
    border-color: var(--secondary-color);
    font-weight: 600;
}

.widget__reset--link {
    display: inline-block;
    margin-top: 12px;
    color: #666;
    font-size: 14px;
    text-decoration: underline;
}

.pagination__item--arrow.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Soften the reviews empty state so it does not fight the tab panel around it. */
#reviews .empty__state {
    border-style: solid;
    border-color: #ececec;
    background-color: #fafafa;
}

.product__review--item {
    padding: 24px 0;
    border-bottom: 1px solid #ececec;
}

.product__review--item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.product__review--item__head {
    gap: 12px;
    margin-bottom: 8px;
}

.product__review--item__title {
    margin: 0;
    font-size: 1.6rem;
}

.product__review--item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    color: #777;
    font-size: 1.3rem;
}

.product__review--item__verified {
    padding: 2px 8px;
    border-radius: 3px;
    background-color: #e8f6ee;
    color: #14612f;
    font-size: 1.1rem;
    font-weight: 600;
}

.product__review--item__body {
    margin-bottom: 8px;
}

.product__review--item__helpful {
    margin: 0;
    color: #999;
    font-size: 1.2rem;
}

.reviews__summary--caption {
    margin-left: 12px;
    color: #666;
}

.product__details--tab__list {
    cursor: pointer;
}

/* ----------------------------------------------------------- Account page  */

.account__contact--panel {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.account__contact--panel__title {
    margin-bottom: 20px;
}

.account__contact--panel__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.account__contact--panel__list li {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.account__contact--panel__list li:last-child {
    border-bottom: 0;
}

.account__contact--panel__list strong {
    flex: 0 0 110px;
}

/* ----------------------------------------------------------- Empty state  */

.empty__state {
    padding: 60px 20px;
    border: 1px dashed #dcdcdc;
    border-radius: 6px;
}

.empty__state--icon {
    margin-bottom: 20px;
    color: #c4c4c4;
}

.empty__state--desc {
    max-width: 520px;
    margin: 0 auto 24px;
    color: #666;
}

/* --------------------------------------------------------------- Contact  */

.alert {
    margin-bottom: 30px;
    padding: 16px 20px;
    border-radius: 4px;
    border-left: 4px solid transparent;
}

.alert--success {
    border-left-color: #1a8245;
    background-color: #e8f6ee;
    color: #14612f;
}

.alert--error {
    border-left-color: #c0392b;
    background-color: #fdecea;
    color: #8f2419;
}

.contact__form--context {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.contact__form--label__optional {
    color: #999;
    font-weight: 400;
}

.contact__form--error {
    margin: 6px 0 0;
    color: #c0392b;
    font-size: 13px;
}

.contact__form--input.is-invalid,
.contact__form--textarea.is-invalid {
    border-color: #c0392b;
}

/* Keyboard focus must stay visible on every interactive element. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff2d37;
    outline-offset: 2px;
}

/* ------------------------------------------------------- Customer panel  */

.customer__topbar {
    padding: 16px 0;
    border-bottom: 1px solid #e5e5e5;
}

.customer__topbar--nav a {
    margin-left: 20px;
}

.customer__panel--body {
    padding: 40px 0 60px;
}
