/* =============================================================
   Gillmore Aquatics — PLP + Product Card Styles
   Compiled separately from Tailwind, loads after Storefront.
   ============================================================= */

/* ── 1. Page structure overrides (Storefront) ──────────────── */

/* Fix dark body background on archive pages */
body.woocommerce-page,
body.tax-product_cat,
body.post-type-archive-product,
body.archive {
    background-color: #f3f3f3 !important;
}

/* Storefront wraps content in .col-full > #primary — reset widths */
body.tax-product_cat #primary,
body.post-type-archive-product #primary,
body.archive.woocommerce-page #primary {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide Storefront's default sidebar on shop/category pages */
body.tax-product_cat #secondary,
body.post-type-archive-product #secondary {
    display: none !important;
}

body.tax-product_cat .col-full,
body.post-type-archive-product .col-full {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ── 2. PLP Hero ───────────────────────────────────────────── */

.gillmore-plp-hero {
    position: relative;
    min-height: 240px;
    background: #111827;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.gillmore-plp-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.gillmore-plp-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.12) 100%);
}

.gillmore-plp-hero__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    box-sizing: border-box;
}

.gillmore-plp-hero__title {
    color: #fff;
    font-family: Manrope, sans-serif;
    font-weight: 900;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 0;
}

.gillmore-plp-hero__desc {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    max-width: 40rem;
    line-height: 1.65;
    margin: 0.5rem 0 0;
}

/* Breadcrumb inside hero */
.gillmore-plp-hero__inner .woocommerce-breadcrumb {
    color: rgba(255,255,255,0.65) !important;
    font-size: 0.8rem !important;
}
.gillmore-plp-hero__inner .woocommerce-breadcrumb a {
    color: rgba(255,255,255,0.65) !important;
}

/* ── 3. PLP Body wrapper ───────────────────────────────────── */

.gillmore-plp-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 4rem;
    box-sizing: border-box;
}

/* ── 4. Category pills ─────────────────────────────────────── */

.gillmore-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.gillmore-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: Inter, sans-serif;
    border: 1px solid rgba(228,190,186,0.5);
    background: #fff;
    color: #4c616c;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
}
.gillmore-cat-pill:hover {
    border-color: #C62828;
    color: #C62828;
}
.gillmore-cat-pill.active {
    background: linear-gradient(135deg, #C62828, #8e0000);
    color: #fff;
    border-color: #C62828;
}

.gillmore-cat-pill__count {
    background: rgba(0,0,0,0.1);
    border-radius: 9999px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
}
.gillmore-cat-pill.active .gillmore-cat-pill__count {
    background: rgba(255,255,255,0.2);
}

/* ── 5. Layout: sidebar + grid ─────────────────────────────── */

.gillmore-plp-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.gillmore-plp-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 5.5rem;
    display: none; /* hidden on mobile, shown via media query */
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .gillmore-plp-sidebar {
        display: flex;
    }
}

.gillmore-plp-grid-col {
    flex: 1;
    min-width: 0;
}

/* ── 6. Filter widget card ─────────────────────────────────── */

.gillmore-plp-widget {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(228,190,186,0.3);
    padding: 1.25rem;
}

.gillmore-plp-widget__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4c616c;
    margin: 0 0 0.875rem;
    font-family: Inter, sans-serif;
}

