/* =========================================================
   PRODUCTS PAGE
========================================================= */

/* ===============================
   Hero
=============================== */

.products-eyebrow {
    margin: 0 0 12px;

    color: var(--color-yellow);

    font-size: 0.82rem;
    font-weight: 900;

    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.products-hero {
    position: relative;

    min-height: 430px;

    overflow: hidden;

    color: var(--color-white);

    background:
        linear-gradient(
            90deg,
            rgba(3, 35, 29, 0.95) 0%,
            rgba(3, 35, 29, 0.82) 48%,
            rgba(3, 35, 29, 0.45) 100%
        ),
        url("../assets/images/court/products.jpg")
        center / cover no-repeat;
}

.products-hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.05),
            rgba(0,0,0,.25)
        );
}

.products-hero-container {
    position: relative;

    z-index: 1;

    min-height: 430px;

    display: flex;
    align-items: center;
}

.products-hero-content {
    max-width: 720px;

    padding: 70px 0;
}

.products-hero-content h1 {
    margin: 0;

    color: var(--color-white);

    font-size: clamp(3rem,7vw,5.5rem);
    font-weight: 950;

    line-height: 1;

    letter-spacing: -.04em;
}

.products-hero-content p:last-child {
    max-width: 620px;

    margin-top: 28px;

    color: rgba(255,255,255,.88);

    font-size: clamp(1rem,2vw,1.2rem);

    line-height: 1.9;
}

.products-hero-actions{

    display:flex;

    gap:18px;

    flex-wrap:wrap;

    margin-top:40px;

}

/* ===============================
   商品列表
=============================== */

.products-list-section {
    padding: 96px 0;

    background:
        radial-gradient(
            circle at 10% 0,
            rgba(255,201,40,.08),
            transparent 24%
        ),
        var(--color-cream);
}

.products-list-heading {
    max-width: 720px;

    margin-bottom: 48px;
}

.products-list-heading h2 {
    margin: 0;

    color: var(--color-green-950);

    font-size: clamp(2rem,4vw,3.4rem);
    font-weight: 950;

    line-height: 1.15;
}

.products-list-heading p:last-child {
    margin-top: 18px;

    color: var(--color-gray-500);

    line-height: 1.8;
}

.products-filter{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

    margin-bottom:40px;

}

.products-filter button{

    padding:10px 22px;

    border:none;

    border-radius:999px;

    cursor:pointer;

    background:#ececec;

    font-weight:700;

    transition:.25s;

}

.products-filter button:hover{

    background:var(--color-yellow);

}

.products-filter button.active{

    background:var(--color-yellow);

    color:var(--color-green-950);

}

.products-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 28px;
}

/* ===============================
   商品卡片
=============================== */

.product-card {
    overflow: hidden;

    background: var(--color-white);

    border: 1px solid rgba(5, 47, 40, .10);
    border-radius: 20px;

    box-shadow: var(--shadow-small);

    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal),
        border-color var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);

    border-color: rgba(255,201,40,.6);

    box-shadow: var(--shadow-medium);
}

.product-card-image-link {
    display: block;
}

.product-card-image-wrapper {
    position: relative;

    height: 340px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #ece8df,
            #faf7ef
        );
}

.product-card-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .55s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-price-tag {
    position: absolute;

    right: 18px;
    top: 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 8px 14px;

    border-radius: 999px;

    background: var(--color-yellow);

    color: var(--color-green-950);

    font-size: .82rem;
    font-weight: 900;

    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.product-card-content {
    padding: 28px;
}

.product-category {
    margin: 0 0 8px;

    color: #9d7900;

    font-size: .72rem;
    font-weight: 900;

    letter-spacing: .18em;

    text-transform: uppercase;
}

.product-name {
    margin: 0;
}

.product-name a {
    color: var(--color-green-950);

    font-size: 1.55rem;
    font-weight: 950;

    line-height: 1.3;

    transition: color var(--transition-fast);
}

.product-name a:hover {
    color: var(--color-orange);
}

.product-price {
    margin: 12px 0 0;

    color: var(--color-orange);

    font-size: 1.3rem;
    font-weight: 900;
}

.product-summary {
    margin: 20px 0 28px;

    min-height: 90px;

    color: var(--color-gray-500);

    line-height: 1.8;

    font-size: .92rem;
}

.product-card-link {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    color: var(--color-green-700);

    font-size: .9rem;
    font-weight: 900;

    transition:
        color var(--transition-fast),
        gap var(--transition-fast);
}

.product-card-link:hover {
    gap: 16px;

    color: var(--color-orange);
}

/* =========================================================
   商品詳細頁
========================================================= */

.product-detail-section {
    padding: 90px 0;

    background:
        radial-gradient(
            circle at top right,
            rgba(255,201,40,.08),
            transparent 28%
        ),
        var(--color-cream);
}

.product-detail-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 72px;

    align-items: start;
}


