/* WC Products Grid (3x2 with Load More)
 * Professional, clean, responsive design.
 */

.wcpg-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 32px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wcpg-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 26px 0 26px;
    padding: 12px 18px;
    border-radius: 16px;
    background: #f9fafb;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.wcpg-toolbar-left {
    flex: 1 1 260px;
}

.wcpg-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    justify-content: flex-end;
}

.wcpg-search-form {
    position: relative;
}

.wcpg-search-input {
    width: 100%;
    max-width: 380px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
    background-color: #ffffff;
    color: #111827;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.wcpg-search-input::placeholder {
    color: #9ca3af;
}


.wcpg-search-input:focus {
    border-color: #061B5D;
    background-color: #f9fbff;
    box-shadow: 0 0 0 1px rgba(6, 27, 93, 0.18);
}

.wcpg-sort-wrapper,
.wcpg-category-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.wcpg-category-filter-wrapper {
    margin-right: 18px;
}

.wcpg-label {
    font-size: 0.82rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.wcpg-sort-select,
.wcpg-category-filter-select {
    min-width: 130px;
    padding: 7px 30px 7px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    font-size: 0.9rem;
    color: #111827;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.wcpg-category-filter-select {
    min-width: 160px;
}

.wcpg-sort-select:focus,
.wcpg-category-filter-select:focus {
    border-color: #061B5D;
    box-shadow: 0 0 0 1px rgba(6, 27, 93, 0.18);
}

.wcpg-sort-wrapper::after,
.wcpg-category-filter-wrapper::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #111827;
    border-bottom: 2px solid #111827;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

@media (max-width: 640px) {
    .wcpg-toolbar {
        align-items: stretch;
        padding-bottom: 8px;
    }

    .wcpg-toolbar-right {
        justify-content: flex-start;
        gap: 18px;
        flex-wrap: wrap;
    }

    .wcpg-category-filter-wrapper {
        margin-right: 0;
        width: 100%;
    }

    .wcpg-category-filter-select {
        width: 100%;
        min-width: auto;
    }

    .wcpg-sort-wrapper {
        width: 100%;
    }

    .wcpg-sort-select {
        width: 100%;
        min-width: auto;
    }
}

.wcpg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
}

@media (max-width: 1024px) {
    .wcpg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wcpg-grid {
        grid-template-columns: 1fr;
    }
}

.wcpg-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.wcpg-item:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.12),
        0 3px 6px rgba(15, 23, 42, 0.08);
}

.wcpg-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding: 24px 24px 24px;
    height: 260px;
}

.wcpg-thumb img {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transform: none;
    transition: transform 0.25s ease;
}

.wcpg-item:hover .wcpg-thumb img {
    transform: translateY(-4px);
}

.wcpg-placeholder-thumb {
    width: 100%;
    height: 260px;
    background: repeating-linear-gradient(
        -45deg,
        #e5e7eb,
        #e5e7eb 10px,
        #d1d5db 10px,
        #d1d5db 20px
    );
}

.wcpg-info {
    padding: 22px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.wcpg-title {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
    margin: 0;
    display: block;
    white-space: normal;
}

.wcpg-product-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 4px 0 2px;
    font-weight: 500;
    line-height: 1.2;
}

.wcpg-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.wcpg-price del {
    color: #9ca3af;
    margin-right: 6px;
}

.wcpg-price ins {
    text-decoration: none;
    color: #10b981;
}

.wcpg-tax-label {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
}

