/* ===== CSS CHO SHOP THÀNH TỰU ===== */

/* Thông tin điểm */
.achievement-points-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

.points-card:hover {
    transform: translateY(-5px);
}

.points-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.points-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.points-icon {
    font-size: 40px;
}

.points-details {
    flex: 1;
}

.points-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.points-value {
    font-size: 24px;
    font-weight: 700;
}

/* Controls */
.shop-controls {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.server-select,
.category-select,
.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.server-select:focus,
.category-select:focus,
.search-input:focus {
    border-color: #3498db;
    outline: none;
}

.search-input {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 95% center;
    background-size: 16px;
}

/* Shop items grid */
#shopItemsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.shop-item-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    transition: all 0.3s;
    position: relative;
}

.shop-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.shop-item-card.hot::before {
    content: 'HOT';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 30px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    z-index: 1;
}

.shop-item-card.new::before {
    content: 'MỚI';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #2ecc71;
    color: white;
    padding: 5px 30px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    z-index: 1;
}

.shop-item-header {
    padding: 15px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.shop-item-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    padding: 10px;
    border: 2px solid #dee2e6;
}

.shop-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
}

.shop-item-id {
    font-size: 11px;
    color: #7f8c8d;
}

.shop-item-body {
    padding: 15px;
}

.shop-item-description {
    font-size: 12px;
    color: #546e7a;
    line-height: 1.4;
    margin-bottom: 15px;
    min-height: 60px;
}

.shop-item-details {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 3px;
}

.detail-label {
    color: #6c757d;
}

.detail-value {
    color: #2c3e50;
    font-weight: 500;
}

.shop-item-price {
    text-align: center;
    margin-bottom: 15px;
}

.price-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.price-value::before {
    content: '🏆';
    font-size: 18px;
}

.shop-item-actions {
    display: flex;
    gap: 10px;
}

.btn-buy {
    flex: 1;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-buy:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-buy:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-detail {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Stock indicator */
.item-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.stock-available {
    background: #2ecc71;
    color: white;
}

.stock-low {
    background: #f39c12;
    color: white;
}

.stock-out {
    background: #e74c3c;
    color: white;
}

/* Purchase history */
.purchase-history {
    margin: 40px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.purchase-history h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

#purchaseHistory {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item.delivered {
    border-left: 4px solid #2ecc71;
}

.history-item.pending {
    border-left: 4px solid #f39c12;
}

.history-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.history-details {
    flex: 1;
}

.history-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.history-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

.history-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-load-more {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Shop notice */
.shop-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 10px;
    border: 2px solid #2196F3;
}

.notice-icon {
    font-size: 40px;
    animation: pulse 2s infinite;
}

.notice-content h4 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 16px;
}

.notice-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

/* Loading */
.shop-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Categories filter */
.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.category-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.category-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.empty-state-message {
    font-size: 14px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 1200px) {
    #shopItemsContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    #shopItemsContainer {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievement-points-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #shopItemsContainer {
        grid-template-columns: 1fr;
    }
    
    .shop-controls {
        flex-direction: column;
    }
    
    .control-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-item-actions {
        flex-direction: column;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* ===== MODAL MUA HÀNG ===== */

/* Modal Purchase Overlay */
#purchaseModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal header */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal body */
.modal-body {
    padding: 25px;
}

/* Purchase item info */
#purchaseItemInfo {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.purchase-item-image {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 90px;
    max-height: 90px;
}

.purchase-item-details {
    flex: 1;
    min-width: 0;
}

.purchase-item-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    word-wrap: break-word;
}

.purchase-item-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.purchase-item-price::before {
    content: '🏆';
    font-size: 16px;
}

.purchase-item-id {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.purchase-item-stock {
    font-size: 12px;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e8f5e9;
    display: inline-block;
    margin-top: 5px;
}

/* Quantity selector */
.quantity-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quantity-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #3498db;
    color: white;
}

.current-qty {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 40px;
    text-align: center;
}

.qty-input {
    width: 80px;
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-left: 10px;
}

.qty-input:focus {
    border-color: #3498db;
    outline: none;
}

/* Purchase summary */
.purchase-summary {
    background: white;
    border: 2px solid #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.total-row {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    padding-top: 15px;
    border-top: 2px solid #eee;
    margin-top: 10px;
}

.points-row {
    font-size: 14px;
    color: #666;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-top: 5px;
}

#remainingPoints {
    font-weight: bold;
    font-size: 16px;
    color: #2ecc71;
}

/* Modal footer */
.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-footer button {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 14px;
    min-width: 120px;
}

