/* Products Page Styles */

/* Products Main Section - 全体の枠線 */
.products-main-section {
    padding: 10px 0;
}

.products-main-section .container {
    border: 1px solid #909090;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Search & Filter Section */
.search-filter-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    display: flex;
    max-width: 280px;
    width: 100%;
    margin: 0;
    background-color: rgba(60, 60, 60, 0.8);
    border: none;
    border-radius: 30px;
    overflow: hidden;
}

.search-box-wrapper .search-input {
    flex: 1;
    padding: 12px 15px 12px 25px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.search-box-wrapper .search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-box-wrapper .search-btn {
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    color: var(--primary-orange);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-box-wrapper .search-btn:hover {
    color: #ff6a33;
}

/* Filter Dropdown Wrapper */
.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-btn {
    padding: 12px 25px;
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 69, 0, 0.3);
    color: var(--text-white);
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-dropdown-btn:hover {
    background-color: rgba(60, 60, 60, 0.9);
    border-color: var(--primary-orange);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Filter Dropdown Content */
.filter-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: rgba(20, 20, 20, 0.98);
    border: 1px solid var(--primary-orange);
    border-radius: 10px;
    padding: 20px;
    display: none;
    z-index: 100;
    min-width: 300px;
    max-width: 600px;
}

.filter-dropdown-content.active {
    display: block;
}

/* Selected Tags Area */
.selected-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 69, 0, 0.2);
}

/* All Tags Area */
.all-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.all-tags-area .check_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.all-tags-area .check_wrap input[type="checkbox"] {
    display: none;
}

.filter-tag {
    padding: 8px 18px;
    background-color: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

.filter-tag:hover,
.filter-tag.active,
.filter-tag.cateActive {
    background-color: var(--primary-orange);
    color: white;
}

/* Filter Clear Button */
.btn-filter-clear {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    color: #ff3333;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-filter-clear:hover {
    color: #ff5555;
}

/* Model and Year Options */
.model-option,
.year-option {
    padding: 10px 15px;
    background-color: transparent;
    border: none;
    color: var(--text-white);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 5px;
    display: inline-block;
    margin: 5px;
}

.model-option:hover,
.year-option:hover {
    background-color: var(--primary-orange);
}

/* Products Grid */
.products-section {
    padding: 80px 0;
}

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

.product-card-item {
    /* border: 1px solid rgba(255, 69, 0, 0.3); */
    /* border-radius: 8px; */
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 69, 0, 0.3);
}

.product-card-image {
    width: 100%;
    height: 290px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
}

.product-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-brand {
    font-size: 14px;
    color: var(--primary-orange);
    margin-bottom: 5px;
    font-weight: bold;
}

.product-card-model {
    font-size: 16px;
    color: var(--text-white);
    margin-bottom: 8px;
}

.product-card-year {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.product-card-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 15px;
}

.product-card-price {
    font-size: 14px;
    color: var(--text-white);
    margin-bottom: 20px;
}

.product-card-link {
    color: var(--primary-orange);
    font-weight: normal;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    align-self: flex-end;
    margin-top: auto;
}

.product-card-link:hover {
    gap: 12px;
}

.product-card-link svg {
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.pagination-btn {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 2px solid var(--primary-orange);
    border-radius: 50%;
    color: transparent;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-orange);
    transform: scale(1.1);
}

.pagination-btn:disabled {
    border-color: #666666;
    cursor: not-allowed;
}

/* Next button arrow (>) */
#nextPage::before,
#nextPage::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background-color: var(--primary-orange);
    transition: background-color 0.3s ease;
}

#nextPage::before {
    transform: rotate(45deg);
    top: calc(50% - 3px);
    left: calc(50% - 2px);
}

#nextPage::after {
    transform: rotate(-45deg);
    top: calc(50% + 1px);
    left: calc(50% - 2px);
}

#nextPage:hover:not(:disabled)::before,
#nextPage:hover:not(:disabled)::after {
    background-color: #000000;
}

#nextPage:disabled::before,
#nextPage:disabled::after {
    background-color: #666666;
}

/* Prev button arrow (<) */
#prevPage::before,
#prevPage::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background-color: var(--primary-orange);
    transition: background-color 0.3s ease;
}

#prevPage::before {
    transform: rotate(-45deg);
    top: calc(50% - 3px);
    left: calc(50% - 5px);
}

#prevPage::after {
    transform: rotate(45deg);
    top: calc(50% + 1px);
    left: calc(50% - 5px);
}

#prevPage:hover:not(:disabled)::before,
#prevPage:hover:not(:disabled)::after {
    background-color: #000000;
}

#prevPage:disabled::before,
#prevPage:disabled::after {
    background-color: #666666;
}

.pagination-numbers {
    display: flex;
    gap: 30px;
}

.page-number {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--text-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number:hover {
    background-color: rgba(255, 69, 0, 0.1);
}

.page-number.active {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
}

.page-ellipsis {
    color: var(--text-white);
    font-size: 14px;
    font-weight: bold;
    padding: 0 5px;
}

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

@media (max-width: 768px) {
    .products-main-section {
        padding: 1rem;
    }

    .products-main-section .container {
        background-color: #000;
        padding: 1rem;
    }
    .search-filter-section{
        margin: 1rem 0 0;
    }
    .products-section{
        padding: 3rem 0;
    }

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

    .search-box-wrapper,
    .search-form {
        max-width: 100%;
        width: 100%;
    }

    .filter-dropdown-wrapper {
        width: 100%;
    }

    .filter-dropdown-btn {
        width: 100%;
    }

    .filter-tags {
        gap: 8px;
    }

    .filter-tag {
        font-size: 11px;
        padding: 8px 15px;
    }

    .model-buttons {
        flex-wrap: wrap;
    }

    .model-btn {
        font-size: 12px;
        padding: 8px 20px;
    }

    .pagination-numbers {
        gap: 5px;
    }

    .page-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .pagination-btn {
        width: 40px;
        height: 40px;
        margin: 0 -0.5rem;
    }
}
