* { box-sizing: border-box !important; }

/* Item details */
/* item detail main */
.detail-container {
    max-width: 1000px;
    margin: 20px auto 60px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 40px;
    padding: 40px;
    align-items: flex-start;
}

/* left pic */
.detail-container .image-section {
    flex: 1;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eee;
    min-width: 300px;
}
.detail-container .image-section img {
    width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
}

.detail-container .info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.detail-container .item-title {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    white-space: normal !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow: visible !important;
    line-height: 1.2;
}
.detail-container .item-price {
    font-size: 32px;
    color: #d9534f;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Status and position */
.item-meta {
    margin-bottom: 20px;
    color: #555;
}
.item-meta span {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}

/* Decription */
.item-description {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #444;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* seller card */
.seller-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.seller-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.seller-avatar {
    width: 48px;
    height: 48px;
    background: #d86800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 20px;
    aspect-ratio: 1 / 1;
}

/*  */
.action-buttons {
    margin-top: auto;
}
.btn-basket {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}
.btn-basket:hover {
    background-color: #218838;
}
.btn-basket:active {
    transform: scale(0.98);
}

.reviews-container {
    max-width: 1000px;
    margin: 20px auto 60px;
    background: #ffffff;
    border-radius: 8px;
    padding: 30px 40px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Item list Layout */
.page-container { 
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    gap: 30px;
    padding: 0 20px;
    perspective: 1500px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

.sidebar { width: 250px; flex-shrink: 0; }
.sidebar-card { background: white; border: 1px solid #eee; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.sidebar-title { margin-top: 0; margin-bottom: 20px; color: #333; font-size: 18px; border-bottom: 2px solid #f8f9fa; padding-bottom: 10px; font-weight: bold; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin-bottom: 8px; }
.category-list a { text-decoration: none; color: #555; display: block; padding: 10px 12px; border-radius: 6px; transition: 0.2s ease; }
.category-list a:hover { background: #fff7f0; color: #d86800; }

.main-content { flex-grow: 1; }
.page-header { margin-top: 0; margin-bottom: 20px; color: #333; font-size: 24px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.item-card {
    display: block; text-decoration: none; color: inherit;
    background: white; border: 1px solid #eee; border-radius: 12px; 
    overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04);

    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    position: relative;
}

.item-card:hover {
    transform: translateZ(10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
}

.item-card:hover:after {
    opacity: 1;
}

.item-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0) 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.item-img-container { height: 180px; background: #f8f9fa; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #f5f5f5; }
.item-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.item-card:hover .item-img-container img {
    transform: translateZ(20px);
}

.item-info { padding: 16px; }
.item-title { margin: 0 0 8px 0; font-size: 16px; color: #333; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { margin: 0 0 8px 0; color: #d9534f; font-weight: bold; font-size: 18px; }
.item-category { margin: 0 0 5px 0; color: #888; font-size: 12px; }

/* default category link style */
.cat-item-link { color: #555; }
/* selected category link style */
.cat-item-link.active { color: #d86800; font-weight: bold; }