/* --- Acc Game Shared & Specific Styles --- */

/* Index Page Styles */
.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.acc-card {
    display: block;
    text-decoration: none;
    color: #333;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 24px;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.acc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.acc-img-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.acc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.acc-img-container:hover .acc-img {
    transform: scale(1.1);
}

.acc-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.acc-img-container:hover .acc-actions {
    opacity: 1;
    transform: translateX(0);
}

.acc-action-btn {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.acc-action-btn:hover {
    background: #d32f2f;
    color: #fff;
}

.id-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.acc-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.acc-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.acc-attributes {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: #666;
    flex-grow: 1;
}

.acc-attributes li {
    margin-bottom: 4px;
}

.acc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.acc-price {
    color: #d32f2f;
    font-weight: 800;
    font-size: 1.1rem;
}

.acc-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85rem;
    margin-left: 5px;
}

.btn-view-detail {
    background-color: #f8f9fa;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-view-detail:hover {
    background-color: #d32f2f;
    color: white;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.page-btn {
    min-width: 35px;
    height: 35px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.page-btn.active {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

#loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    min-height: 200px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d32f2f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Details Page Styles */
.details-container {
    /*    background: #f8f9fa;*/
    padding: 40px 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.gallery-main {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.gallery-main img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-item {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.thumb-item.active {
    border-color: #d32f2f;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.id-tag {
    background: #d32f2f;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    margin: 15px 0;
}

.price-box {
    background: #fff5f5;
    border: 1px solid #ffdada;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.current-price {
    color: #d32f2f;
    font-size: 2rem;
    font-weight: 900;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 10px;
}

.attr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.attr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 12px;
}

.attr-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d32f2f;
    border: 1px solid #eee;
}

.attr-label {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0;
}

.attr-value {
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}

.buy-btn {
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.2rem;
    width: 100%;
    transition: all 0.3s;
    margin-bottom: 15px;
    display: block;
    text-align: center;
    text-decoration: none;
    font-family: system-ui, Helvetica, sans-serif;
}

.buy-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
    color: #fff;
}

.desc-header {
    font-weight: 800;
    font-size: 1.3rem;
    border-left: 5px solid #d32f2f;
    padding-left: 15px;
    margin-bottom: 20px;
}

.desc-content {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
}

.desc-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 15px 0;
}

.policy-card {
    border: 1px solid #eee;
    border-radius: 12px;
    height: 100%;
}

.policy-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 800;
}

.policy-body {
    padding: 20px;
}

@media (max-width: 768px) {
    .attr-grid {
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 1.4rem;
    }
}