/* =========================================================================
   Products Page Styles
   ========================================================================= */

/* --- Hero --- */
.products-hero {
    position: relative;
    height: 45vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1a2332;
}

.products-hero-bg {
    position: absolute;
    inset: 0;
    background: url('/energy/images/materials-background.jpg') center/cover no-repeat;
    opacity: 0.35;
}

.products-hero .container {
    position: relative;
    z-index: 2;
}

.products-hero-content {
    color: white;
    text-align: center;
}

.products-hero-label {
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 12px;
}

.products-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.products-hero-desc {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1.8;
}

/* --- Category Filter --- */
.category-filter-section {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 0;
    transition: box-shadow 0.3s ease;
}

.category-filter-section.is-stuck {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background: white;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Sans JP', sans-serif;
}

.category-btn:hover {
    border-color: #007BFF;
    color: #007BFF;
}

.category-btn.active {
    background: #007BFF;
    border-color: #007BFF;
    color: white;
}

.category-btn i {
    font-size: 0.85rem;
}

/* --- Products Loader --- */
.products-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
}

.products-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #007BFF;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin-loader {
    to { transform: rotate(360deg); }
}

.products-loader p {
    font-size: 0.95rem;
}

/* --- Products Section --- */
.products-section {
    padding: 40px 0 80px;
    background: #f8f9fa;
    min-height: 60vh;
}

.products-count {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* --- Product Card --- */
.product-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.product-card.hiding {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.product-card-inner {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Card - Image Area */
.product-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    overflow: hidden;
}

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

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

/* Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.badge-panel { background: #7ED321; }
.badge-pcs { background: #F5A623; }
.badge-mount { background: #007BFF; }
.badge-other { background: #9b59b6; }

/* Checkbox */
.product-select-label {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    cursor: pointer;
}

.product-select-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.product-select-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ddd;
    color: transparent;
    transition: all 0.25s ease;
    font-size: 0.85rem;
}

.product-select-label:hover .product-select-icon {
    border-color: #007BFF;
}

.product-select-label input:checked + .product-select-icon {
    background: #007BFF;
    border-color: #007BFF;
    color: white;
}

/* Card - Info Area */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-maker {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.4;
}

.product-model {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 14px;
}

.product-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    flex: 1;
}

.product-specs li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

.product-specs li span:first-child {
    color: #888;
}

.product-specs li span:last-child {
    font-weight: 600;
    color: #333;
}

.product-price {
    font-size: 0.85rem;
    color: #007BFF;
    font-weight: 600;
    margin-top: auto;
}

/* Card - Link wrapper */
.product-info-link {
    text-decoration: none;
    color: inherit;
}

.product-info-link:hover {
    color: inherit;
}

.product-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #007BFF;
    margin-top: 12px;
    transition: gap 0.2s ease;
}

.product-info-link:hover .product-detail-link {
    gap: 10px;
}

/* --- No Products --- */
.no-products {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.no-products i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.no-products p {
    font-size: 1.1rem;
}

/* --- CTA Section --- */
.products-cta-section {
    padding: 80px 0;
    text-align: center;
    background: white;
}

.products-cta-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.products-cta-section > .container > p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.8;
}

.cta-btn {
    display: inline-block;
    padding: 16px 44px;
    background: #F5A623;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.3);
}

.cta-btn:hover {
    background: #E6941A;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.4);
}

.cta-phone {
    margin-top: 24px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.cta-phone i {
    color: #007BFF;
    margin-right: 4px;
}

.cta-phone-note {
    font-size: 0.8rem;
    font-weight: 400;
    color: #999;
    margin-left: 8px;
}

/* --- Floating Inquiry Bar --- */
.floating-inquiry {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-inquiry.visible {
    bottom: 0;
}

.floating-inquiry-inner {
    max-width: 700px;
    margin: 0 auto 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.floating-inquiry-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #333;
}

.floating-inquiry-info i {
    color: #007BFF;
    font-size: 1.2rem;
}

.floating-inquiry-btn {
    padding: 12px 28px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Noto Sans JP', sans-serif;
}

.floating-inquiry-btn:hover {
    background: #0056B3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        height: 35vh;
        min-height: 260px;
    }

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

    .category-filter-section {
        top: 60px;
    }

    .category-filter {
        gap: 8px;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-info {
        padding: 14px;
    }

    .product-name {
        font-size: 1rem;
    }

    .floating-inquiry-inner {
        margin: 0 12px 12px;
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
    }

    .floating-inquiry-btn {
        width: 100%;
        text-align: center;
    }

    .sp-only { display: inline; }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-image {
        aspect-ratio: 16 / 10;
    }
}

/* SP only line break */
.sp-only {
    display: none;
}
