/* Project-owned storefront styles. Loaded after the theme so it can override it. */

/* Temporary text wordmark, shown until a site logo is configured in settings. */
.site-wordmark {
    color: var(--black);
    display: inline-block;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.dark .site-wordmark {
    color: var(--white);
}

/* .header-area (partials/header-hero.blade.php) sits on a dark hero and
   already sets its own nav-link color to white; the text wordmark is a
   project component the vendor rule doesn't reach, so it needs the same
   treatment here. */
.header-area .site-wordmark {
    color: var(--white);
}

/* The offcanvas logo box is sized for a fixed-width image; let the text wordmark
   use its own width and wrap instead of overflowing into the close button. */
.offset-logo:has(.site-wordmark) {
    width: auto;
    max-width: 160px;
}

.offset-logo .site-wordmark {
    font-size: 18px;
    white-space: normal;
}

/* == header navigation == */
/* The theme only opens .dp-menu on :hover, leaving it unreachable by
   keyboard. Mirror the hover state on focus-within so Tab navigation can
   reach the dropdown links. */
.main-menu li.menu-item-has-children:focus-within > ul.dp-menu {
    opacity: 1;
    pointer-events: all;
}

/* == breadcrumb == */
.breadcrumb {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.breadcrumb li:not(:first-child)::before {
    content: "/";
    color: var(--secondary);
}

.breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb li.is-current span {
    color: var(--primary);
    font-weight: 500;
}

/* == product grid == */
/* Modelled on the theme's works-12-wrapper mechanics (plain responsive
   columns, fixed aspect-ratio image box), not on .team-8-wrapper, which is
   hard-coded for exactly five items. */
.product-grid {
    display: grid;
    gap: 44px 10px;
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Staggered look reproduced with a repeating cycle, never fixed nth-child
   positions, so it still works past the fifth item and across page
   boundaries. */
.product-grid > *:nth-child(4n+2) {
    margin-top: 60px;
}

.product-grid > *:nth-child(4n+4) {
    margin-top: 30px;
}

@media (max-width: 767px) {
    .product-grid > * {
        margin-top: 0;
    }
}

/* Card visuals mirror the theme's team-8-box look (thumb overflow hidden,
   scale(1.1) hover, title line, secondary line), authored as a project
   component rather than by reusing the team classes. */
.product-card {
    pointer-events: none;
}

.product-card__thumb-link {
    display: block;
    pointer-events: auto;
}

.product-card__thumb {
    position: relative;
    aspect-ratio: 100/82;
    overflow: hidden;
    background-color: var(--border);
}

.product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-card__thumb img {
    transform: scale(1.1);
}

/* Reserved for a later promotions issue; product-card.blade.php never
   renders this yet because campaignLabel stays empty until promotions
   exist. */
.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 3px;
    background-color: var(--action);
    color: var(--white);
    font-size: 12px;
    line-height: 1.4;
}

.product-card__content {
    margin-top: 15px;
    pointer-events: auto;
}

.product-card__brand {
    display: block;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--secondary);
}

.product-card__title {
    margin: 4px 0 0;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    letter-spacing: -0.05em;
}

.product-card__title a {
    color: inherit;
    text-decoration: none;
}

.product-card__title a:hover {
    color: var(--secondary);
}

.product-card__price {
    display: block;
    margin-top: 6px;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 16px;
    color: var(--primary);
}

.product-card__price-compare {
    margin-left: 8px;
    color: var(--secondary);
    text-decoration: line-through;
    font-size: 14px;
}

.product-card__availability {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
}

.product-card__availability--warning {
    color: var(--action);
}

/* The theme has no error/critical design token (--primary/--secondary/
   --action are its only semantic colors), so this is a deliberate one-off
   rather than a missed var(--...) reference. */
.product-card__availability--critical {
    color: #C0392B;
}

/* == pagination == */
/* A project-owned name, not the bare .pagination class: almost every
   .pagination selector in the vendor CSS is swiper slider pagination. */
.pagination-nav {
    margin-top: 60px;
}

@media (max-width: 991px) {
    .pagination-nav {
        margin-top: 40px;
    }
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Prev/Next controls reuse the bordered-pill button language of
   .work-details-area .pagination a, the theme's only non-swiper
   pagination markup. */
.pagination-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 24px;
    border: 1px solid var(--border);
    border-radius: 90px;
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font_bdogrotesk), sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.pagination-control:hover {
    background-color: var(--primary);
    border-color: transparent;
    color: var(--white);
}

.dark .pagination-control:hover {
    color: var(--black);
}

.pagination-control.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font_bdogrotesk), sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-page:hover {
    background-color: var(--border);
}

