/* ============================================
   PRODUCTS PAGE
   ============================================ */

.products-page {
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

/* ---------- LAYOUT WRAPPER ---------- */

.layout {
    width: 80rem;
    margin: 0 auto;
    max-width: calc(100% - 2rem);
    padding: 0 1.5rem;
}

/* ---------- EYEBROW LABEL ---------- */

.eyebrow {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid #1ab5c533;
    border-radius: 2rem;
    background: #eaf9fa;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0.7rem #1ab5c5aa;
    vertical-align: middle;
    animation: pulseDot 2s ease-in-out infinite;
}

/* ============================================
   PRODUCTS HERO
   ============================================ */

.products-hero {
    position: relative;
    padding: 5rem 0 3.5rem;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.products-hero::before {
    content: "";
    position: absolute;
    top: -10rem;
    left: 50%;
    width: 34rem;
    height: 34rem;
    border: 1px solid #1ab5c515;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: aboutHeroOrbit 20s linear infinite;
    pointer-events: none;
}

.products-hero::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: radial-gradient(circle, #1ab5c510, transparent 70%);
    transform: translate(-50%, -50%);
    animation: aboutHeroGlow 5s ease-in-out infinite;
    pointer-events: none;
}

.products-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 52rem;
    margin: 0 auto 1.2rem;
    color: var(--secondary-color);
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -0.05rem;
}

.products-hero h1::after {
    content: "";
    display: block;
    width: 4rem;
    height: 3px;
    margin: 1.5rem auto 0;
    border-radius: 2rem;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed);
}

.products-hero p {
    position: relative;
    z-index: 1;
    max-width: 45rem;
    margin: 0 auto 2rem;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ---------- SEARCH FORM ---------- */

.product-search {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 36rem;
    margin: 0 auto;
    padding: 0.5rem;
    border: 1px solid #dce5e9;
    border-radius: 2rem;
    background: #ffffff;
    box-shadow: 0 1rem 3rem #082a4a0d;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.product-search:focus-within {
    border-color: #1ab5c555;
    box-shadow: 0 1rem 3rem #1ab5c51f;
}

.product-search input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: 2rem;
    background: transparent;
    color: var(--secondary-color);
    font-size: 0.95rem;
    outline: none;
}

.product-search input::placeholder {
    color: #999;
}

.product-search button {
    flex: 0 0 auto;
    padding: 0.85rem 1.6rem;
    border: 1px solid #1ab5c522;
    border-radius: 2rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 0.6rem 1.5rem #1ab5c533,
        inset 0 1px 0 #ffffff44;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.product-search button:hover {
    transform: translateY(-2px);
    background: #22c5d5;
    box-shadow:
        0 1rem 2rem #1ab5c555,
        inset 0 1px 0 #ffffff55;
}

.product-search button:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   CATEGORY NAVIGATION
   ============================================ */

.product-categories {
    position: relative;
    padding: 1rem 0 2rem;
}

.products-heading {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.8rem;
    text-align: left;
}

.products-heading h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.03rem;
    margin: 0;
}

.products-heading .eyebrow {
    margin-bottom: 0.6rem;
}

/* ---------- CATEGORY LINKS ---------- */

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.category-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.2rem;
    border: 1px solid #dce5e9;
    border-radius: 2rem;
    background: #ffffff;
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.category-links a:hover {
    transform: translateY(-2px);
    border-color: #1ab5c544;
    color: var(--primary-color);
    box-shadow: 0 0.5rem 1rem #1ab5c51a;
}