.btn-cancel {
    background: #f5f5f5;
    color: #424242;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.btn-confirm {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Responsive cho modal */
@media (max-width: 768px) {
    #purchaseModal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    #purchaseItemInfo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .purchase-item-image {
        width: 80px;
        height: 80px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 15px;
    }
    
    .quantity-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .qty-input {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .modal-footer {
        padding: 15px;
        gap: 10px;
    }
    
    .modal-footer button {
        padding: 10px 15px;
        min-width: auto;
    }
}

/* ===== MODAL CHI TIẾT VẬT PHẨM (MỚI - ĐẸP HƠN) ===== */

.item-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.item-detail-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.item-detail-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(106, 17, 203, 0.3);
}

.item-detail-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-detail-header h3 i {
    font-size: 24px;
    color: #ffd166;
}

.item-detail-close {
    cursor: pointer;
    font-size: 28px;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: 300;
}

.item-detail-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
}

.item-detail-body {
    padding: 30px;
}

/* Phần hình ảnh và tiêu đề */
.item-detail-hero {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

.item-detail-image-container {
    flex: 0 0 200px;
    position: relative;
}

.item-detail-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.item-detail-image:hover {
    transform: scale(1.05);
}

.item-detail-image img {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.item-detail-info {
    flex: 1;
}

.item-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-detail-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 10px;
    border-left: 5px solid #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.15);
}

.price-label {
    font-size: 16px;
    font-weight: 600;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label i {
    font-size: 20px;
}

.price-value {
    font-size: 32px;
    font-weight: 900;
    color: #e74c3c;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.price-value::after {
    content: ' điểm';
    font-size: 18px;
    font-weight: 600;
    color: #c0392b;
    margin-left: 5px;
}

/* Mô tả */
.item-detail-description-section {
    margin-bottom: 30px;
}

.item-detail-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #34495e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-detail-section-title i {
    color: #3498db;
    font-size: 20px;
}

.item-detail-description {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    font-size: 15px;
    color: #546e7a;
    line-height: 1.7;
    border-left: 4px solid #3498db;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-height: 200px;
    overflow-y: auto;
}

/* Thông tin cơ bản */
.item-detail-basic-info {
    margin-bottom: 30px;
}

.item-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.detail-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.4;
}

/* Thuộc tính chính */
.item-detail-attributes-section {
    margin-bottom: 30px;
}

.item-attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.attribute-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 10px;
    font-size: 14px;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.attribute-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.attribute-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #2ecc71);
}

.attribute-label {
    color: #7f8c8d;
    margin-right: 5px;
    font-weight: 600;
    font-size: 13px;
}

.attribute-value {
    color: #2c3e50;
    font-weight: 800;
    font-size: 18px;
    display: block;
    margin-top: 5px;
}

/* Thuộc tính đặc biệt */
.item-detail-special-attributes {
    margin-bottom: 30px;
}

.special-attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.special-attribute-item {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.special-attribute-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.special-attribute-item:nth-child(1) {
    border-color: #3498db;
}

.special-attribute-item:nth-child(1):hover {
    border-color: #2980b9;
}

.special-attribute-item:nth-child(2) {
    border-color: #e74c3c;
}

.special-attribute-item:nth-child(2):hover {
    border-color: #c0392b;
}

.special-attribute-item:nth-child(3) {
    border-color: #2ecc71;
}

.special-attribute-item:nth-child(3):hover {
    border-color: #27ae60;
}

.special-attribute-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.special-attribute-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dee2e6;
}

.special-attribute-value {
    display: block;
    font-weight: 900;
    font-size: 22px;
    color: #e74c3c;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.special-attribute-value.no-data {
    color: #95a5a6;
    font-weight: 600;
    font-size: 14px;
}

/* Ghi chú */
.item-detail-note {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #4caf50;
    font-size: 15px;
    color: #2e7d32;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.15);
    position: relative;
    overflow: hidden;
}

.item-detail-note::before {
    content: 'ℹ️';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px;
    opacity: 0.2;
}

.item-detail-note i {
    color: #2e7d32;
    margin-right: 10px;
    font-size: 18px;
}

/* Footer */
.item-detail-footer {
    padding: 25px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.btn-close-detail {
    padding: 14px 32px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #424242;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-close-detail:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-buy-from-detail {
    padding: 14px 32px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(106, 17, 203, 0.3);
}

.btn-buy-from-detail:hover {
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4);
}

/* Scrollbar cho modal */
.item-detail-modal::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.item-detail-modal::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f8f9fa, #e9ecef);
    border-radius: 5px;
}

.item-detail-modal::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3498db, #2ecc71);
    border-radius: 5px;
    border: 2px solid #f8f9fa;
}

.item-detail-modal::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2980b9, #27ae60);
}

