/* Container principale */
.shopping-list-section {
    background: var(--bg-surface-card);
    color: var(--text-primary);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 200px);
    position: sticky;
    top: 20px;
}

.shopping-content{
    overflow: auto;
}

/* Header */
.shopping-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e6ed;
}

.shopping-list-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopping-list-title h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.3em;
}

.shopping-list-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
}

.btn-refresh-shopping {
    background: none;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.btn-refresh-shopping:hover {
    background: #f8f9ff;
    border-color: #667eea;
    transform: rotate(180deg);
}

/* Info Box */
.shopping-info-box {
    background: linear-gradient(135deg, #e0f7ff 0%, #f0e7ff 100%);
    border-left: 4px solid #667eea;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.shopping-info-box p {
    margin: 4px 0;
    font-size: 0.85em;
    color: #555;
}

.shopping-info-box strong {
    color: #667eea;
}

/* Content area */
.shopping-list-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: 500px;
}

/* Custom scrollbar */
.shopping-list-content::-webkit-scrollbar {
    width: 6px;
}

.shopping-list-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.shopping-list-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.shopping-list-content::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Empty State */
.shopping-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.shopping-empty-state p {
    margin: 10px 0;
    font-size: 1em;
    color: #666;
}

.shopping-empty-state small {
    font-size: 0.85em;
    color: #999;
}

/* Categoria Item */
.shopping-category {
    margin-bottom: 15px;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.shopping-item:hover {
    background:var(--bg-sidebar-hover);
}


.shopping-category-header:hover {
    background:var(--bg-sidebar-hover);
}

.shopping-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-icon {
    font-size: 1.2em;
}

.category-count {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-left: 5px;
}

.category-toggle {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    color: var(--text-primary);
}

.shopping-category.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.shopping-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-surface-sunken);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e6ed;
}

/* Items List */
.shopping-items-list {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-y: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-surface);
    
    
}

.shopping-category.collapsed .shopping-items-list {
    max-height: 0;
}

.shopping-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.shopping-item:last-child {
    border-bottom: none;
}



.shopping-item-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.shopping-item-name {
    flex: 1;
    font-size: 0.9em;
    
}

.shopping-item.checked .shopping-item-name {
    text-decoration: line-through;
    
}

.shopping-item-quantity {
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Actions Footer */
.shopping-list-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 2px solid #e0e6ed;
}

.shopping-list-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Loading state */
.shopping-loading {
    text-align: center;
    padding: 40px 20px;
}

/* Alternative items */
.shopping-alternatives-header {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    background: #f5f0ff;
    border-top: 1px dashed #c4b5fd;
    border-bottom: 1px dashed #c4b5fd;
    font-size: 0.78em;
    font-weight: 700;
    color: #764ba2;
    letter-spacing: 0.4px;
}

.shopping-item-alternative {
    background: #faf7ff;
}

.shopping-item-alternative .shopping-item-name {
    font-style: italic;
    color: var(--text-secondary, #666);
}

.shopping-item-alternative .shopping-item-quantity {
    color: #764ba2;
}

.shopping-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}



