/* ============================================================
   INTEX JORDAN — SHOP PAGE REDESIGN
   Matches homepage brand: #003087 (navy) / #00b5cc (cyan)
   ============================================================ */

/* ── Base resets for shop area ─────────────────────────────── */
.woocommerce-page .site-header,
.woocommerce-page .site-footer,
.woocommerce-page #page,
.woocommerce-page .site-content,
.woocommerce-page .entry-content {
    background: #f4f6f9;
}

/* ── Force hide sidebar on all shop/category pages ─────────── */
.woocommerce-page .widget-area,
.woocommerce-page #sidebar,
.woocommerce-page .sidebar,
.woocommerce-page aside.widget-area,
.woocommerce-page .secondary,
.woocommerce-page #secondary {
    display: none !important;
}

/* ── Force full width content area ─────────────────────────── */
.woocommerce-page .content-area,
.woocommerce-page #primary,
.woocommerce-page .site-main,
.woocommerce-page main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Remove GeneratePress container padding ─────────────────── */
.woocommerce-page .inside-article {
    padding: 0 !important;
}

/* ── Full-width hero outside the container ──────────────────── */
.ij-shop-hero {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: 100vw;
}

/* Remove default GeneratePress container constraints */
.woocommerce-page .grid-container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ── Shop Hero Banner ──────────────────────────────────────── */
.ij-shop-hero-banner {
    background: linear-gradient(135deg, #001a4d 0%, #003087 50%, #005baa 100%);
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ij-shop-hero::before, .ij-shop-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.ij-shop-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.ij-shop-hero h1, .ij-shop-hero-banner h1 {
    font-size: 38px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px;
    line-height: 1.1;
}

.ij-shop-hero p, .ij-shop-hero-banner p {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin: 0;
}

/* ── Toolbar: Category Pills + Sort ───────────────────────── */
.ij-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 40px;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    position: sticky;
    top: 72px; /* below sticky header */
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ij-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ij-pill {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #555;
    background: #f0f2f5;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.ij-pill:hover {
    background: #e0f7fa;
    color: #00b5cc;
    border-color: #00b5cc;
}

.ij-pill.active {
    background: #003087;
    color: #fff;
    border-color: #003087;
}

.ij-shop-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.ij-result-count .woocommerce-result-count {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.ij-sort-wrap .woocommerce-ordering {
    margin: 0;
}

.ij-sort-wrap .woocommerce-ordering select {
    border: 1.5px solid #dde1e7;
    border-radius: 6px;
    padding: 7px 32px 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
}

.ij-sort-wrap .woocommerce-ordering select:focus {
    outline: none;
    border-color: #00b5cc;
}

/* ── Main Shop Layout ──────────────────────────────────────── */
.woocommerce-page .woocommerce {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

/* ── Product Grid ──────────────────────────────────────────── */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: box-shadow 0.25s, transform 0.25s;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.13);
    transform: translateY(-4px);
}

/* ── Product Image Wrapper ─────────────────────────────────── */
.ij-product-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fb;
}

.woocommerce ul.products li.product .ij-product-img-wrap a.woocommerce-loop-product__link,
.woocommerce ul.products li.product .ij-product-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.woocommerce ul.products li.product .ij-product-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 16px !important;
    transition: transform 0.35s ease !important;
}

.woocommerce ul.products li.product:hover .ij-product-img-wrap img {
    transform: scale(1.07) !important;
}

/* ── Overlay on hover ──────────────────────────────────────── */
.ij-product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 48, 135, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    pointer-events: none;
}

.woocommerce ul.products li.product:hover .ij-product-overlay {
    opacity: 1;
}

.ij-quick-view {
    background: #fff;
    color: #003087;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 22px;
    border-radius: 3px;
    pointer-events: none;
}

/* ── Sale Badge ────────────────────────────────────────────── */
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    z-index: 3;
    min-height: auto;
    min-width: auto;
    line-height: 1.4;
}

/* ── Product Info Area ─────────────────────────────────────── */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #222 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.45 !important;
    padding: 14px 16px 6px !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product .price {
    display: block !important;
    padding: 0 16px 12px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #00b5cc !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product .price del {
    color: #bbb !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-right: 6px !important;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
    color: #e53935 !important;
}

/* ── Add to Cart Button ────────────────────────────────────── */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button {
    display: block !important;
    width: calc(100% - 32px) !important;
    margin: 0 16px 16px !important;
    padding: 10px 16px !important;
    background: #003087 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    text-align: center !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
    background: #00b5cc !important;
    color: #fff !important;
}