.category-links a.active {
    background: linear-gradient(135deg, var(--primary-color), #0d8fa0);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0.5rem 1.2rem #1ab5c544;
}

.category-links a.active:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-section {
    position: relative;
    padding: 1rem 0 4rem;
}

.product-count {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #dce5e9;
    border-radius: 2rem;
    background: #f7fafb;
    color: #777;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- PRODUCTS GRID ---------- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0 2rem;
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #ffffff;
    border-radius: 2rem;
    background: linear-gradient(145deg, #f3f6f9, #ffffff);
    box-shadow: 0 1rem 3rem #082a4a0b;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed, #ec4899);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 2;
}

.product-card::after {
    content: "";
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: #1ab5c514;
    filter: blur(25px);
    transition: transform 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: #1ab5c544;
    box-shadow: 0 1.5rem 4rem #082a4a18;
}

.product-card:hover::before {
    transform: scaleX(1);
    animation: profileCardGradient 3s linear infinite;
}

.product-card:hover::after {
    transform: scale(1.5);
}

/* ---------- PRODUCT IMAGE ---------- */

.product-image {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eef2f4;
    overflow: hidden;
    text-decoration: none;
}

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

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 10rem;
    background: linear-gradient(145deg, #eef2f4, #f9fbfc);
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03rem;
}

/* ---------- PRODUCT CONTENT ---------- */

.product-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.4rem 1.4rem 1.6rem;
    flex: 1;
}

.product-content h3 {
    color: var(--secondary-color);
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.product-card:hover .product-content h3 {
    color: var(--primary-color);
}

/* ---------- PRICE ---------- */

.product-price {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02rem;
}

.product-price::before {
    content: "";
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--primary-color);
    vertical-align: middle;
    box-shadow: 0 0 0.6rem #1ab5c5aa;
}

/* ---------- CONDITION ---------- */

.product-condition {
    display: inline-block;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border: 1px solid #1ab5c522;
    border-radius: 2rem;
    background: #eaf9fa;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04rem;
}

/* ---------- PRODUCT BUTTON ---------- */

.product-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: auto;
    padding: 0.8rem 1.4rem;
    border: 1px solid #1ab5c522;
    border-radius: 2rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    box-shadow:
        0 0.6rem 1.5rem #1ab5c533,
        inset 0 1px 0 #ffffff44;
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.product-button::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -100%;
    width: 60%;
    height: 140%;
    background: linear-gradient(90deg, transparent, #ffffff66, transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.product-button::after {
    content: "→";
    display: inline-block;
    transition: transform 0.25s ease;
}

.product-button:hover {
    transform: translateY(-3px);
    background: #22c5d5;
    box-shadow:
        0 1rem 2rem #1ab5c555,
        inset 0 1px 0 #ffffff55;
}

.product-button:hover::before {
    left: 150%;
}

.product-button:hover::after {
    transform: translateX(4px);
}

.product-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   PAGINATION (PRODUCTS)
   ============================================ */

.products-section .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem 0 3rem;
}

.products-section .pagination a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dce5e9;
    border-radius: 2rem;
    background: #ffffff;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.products-section .pagination a:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0.5rem 1rem #1ab5c51a;
}