/* Price slider — override jQuery UI purple */
.gillmore-plp-widget .ui-slider,
.gillmore-plp-mobile-filter .ui-slider {
    background: #e4beba !important;
    border: none !important;
    border-radius: 9999px !important;
    height: 4px !important;
    margin: 0.75rem 0.5rem 0.75rem !important;
}
.gillmore-plp-widget .ui-slider-range,
.gillmore-plp-mobile-filter .ui-slider-range {
    background: #C62828 !important;
    border-radius: 9999px !important;
}
.gillmore-plp-widget .ui-slider-handle,
.gillmore-plp-mobile-filter .ui-slider-handle {
    background: #C62828 !important;
    border: 2px solid #fff !important;
    border-radius: 9999px !important;
    width: 16px !important;
    height: 16px !important;
    top: -6px !important;
    outline: none !important;
    cursor: pointer !important;
    box-shadow: 0 1px 4px rgba(198,40,40,0.35) !important;
}
.gillmore-plp-widget .ui-slider-handle:focus,
.gillmore-plp-mobile-filter .ui-slider-handle:focus {
    box-shadow: 0 0 0 3px rgba(198,40,40,0.2) !important;
}
.gillmore-plp-widget .price_slider_amount,
.gillmore-plp-mobile-filter .price_slider_amount {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 0.5rem !important;
    gap: 0.5rem !important;
    clear: both !important;
}
.gillmore-plp-widget .price_label,
.gillmore-plp-mobile-filter .price_label {
    font-size: 0.8rem !important;
    color: #4c616c !important;
    order: 2 !important;
}
.gillmore-plp-widget .button,
.gillmore-plp-mobile-filter .button {
    background: linear-gradient(135deg, #C62828, #8e0000) !important;
    color: #fff !important;
    border-radius: 0.5rem !important;
    border: none !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    order: 1 !important;
    font-family: Inter, sans-serif !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ── 7. Toolbar ────────────────────────────────────────────── */

.gillmore-plp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(228,190,186,0.3);
}

.gillmore-plp-toolbar .woocommerce-result-count {
    font-size: 0.875rem !important;
    color: #4c616c !important;
    margin: 0 !important;
    float: none !important;
}

.gillmore-plp-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gillmore-plp-filter-btn {
    display: none; /* shown on mobile */
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: Inter, sans-serif;
    border: 1px solid rgba(228,190,186,0.5);
    border-radius: 0.5rem;
    padding: 0.45rem 0.875rem;
    background: #fff;
    cursor: pointer;
    outline: none;
    color: #1a1c1c;
}
.gillmore-plp-filter-btn .material-symbols-outlined {
    font-size: 1rem;
}
@media (max-width: 1023px) {
    .gillmore-plp-filter-btn { display: flex; }
}

.gillmore-plp-toolbar .woocommerce-ordering {
    float: none !important;
    margin: 0 !important;
}
.gillmore-plp-toolbar .woocommerce-ordering select {
    border: 1px solid rgba(228,190,186,0.4) !important;
    border-radius: 0.5rem !important;
    padding: 0.45rem 2rem 0.45rem 0.875rem !important;
    font-size: 0.875rem !important;
    font-family: Inter, sans-serif !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    color: #1a1c1c !important;
    height: auto !important;
}

/* ── 8. Mobile filter panel ────────────────────────────────── */

.gillmore-plp-mobile-filter {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(228,190,186,0.3);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.gillmore-plp-mobile-filter.hidden,
.hidden { display: none !important; }

/* ── 9. Product grid ───────────────────────────────────────── */

.gillmore-plp-grid ul.products {
    display: grid !important;
    gap: 1.125rem !important;
    grid-template-columns: repeat(2, 1fr) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .gillmore-plp-grid ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .gillmore-plp-grid ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1280px) {
    .gillmore-plp-grid ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ── 10. Product card ──────────────────────────────────────── */

.gillmore-card {
    background: #fff !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(228,190,186,0.2) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.28s ease !important;
    cursor: pointer !important;
}

.gillmore-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 40px rgba(198,40,40,0.11) !important;
}

/* Image wrapper */
.gillmore-card__img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
    text-decoration: none;
}

.gillmore-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gillmore-card:hover .gillmore-card__img {
    transform: scale(1.06);
}

/* Badge */
.gillmore-card__badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: Inter, sans-serif;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    line-height: 1.6;
}
.gillmore-card__badge--hot  { background: #C62828; color: #fff; }
.gillmore-card__badge--sale { background: #fff3cd; color: #92400e; }
.gillmore-card__badge--grades { background: #e0f2fe; color: #0369a1; }

/* Wishlist button */
.gillmore-card__wishlist {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.88);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.gillmore-card__wishlist:hover { background: #fff; }
.gillmore-card__wishlist .material-symbols-outlined {
    font-size: 1rem;
    color: #8f6f6c;
}

/* Hover overlay CTA (variable only) */
.gillmore-card__hover-cta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #C62828, #8e0000);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: Inter, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.625rem;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}
.gillmore-card__hover-cta .material-symbols-outlined { font-size: 1rem; }
.gillmore-card:hover .gillmore-card__hover-cta { transform: translateY(0); }

/* Card body */
.gillmore-card__body {
    padding: 0.875rem 0.875rem 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gillmore-card__cat {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: #8f6f6c;
    margin: 0 0 0.3rem;
    font-family: Inter, sans-serif;
}

.gillmore-card__name {
    font-family: Manrope, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gillmore-card__name a {
    color: #1a1c1c;
    text-decoration: none;
    transition: color 0.2s;
}
.gillmore-card__name a:hover { color: #C62828; }

/* Star rating */
.gillmore-card__rating {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 0.5rem;
}
.gillmore-card__star { font-size: 0.8rem; line-height: 1; font-style: normal; }
.gillmore-card__star--full,
.gillmore-card__star--half  { color: #f59e0b; }
.gillmore-card__star--empty { color: #d4d4d4; }
.gillmore-card__review-count {
    font-size: 0.72rem;
    color: #8f6f6c;
    margin-left: 0.25rem;
}

/* Price + CTA footer */
.gillmore-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.625rem;
    border-top: 1px solid rgba(228,190,186,0.2);
}

.gillmore-card__price {
    font-family: Manrope, sans-serif;
    font-weight: 900;
    font-size: 1.05rem;
    color: #C62828;
    line-height: 1.2;
}
.gillmore-card__price .gillmore-card__from {
    font-size: 0.7rem;
    font-weight: 600;
    color: #8f6f6c;
    display: block;
    line-height: 1;
    margin-bottom: 0.1rem;
    font-family: Inter, sans-serif;
}

/* Variable → "Select" pill button */
.gillmore-card__select-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: Inter, sans-serif;
    color: #C62828;
    border: 1.5px solid #C62828;
    border-radius: 9999px;
    padding: 0.3rem 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.gillmore-card__select-btn .material-symbols-outlined { font-size: 0.85rem; }
.gillmore-card__select-btn:hover {
    background: #C62828;
    color: #fff;
}

/* Simple → icon add to cart button */
.gillmore-card__atc-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #C62828, #8e0000);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: opacity 0.2s, transform 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.gillmore-card__atc-btn:hover { opacity: 0.9; }
.gillmore-card__atc-btn:active { transform: scale(0.93); }
.gillmore-card__atc-btn .material-symbols-outlined { font-size: 1.05rem; }

.gillmore-card__oos {
    font-size: 0.72rem;
    color: #8f6f6c;
    font-family: Inter, sans-serif;
}

/* ── 11. Pagination ────────────────────────────────────────── */

.gillmore-plp-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.gillmore-plp-pagination .woocommerce-pagination ul {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
.gillmore-plp-pagination .woocommerce-pagination ul li {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.gillmore-plp-pagination .woocommerce-pagination ul li a,
.gillmore-plp-pagination .woocommerce-pagination ul li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(228,190,186,0.4) !important;
    color: #4c616c !important;
    background: #fff !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}
.gillmore-plp-pagination .woocommerce-pagination ul li a:hover {
    border-color: #C62828 !important;
    color: #C62828 !important;
    background: #fff5f5 !important;
}
.gillmore-plp-pagination .woocommerce-pagination ul li span.current {
    background: linear-gradient(135deg, #C62828, #8e0000) !important;
    color: #fff !important;
    border-color: #C62828 !important;
}

/* ── 12. Empty state ───────────────────────────────────────── */

.gillmore-plp-empty {
    text-align: center;
    padding: 5rem 1rem;
}
.gillmore-plp-empty .material-symbols-outlined {
    font-size: 4rem;
    color: #8f6f6c;
    display: block;
    margin-bottom: 1rem;
}
.gillmore-plp-empty h2 {
    font-family: Manrope, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: #1a1c1c;
}
.gillmore-plp-empty p {
    color: #4c616c;
    margin: 0 0 1.5rem;
}

/* ── 13. Notices ───────────────────────────────────────────── */

.gillmore-plp-grid-col .woocommerce-message,
.gillmore-plp-grid-col .woocommerce-error,
.gillmore-plp-grid-col .woocommerce-info {
    border-radius: 0.75rem !important;
    border-top: none !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.875rem !important;
    margin-bottom: 1rem !important;
    list-style: none !important;
}
.gillmore-plp-grid-col .woocommerce-message {
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
}