/* ── Pagination ────────────────────────────────────────────── */
.woocommerce nav.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
    display: flex;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #555 !important;
    background: #fff !important;
    border: 1.5px solid #dde1e7 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #e0f7fa !important;
    border-color: #00b5cc !important;
    color: #00b5cc !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #003087 !important;
    border-color: #003087 !important;
    color: #fff !important;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.woocommerce-breadcrumb {
    font-size: 12px !important;
    color: #888 !important;
    padding: 14px 40px !important;
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
    margin: 0 !important;
}

.woocommerce-breadcrumb a {
    color: #003087 !important;
    text-decoration: none !important;
}

.woocommerce-breadcrumb a:hover {
    color: #00b5cc !important;
}

/* ── No products found ─────────────────────────────────────── */
.woocommerce-info {
    border-top-color: #00b5cc !important;
    background: #fff !important;
    border-radius: 8px !important;
    padding: 20px 24px !important;
    font-size: 14px !important;
    color: #555 !important;
}

.woocommerce-info::before {
    color: #00b5cc !important;
}

/* ── Category page title ───────────────────────────────────── */
.woocommerce-products-header {
    display: none !important;
}

/* ── Loading spinner ───────────────────────────────────────── */
.blockUI.blockOverlay::before {
    border-color: #003087 transparent transparent transparent !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .woocommerce-page .woocommerce {
        padding: 24px 20px 40px;
    }
    .ij-shop-toolbar {
        padding: 14px 20px;
        top: 0;
    }
    .ij-shop-hero {
        padding: 36px 20px;
    }
    .ij-shop-hero h1, .ij-shop-hero-banner h1 {
        font-size: 28px;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 600px) {
    .ij-cat-pills {
        gap: 6px;
    }
    .ij-pill {
        font-size: 11px;
        padding: 6px 12px;
    }
    .ij-shop-hero h1, .ij-shop-hero-banner h1 {
        font-size: 22px;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2 {
        font-size: 10px !important;
        padding: 10px 10px 4px !important;
    }
    .woocommerce ul.products li.product .price {
        font-size: 14px !important;
        padding: 0 10px 8px !important;
    }
    .woocommerce ul.products li.product .button {
        width: calc(100% - 20px) !important;
        margin: 0 10px 10px !important;
        font-size: 10px !important;
        padding: 8px 10px !important;
    }
    .woocommerce-page .woocommerce {
        padding: 16px 12px 40px;
    }
}

/* ── Category archive image ────────────────────────────────── */
.woocommerce-products-header__title.page-title {
    display: none !important;
}

/* ── Remove gap between header and Elementor template ────────────────── */
.woocommerce-page .entry-content,
.woocommerce-page .inside-article,
.woocommerce-page .site-main > article {
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-page .elementor {
    margin: 0 !important;
}

/* ── Elementor archive template styling ─────────────────────────── */

/* Hero section */
.elementor-element-ij_hero_sec {
    background: linear-gradient(135deg, #001a4d 0%, #003087 50%, #005baa 100%) !important;
    padding: 50px 40px !important;
    text-align: center !important;
}

.elementor-element-ij_hero_sec .woocommerce-loop-category__title,
.elementor-element-ij_hero_sec .woocommerce-archive-title,
.elementor-element-ij_hero_sec h1,
.elementor-element-ij_hero_sec h2 {
    color: #fff !important;
    font-size: 38px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: center !important;
    margin: 0 !important;
}

/* Toolbar section */
.elementor-element-ij_toolbar_sec {
    background: #fff !important;
    border-bottom: 1px solid #e8ecf0 !important;
    position: sticky !important;
    top: 72px !important;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Products section */
.elementor-element-ij_products_sec {
    background: #f4f6f9 !important;
    padding: 32px 40px 60px !important;
}

/* Pagination section */
.elementor-element-ij_pag_sec {
    background: #f4f6f9 !important;
}

/* Elementor WooCommerce product grid */
.elementor-element-ij_grid .woocommerce ul.products {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Fix Elementor container max-width */
.elementor-element-ij_hero_sec > .e-con-inner,
.elementor-element-ij_toolbar_sec > .e-con-inner,
.elementor-element-ij_products_sec > .e-con-inner,
.elementor-element-ij_pag_sec > .e-con-inner {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Elementor inner container padding */
.elementor-element-ij_products_sec .e-con-inner {
    padding: 0 !important;
}

img.attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* ── Fix GeneratePress conflicts ───────────────────────────── */
.woocommerce-page .inside-article,
.woocommerce-page .entry-content {
    padding: 0 !important;
}

.woocommerce-page .page-header {
    display: none !important;
}

/* ── Star ratings ──────────────────────────────────────────── */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
    color: #f5a623 !important;
}

.woocommerce ul.products li.product .star-rating {
    margin: 0 16px 6px !important;
    font-size: 12px !important;
}