.wcpg-wrapper .wcpg-button-add-to-cart {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: none !important;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: linear-gradient(180deg, #061B5D, #113FA2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(6, 27, 93, 0.35);
    transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

.wcpg-button-add-to-cart:hover {
    background: linear-gradient(180deg, #050f3a, #0d3280);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(6, 27, 93, 0.5);
}

.wcpg-button-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(6, 27, 93, 0.5);
}

.wcpg-no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Load more button */
.wcpg-load-more-wrapper,
.wcpg-search-load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    width: 100%;
}

.wcpg-wrapper .wcpg-load-more-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 22px;
    border-radius: 999px;
    border: none !important;
    background: linear-gradient(180deg, #061B5D, #113FA2) !important;
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.24s ease, background 0.24s ease, transform 0.16s ease;
    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.wcpg-load-more-button:hover:not([disabled]) {
    background: linear-gradient(180deg, #050f3a, #0d3280);
    transform: translateY(-1px);
    box-shadow:
        0 16px 38px rgba(15, 23, 42, 0.12),
        0 3px 6px rgba(15, 23, 42, 0.08);
}

.wcpg-load-more-button:active:not([disabled]) {
    transform: translateY(0);
    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.12),
        0 2px 4px rgba(15, 23, 42, 0.08);
}

.wcpg-load-more-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.wcpg-load-more-text {
    white-space: nowrap;
}

.wcpg-loader {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #ffffff;
    animation: wcpg-spin 0.8s linear infinite;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.wcpg-load-more-button.wcpg-loading .wcpg-loader {
    opacity: 1;
    transform: scale(1);
}

.wcpg-load-more-button.wcpg-loading .wcpg-load-more-text {
    opacity: 0.8;
}

@keyframes wcpg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Collection page styles - Category grouped layout */
.wcpg-collection-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 32px;
    box-sizing: border-box;
}

/* Ensure collection wrapper uses same styles as regular wrapper */
.wcpg-collection-wrapper.wcpg-wrapper .wcpg-button-add-to-cart {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: none !important;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: linear-gradient(180deg, #061B5D, #113FA2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(6, 27, 93, 0.35);
    transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

.wcpg-collection-wrapper.wcpg-wrapper .wcpg-button-add-to-cart:hover {
    background: linear-gradient(180deg, #050f3a, #0d3280);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(6, 27, 93, 0.5);
}

.wcpg-collection-wrapper.wcpg-wrapper .wcpg-button-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(6, 27, 93, 0.5);
}

/* Price formatting */
.wcpg-collection-wrapper .wcpg-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.wcpg-collection-wrapper .wcpg-price del {
    color: #9ca3af;
    margin-right: 6px;
}

.wcpg-collection-wrapper .wcpg-price ins {
    text-decoration: none;
    color: #10b981;
}

.wcpg-collection-wrapper .wcpg-tax-label {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
}

.wcpg-collection-content {
    margin-top: 0;
}

.wcpg-category-section {
    margin-bottom: 48px;
}

.wcpg-category-section:last-child {
    margin-bottom: 0;
}

.wcpg-category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.wcpg-category-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #061B5D, #113FA2);
}

.wcpg-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
}

@media (max-width: 1024px) {
    .wcpg-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wcpg-category-grid {
        grid-template-columns: 1fr;
    }
    
    .wcpg-category-title {
        font-size: 1.5rem;
    }
}

/* Infinite scroll trigger */
.wcpg-infinite-scroll-trigger {
    height: 1px;
    width: 100%;
    margin: 40px 0;
    visibility: hidden;
}

.wcpg-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #6b7280;
    font-size: 0.9rem;
}

.wcpg-loading-indicator .wcpg-loader {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid rgba(6, 27, 93, 0.1);
    border-top-color: #061B5D;
    animation: wcpg-spin 0.8s linear infinite;
}

/* Category tiles (shortcode [wcpg_category_grid]) */
.wcpg-category-tiles-wrapper .wcpg-category-tile .wcpg-info {
    min-height: 220px;
    padding: 24px 28px 30px;
}

.wcpg-category-tiles-wrapper .wcpg-category-tile .wcpg-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}

.wcpg-category-tiles-wrapper .wcpg-category-description {
    margin-top: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Hide breadcrumb on product category pages */
.tax-product_cat .woocommerce-breadcrumb,
.tax-product_cat .breadcrumb,
.tax-product_cat nav.woocommerce-breadcrumb,
.tax-product_cat .breadcrumbs {
    display: none !important;
}

/* Category archive layout - stacked header then products */
.wcpg-category-page-layout {
    max-width: 100%;
    width: 100%;
    margin: 32px 0 40px;
    padding: 0 24px;
    box-sizing: border-box;
}

.wcpg-condition-page-title {
    font-family: Arial, sans-serif;
    font-size: 40px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 50px 0;
    margin: 0;
    color: #0f172a;
}

.wcpg-category-page-products {
    width: 100%;
}

.wcpg-category-page-products .wcpg-wrapper {
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 900px) {
    .wcpg-category-page-layout {
        padding: 0 16px;
    }

    .wcpg-condition-page-title {
        font-size: 28px;
        padding: 32px 0;
    }
}

/* Most Recommended Badge */
.wcpg-most-recommended-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    pointer-events: none;
}

.wcpg-thumb {
    position: relative;
}

.wcpg-item:hover .wcpg-most-recommended-badge {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* #1 Recommended Badge - Same style as Most Recommended */
.wcpg-number-one-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 11;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    pointer-events: none;
}

.wcpg-item:hover .wcpg-number-one-badge {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Shop by Sports Grid */
.wcpg-shop-by-sports-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

.wcpg-shop-by-sports-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .wcpg-shop-by-sports-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .wcpg-shop-by-sports-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.wcpg-sport-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 32px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 180px;
}

.wcpg-sport-tile:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.12),
        0 3px 6px rgba(15, 23, 42, 0.08);
}

.wcpg-sport-tile:not([href]) {
    cursor: default;
}

.wcpg-sport-tile:not([href]):hover {
    transform: none;
    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.wcpg-sport-emoji {
    font-size: 4rem;
    line-height: 1;
}

.wcpg-sport-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.wcpg-sport-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    line-height: 1.3;
}

/* Shop by Comfort Grid — inherits styles from wcpg-shop-by-sports-wrapper/grid/tile */