/* ===============================
   商品圖片
=============================== */

.product-detail-image {
    overflow: hidden;

    border-radius: 24px;

    background: var(--color-white);

    box-shadow: var(--shadow-medium);
}

.product-detail-image img {
    display: block;

    width: 100%;
    height: auto;
}


/* ===============================
   商品資訊
=============================== */

.product-detail-content h1 {
    margin: 0;

    color: var(--color-green-950);

    font-size: clamp(2.4rem,5vw,4rem);

    font-weight: 950;

    line-height: 1.1;
}

.product-detail-price {
    margin-top: 18px;

    color: var(--color-orange);

    font-size: 2rem;

    font-weight: 900;
}

.product-detail-description {
    margin-top: 32px;

    color: var(--color-gray-500);

    line-height: 2;

    font-size: 1rem;
}


/* ===============================
   商品特色
=============================== */

.product-features {
    margin-top: 42px;
}

.product-features h2 {
    margin-bottom: 18px;

    color: var(--color-green-950);

    font-size: 1.5rem;

    font-weight: 900;
}

.product-features ul {
    margin: 0;
    padding: 0;

    list-style: none;

    display: grid;

    gap: 16px;
}

.product-features li {
    display: flex;

    align-items: flex-start;

    gap: 14px;

    padding: 16px 18px;

    border-radius: 14px;

    background: var(--color-white);

    border: 1px solid rgba(5,47,40,.08);

    box-shadow: var(--shadow-small);

    line-height: 1.8;
}

.product-features li::before {
    content: "✓";

    flex-shrink: 0;

    width: 26px;
    height: 26px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--color-yellow);

    color: var(--color-green-950);

    font-weight: 900;
}


/* ===============================
   按鈕
=============================== */

.product-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 18px;

    margin-top: 48px;
}

.product-buy-button,
.product-back-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 200px;

    padding: 16px 34px;

    border-radius: 999px;

    font-weight: 900;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.product-buy-button {
    background: var(--color-yellow);

    color: var(--color-green-950);

    box-shadow: var(--shadow-small);
}

.product-buy-button:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-medium);
}

.product-back-button {
    background: var(--color-green-950);

    color: var(--color-white);
}

.product-back-button:hover {
    transform: translateY(-3px);

    background: var(--color-green-700);
}


/* ===============================
   找不到商品
=============================== */

.product-not-found {
    padding: 120px 0;
}

.product-not-found-card {
    max-width: 680px;

    margin: 0 auto;

    padding: 60px;

    text-align: center;

    border-radius: 24px;

    background: var(--color-white);

    box-shadow: var(--shadow-medium);
}

.product-not-found-card h1 {
    margin: 12px 0 18px;

    color: var(--color-green-950);
}

.product-not-found-card p {
    margin-bottom: 32px;

    color: var(--color-gray-500);

    line-height: 1.8;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 992px) {

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-grid {
        grid-template-columns: 1fr;

        gap: 48px;
    }

}

@media (max-width: 768px) {

    .products-list-section,
    .product-detail-section {
        padding: 72px 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card-image-wrapper {
        height: 280px;
    }

    .product-detail-content h1 {
        font-size: 2.3rem;
    }

    .product-detail-price {
        font-size: 1.7rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-buy-button,
    .product-back-button {
        width: 100%;
    }

    .product-not-found-card {
        padding: 42px 28px;
    }

}

@media (max-width: 480px) {

    .products-hero {
        min-height: 340px;
    }

    .products-hero-container {
        min-height: 340px;
    }

    .products-hero-content {
        padding: 50px 0;
    }

    .product-card-content {
        padding: 22px;
    }

}

/* =========================================================
   PRODUCT DETAIL IMAGE PLACEHOLDER
========================================================= */

.product-detail-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    width: 100%;
    min-height: 420px;
    padding: 30px;

    border: 1px dashed #cbd3cf;
    border-radius: 16px;

    color: #77827d;
    background: #f6f8f7;

    text-align: center;
}

.product-detail-image-placeholder span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;
    margin-bottom: 12px;

    border-radius: 14px;

    color: #0f4c3a;
    background: #e8f2ee;

    font-size: 1.35rem;
    font-weight: 900;
}

.product-detail-image-placeholder p {
    margin: 0;

    font-size: 0.85rem;
    font-weight: 750;
}

.product-buy-button:disabled {
    cursor: not-allowed;

    opacity: 0.55;
}