.products-section .pagination a.active {
    background: linear-gradient(135deg, var(--primary-color), #0d8fa0);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0.5rem 1.2rem #1ab5c544;
}

.products-section .pagination a.active:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* ============================================
   NO PRODUCTS
   ============================================ */

.no-products {
    position: relative;
    max-width: 40rem;
    margin: 3rem auto;
    padding: 3rem 2rem;
    border: 1px solid #dce5e9;
    border-radius: 2rem;
    background: linear-gradient(145deg, #f3f6f9, #ffffff);
    text-align: center;
    box-shadow: 0 1rem 3rem #082a4a0d;
    overflow: hidden;
}

.no-products::before {
    content: "🔍";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    background: #eaf9fa;
    font-size: 1.5rem;
}

.no-products h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

.no-products p {
    color: #777;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */

.product-detail-page {
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

.product-detail {
    position: relative;
    padding: 3rem 0 5rem;
}

/* ---------- DETAIL GRID ---------- */

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

/* ---------- DETAIL IMAGE ---------- */

.product-detail-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #ffffff;
    border-radius: 2.5rem;
    background: linear-gradient(145deg, #f3f6f9, #ffffff);
    box-shadow: 0 1.5rem 4rem #082a4a0d;
    overflow: hidden;
    isolation: isolate;
}

.product-detail-image::before {
    content: "";
    position: absolute;
    top: -6rem;
    right: -6rem;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    background: #1ab5c50d;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.product-detail-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    box-sizing: border-box;
    transition: transform 0.5s ease;
}

.product-detail-image:hover img {
    transform: scale(1.03);
}

.product-detail-image .product-no-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #eef2f4, #f9fbfc);
    font-size: 0.95rem;
}

/* ---------- DETAIL CONTENT ---------- */

.product-detail-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2.5rem;
    border: 1px solid #ffffff;
    border-radius: 2.5rem;
    background:
        radial-gradient(circle at 90% 10%, #7c3aed0d, transparent 30%),
        radial-gradient(circle at 10% 90%, #1ab5c50d, transparent 30%),
        linear-gradient(145deg, #f3f6f9, #ffffff);
    box-shadow: 0 1.5rem 4rem #082a4a0d;
    overflow: hidden;
    isolation: isolate;
}

.product-detail-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed, #ec4899, var(--primary-color));
    background-size: 300% 100%;
    animation: legalAccentGradient 5s linear infinite;
}

.product-detail-content::after {
    content: "";
    position: absolute;
    top: -8rem;
    right: -8rem;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: #1ab5c510;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

.product-detail-content h1 {
    position: relative;
    z-index: 1;
    color: var(--secondary-color);
    font-size: 2.4rem;
    line-height: 1.2;
    letter-spacing: -0.04rem;
    margin: 0;
}

/* ---------- DETAIL PRICE ---------- */

.product-detail-price {
    position: relative;
    z-index: 1;
    display: inline-block;
    width: fit-content;
    padding: 0.7rem 1.3rem;
    border: 1px solid #1ab5c533;
    border-radius: 1rem;
    background: linear-gradient(135deg, #1ab5c510, #7c3aed10);
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03rem;
}

/* ---------- DETAIL DESCRIPTION ---------- */

.product-description {
    position: relative;
    z-index: 1;
    color: #555;
    font-size: 1rem;
    line-height: 1.85;
}

.product-description p {
    margin-bottom: 1rem;
}

.product-description ul,
.product-description ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.product-description li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.product-description li::marker {
    color: var(--primary-color);
}

.product-description h3,
.product-description h4 {
    color: var(--secondary-color);
    margin: 1.5rem 0 0.8rem;
}

.product-description a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.product-description a:hover {
    color: #7c3aed;
}

.product-description strong {
    color: var(--secondary-color);
}

/* ---------- SHIPPING BLOCK ---------- */

.product-shipping {
    position: relative;
    z-index: 1;
    padding: 1.2rem 1.4rem;
    border: 1px solid #dce5e9;
    border-radius: 1.5rem;
    background: #f7fafb;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}

.product-shipping:hover {
    border-color: #1ab5c533;
    background: #ffffff;
}

.product-shipping strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #888;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.product-shipping p {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
}

/* ---------- DETAIL BUTTON (View on eBay) ---------- */

.product-detail-content .product-button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    padding: 1.1rem 1.8rem;
    border: 1px solid #ffffff44;
    border-radius: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #0d8fa0, #7c3aed);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    box-shadow:
        0 0.8rem 2rem #1ab5c533,
        inset 0 1px 0 #ffffff44;
    animation: searchButtonGradient 5s ease infinite;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.product-detail-content .product-button::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -100%;
    width: 60%;
    height: 140%;
    background: linear-gradient(90deg, transparent, #ffffff66, transparent);
    transform: skewX(-20deg);
    animation: searchButtonShine 3.5s ease-in-out infinite;
}

.product-detail-content .product-button::after {
    content: "→";
    display: inline-block;
    transition: transform 0.25s ease;
}

.product-detail-content .product-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 1.2rem 2.8rem #1ab5c544,
        inset 0 1px 0 #ffffff55;
}

.product-detail-content .product-button:hover::after {
    transform: translateX(4px);
}

.product-detail-content .product-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   RESPONSIVE — PRODUCTS
   ============================================ */

@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .products-hero h1 {
        font-size: 3rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-image {
        aspect-ratio: 4 / 3;
        border-radius: 2rem;
    }
}

@media (max-width: 600px) {
    .layout {
        padding: 0 1rem;
    }

    .products-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .products-hero h1 {
        font-size: 2.2rem;
    }

    .products-hero p {
        font-size: 1rem;
    }

    .product-search {
        flex-direction: column;
        border-radius: 1.5rem;
        padding: 0.6rem;
    }

    .product-search input {
        width: 100%;
        text-align: center;
    }

    .product-search button {
        width: 100%;
    }

    .products-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .products-heading h2 {
        font-size: 1.6rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card {
        border-radius: 1.5rem;
    }

    .product-content {
        padding: 1.2rem;
    }

    .product-detail {
        padding: 2rem 0 3rem;
    }

    .product-detail-image {
        border-radius: 1.5rem;
        aspect-ratio: 1 / 1;
    }

    .product-detail-content {
        padding: 1.8rem 1.5rem;
        border-radius: 1.5rem;
        gap: 1rem;
    }

    .product-detail-content h1 {
        font-size: 1.8rem;
    }

    .product-detail-price {
        font-size: 1.4rem;
    }

    .product-detail-content .product-button {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .no-products {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
}