.pagination-page.is-current {
    background-color: var(--primary);
    color: var(--white);
    font-weight: 500;
}

.dark .pagination-page.is-current {
    color: var(--black);
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--secondary);
}

/* == empty state == */
.empty-state {
    padding: 80px 20px;
    text-align: center;
}

.empty-state__title {
    margin: 0;
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 20px;
}

.empty-state__description {
    margin: 8px 0 0;
    color: var(--secondary);
}

/* == category toolbar == */
/* Filter shell (F09-T05, filled in by #96) and sort control (F09-T06),
   built from scratch: the theme ships no isotope/filter/sort UI at all. */
.category-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    /* team-8-wrapper's own boxes are position: static (vendor CSS), and by
       design (grid-column: 4 on the first box, large negative margin-top on
       the rest, section 3.1) they visually float up over whatever precedes
       them — a known, accepted limitation of that grid for its own layout.
       Without a stacking context here, that later-in-DOM static content
       paints over this toolbar too, making the sort control unclickable.
       position + z-index (no vendor file touched) keeps it on top. */
    position: relative;
    z-index: 1;
}

.category-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    color: var(--secondary);
}

.category-toolbar__filters-label {
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.category-toolbar__filters-placeholder {
    font-size: 14px;
}

.category-toolbar__sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.category-toolbar__sort-label {
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 14px;
    color: var(--secondary);
}

.category-toolbar__sort-select {
    height: 42px;
    padding: 0 36px 0 16px;
    border: 1px solid var(--border);
    border-radius: 90px;
    background-color: transparent;
    color: var(--primary);
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 14px;
}

/* Auto-submitting the select on change would be a JS-only interaction; the
   button keeps the form usable with keyboard/no-JS, so it stays visible
   rather than being hidden behind progressive enhancement. */
.category-toolbar__sort-submit {
    height: 42px;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 90px;
    background-color: transparent;
    color: var(--primary);
    font-family: var(--font_bdogrotesk), sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.category-toolbar__sort-submit:hover {
    background-color: var(--primary);
    border-color: transparent;
    color: var(--white);
}

.dark .category-toolbar__sort-submit:hover {
    color: var(--black);
}

/* == team-8-box availability (storefront.catalog.categories.default only) == */
/* Mirrors .product-card__availability's warning/critical tone split; a
   separate class because team-8-box is vendor markup (name/post only) with
   no availability slot of its own. */
.team-8-box__availability {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
}

.team-8-box__availability--warning {
    color: var(--action);
}

.team-8-box__availability--critical {
    color: #C0392B;
}

/* == product gallery == */
/* New design work (#38): the purchased theme has no gallery of its own.
   The cover image sits in the hero's own .section-thumb
   (temp/storefront-theme/tuttourundetay2-2.html); this is the thumbnail
   rail for the remaining images, sharing the storefront image ratio from
   docs/reference/storefront-theme-conventions.md section 4. */
/* The vendor .hero-area-service-details .section-thumb img rule only sets
   width: 100% (no height/aspect-ratio), so the browser reserves a box from
   the <img> width/height attributes alone; those attributes cannot match
   every source photo's exact ratio, so this pins the box to the same
   storefront ratio the rest of the gallery uses and crops with object-fit,
   avoiding layout shift once the real (non-square) image loads. */
.hero-area-service-details .section-thumb {
    aspect-ratio: 100/82;
    overflow: hidden;
}

.hero-area-service-details .section-thumb img {
    height: 100%;
    object-fit: cover;
}

.product-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.product-gallery__thumb {
    display: block;
    aspect-ratio: 100/82;
    overflow: hidden;
    background-color: var(--border);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.product-gallery__thumb:hover img {
    opacity: 0.8;
}

/* == admin product preview pricing (admin-only, shared show.blade.php) == */
.admin-preview-pricing {
    margin: 40px 0;
    padding: 30px;
    border: 1px solid var(--border);
}

.admin-preview-pricing__fields {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
    .admin-preview-pricing__fields {
        grid-template-columns: 1fr;
    }
}

.admin-preview-pricing__fields dt {
    font-size: 13px;
    color: var(--secondary);
}

.admin-preview-pricing__fields dd {
    margin: 4px 0 0;
    font-weight: 500;
}

.admin-preview-pricing__variable {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.admin-preview-pricing__counts {
    margin-top: 6px;
    font-size: 13px;
    color: var(--secondary);
}