/* Responsive cho modal chi tiết */
@media (max-width: 992px) {
    .item-detail-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .item-detail-image-container {
        flex: 0 0 auto;
    }
    
    .special-attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .item-detail-modal {
        width: 95%;
    }
    
    .item-detail-body {
        padding: 20px;
    }
    
    .item-detail-image {
        width: 160px;
        height: 160px;
    }
    
    .item-detail-image img {
        max-width: 140px;
        max-height: 140px;
    }
    
    .item-detail-title {
        font-size: 24px;
    }
    
    .price-value {
        font-size: 28px;
    }
    
    .item-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .item-attributes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .special-attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .item-detail-footer {
        flex-direction: column;
    }
    
    .item-detail-footer button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .item-detail-header {
        padding: 20px;
    }
    
    .item-detail-header h3 {
        font-size: 18px;
    }
    
    .item-detail-body {
        padding: 15px;
    }
    
    .item-detail-image {
        width: 140px;
        height: 140px;
    }
    
    .item-detail-image img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .item-detail-title {
        font-size: 20px;
    }
    
    .item-detail-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price-value {
        font-size: 24px;
    }
    
    .item-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .item-attributes {
        grid-template-columns: 1fr;
    }
    
    .detail-item,
    .attribute-item,
    .special-attribute-item {
        padding: 15px;
    }
}

/* Z-index cho Notiflix */
.notiflix-confirm {
    z-index: 10000 !important;
}

.notiflix-confirm-content {
    z-index: 10001 !important;
}

/* ===== FIX CSS CHO THANH TÌM KIẾM VÀ SHOP CONTROLS ===== */

/* Controls */
.shop-controls {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: flex-end; /* Căn chỉnh các item theo đáy */
}

.control-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px; /* Giới hạn độ rộng tối đa */
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

/* Select boxes */
.server-select,
.category-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: white;
    cursor: pointer;
}

.server-select:focus,
.category-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Thanh tìm kiếm cố định */
.search-input-wrapper {
    flex: 2; /* Cho phép thanh tìm kiếm chiếm nhiều không gian hơn */
    min-width: 250px;
    max-width: 400px; /* Giới hạn tối đa */
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px; /* Chừa khoảng trống cho icon */
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: white;
    box-sizing: border-box; /* Quan trọng: tính cả padding trong width */
}

.search-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Icon search bên trong input */
.search-input {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    background-size: 16px;
}

/* Responsive cho controls */
@media (max-width: 1200px) {
    .shop-controls {
        gap: 15px;
    }
    
    .control-group {
        min-width: 180px;
        max-width: 250px;
    }
    
    .search-input-wrapper {
        min-width: 200px;
        max-width: 350px;
    }
}

@media (max-width: 992px) {
    .shop-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        min-width: 100%;
        max-width: 100%;
    }
    
    .search-input-wrapper {
        min-width: 100%;
        max-width: 100%;
    }
    
    .server-select,
    .category-select,
    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .shop-controls {
        padding: 15px;
        gap: 12px;
    }
    
    .control-group label {
        font-size: 12px;
    }
    
    .server-select,
    .category-select,
    .search-input {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Hoặc nếu muốn layout dạng grid thay vì flex */
.shop-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
    align-items: end;
}

.shop-controls-grid .control-group {
    min-width: 100%;
    max-width: 100%;
}

.shop-controls-grid .search-input-wrapper {
    grid-column: span 2;
    min-width: 100%;
}

@media (max-width: 768px) {
    .shop-controls-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-controls-grid .search-input-wrapper {
        grid-column: span 1;
    }
}

/* Style cho nút tìm kiếm nếu muốn có button riêng */
.search-with-button {
    display: flex;
    gap: 10px;
    flex: 2;
    min-width: 300px;
    max-width: 500px;
}

.search-with-button .search-input {
    flex: 1;
    min-width: 0; /* Quan trọng: cho phép input co lại */
}

.search-button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Animation cho search input */
.search-input:focus {
    animation: searchFocus 0.3s ease;
}

@keyframes searchFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Placeholder style */
.search-input::placeholder {
    color: #95a5a6;
    font-size: 13px;
}

/* Clear button cho search input (chỉ hiện khi có nội dung) */
.search-input:not(:placeholder-shown) {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>'), 
                      url('data:image/svg+xml;utf8,<svg fill="%2395a5a6" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>');
    background-position: calc(100% - 15px) center, calc(100% - 40px) center;
    background-size: 16px, 16px;
    background-repeat: no-repeat;
}

/* Thêm style cho container chính */
.shop-main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Scrollbar cho select nếu có nhiều option */
.server-select,
.category-select {
    max-height: 200px;
    overflow-y: auto;
}

/* Custom scrollbar cho select */
.server-select::-webkit-scrollbar,
.category-select::-webkit-scrollbar {
    width: 8px;
}

.server-select::-webkit-scrollbar-track,
.category-select::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.server-select::-webkit-scrollbar-thumb,
.category-select::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.server-select::-webkit-scrollbar-thumb:hover,
.category-select::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}